simplify things
[cell-modem-ui] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 #export DH_VERBOSE=1
5
6 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
7 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
8
9 CFLAGS = -Wall -g
10
11 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12         CFLAGS += -O0
13 else
14         CFLAGS += -O2
15 endif
16 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
17         INSTALL_PROGRAM += -s
18 endif
19
20 config.status: configure
21         dh_testdir
22 #       CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --exec-prefix=/usr
23
24 configure: configure-stamp
25
26 configure-stamp:
27 #       libtoolize --automake
28 #       aclocal-1.7 || aclocal
29 #       autoconf
30 #       autoheader
31 #       automake-1.7 --add-missing --foreign || automake --add-missing> --foreign
32         touch configure-stamp
33
34
35 build: build-stamp
36
37 build-stamp:  config.status
38         dh_testdir
39         touch build-stamp
40
41 clean:
42         dh_testdir
43         dh_testroot
44         rm -f build-stamp 
45         [ ! -f Makefile ] || $(MAKE) distclean
46 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
47         cp -f /usr/share/misc/config.sub config.sub
48 endif
49 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
50         cp -f /usr/share/misc/config.guess config.guess
51 endif
52         rm -f configure COPYING INSTALL Makefile.in aclocal.m4 configure-stamp build-stamp config.guess config.sub depcomp install-sh ltmain.sh missing mkinstalldirs config.h.in
53         dh_clean 
54
55 install: build
56         dh_testdir
57         dh_testroot
58         dh_clean -k 
59         dh_installdirs
60         mkdir -p $(CURDIR)/debian/tmp/etc/systemui/
61         cp $(CURDIR)/etc/systemui/*.xml $(CURDIR)/debian/tmp/etc/systemui/
62
63 binary-indep: build install
64
65 binary-arch: build install
66         dh_testdir
67         dh_testroot
68         dh_installchangelogs
69         dh_installdocs
70         dh_install -v --sourcedir=debian/tmp
71         dh_link
72         dh_strip --dbg-package=cell-modem-ui
73         dh_compress
74         dh_fixperms
75         dh_makeshlibs -V
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-indep binary-arch binary install