f1943e50da9f816d72e73733a2c6e41e234391c8
[sbrightapplet] / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # This file was originally written by Joey Hess and Craig Small.
4
5 #export DH_VERBOSE=1
6
7
8 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
9 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
10 DEB_BUILD_ARCH      ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
11
12 CFLAGS = -Wall -g
13
14 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
15         CFLAGS += -O0
16 else
17         CFLAGS += -O2
18 endif
19 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
20         INSTALL_PROGRAM += -s
21 endif
22
23 configure: configure-stamp
24 configure-stamp:
25         dh_testdir
26
27 #       ./autogen.sh
28         ./configure --enable-maintainer-mode --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
29
30         touch $@
31
32 build: build-stamp
33
34 build-stamp: configure-stamp
35         dh_testdir
36
37         $(MAKE)
38
39         touch $@
40
41 clean:
42         dh_testdir
43         dh_testroot
44         rm -f build-stamp configure-stamp
45
46 #       -./antigen.sh
47         -$(MAKE) clean
48
49         dh_clean 
50
51 install: build
52         dh_testdir
53         dh_testroot
54         dh_clean -k 
55         dh_installdirs
56
57         $(MAKE) DESTDIR=$(CURDIR)/debian/simple-brightness-applet install
58         find $(CURDIR)/debian/simple-brightness-applet -name "*.la" | xargs rm -f
59
60 binary-arch: build install
61         dh_testdir
62         dh_testroot
63         dh_installchangelogs
64         dh_installdocs
65         dh_link
66         dh_strip
67         dh_compress
68         dh_fixperms
69         dh_installdeb
70         dh_shlibdeps
71         dh_gencontrol
72         dh_md5sums
73         dh_builddeb
74
75 binary: binary-arch
76 .PHONY: build clean binary-arch binary install configure