Debian packaging: 0.0.1-1
[led-pattern-ed] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # GNU copyright 1997 to 1999 by Joey Hess.
5
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
8 export DH_COMPAT=4
9 export DH_OPTIONS
10
11 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
13 DEB_BUILD_ARCH   ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
14
15 CFLAGS = -Wall -g
16
17 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
18         CFLAGS += -O0
19 else
20         CFLAGS += -O2
21 endif
22 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
23         INSTALL_PROGRAM += -s
24 endif
25
26 config.status: configure
27         dh_testdir
28         # Add here commands to configure the package.
29         #CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
30         #        --prefix=/usr
31
32
33 build: build-stamp
34
35 build-stamp: config.status
36         dh_testdir
37
38         # Add here commands to compile the package.
39         $(MAKE)
40         touch $@
41
42 clean:
43         dh_testdir
44         dh_testroot
45         rm -f build-stamp
46
47         # Add here commands to clean up after the build process.
48         -$(MAKE) clean
49
50         dh_clean
51
52 install: build
53         dh_testdir
54         dh_testroot
55         dh_clean -k
56         dh_installdirs
57
58         # Add here commands to install the package into debian/tmp
59         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
60
61
62 # Build architecture-independent files here.
63 binary-indep: build install
64 # We have nothing to do by default.
65
66 # Build architecture-dependent files here.
67 binary-arch: install
68         dh_testdir
69         dh_testroot
70         dh_install --sourcedir=debian/tmp
71         dh_link
72         dh_strip
73         dh_compress
74         dh_fixperms
75         dh_makeshlibs
76         dh_installdeb
77         dh_shlibdeps
78         dh_gencontrol
79         dh_md5sums
80         dh_builddeb
81
82 binary: binary-indep binary-arch
83 .PHONY: build clean binary-arch binary-indep binary install configure