import load-applet 0.46-1
[cpumem-applet] / 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         $(MAKE)
40         touch build-stamp
41
42 clean:
43         dh_testdir
44         dh_testroot
45         rm -f build-stamp 
46         [ ! -f Makefile ] || $(MAKE) distclean
47 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
48         cp -f /usr/share/misc/config.sub config.sub
49 endif
50 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
51         cp -f /usr/share/misc/config.guess config.guess
52 endif
53         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
54         dh_clean 
55
56 install: build
57         dh_testdir
58         dh_testroot
59         dh_clean -k 
60         dh_installdirs
61         $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
62         dh_movefiles
63
64 binary-indep: build install
65
66 binary-arch: build install
67         dh_testdir
68         dh_testroot
69         dh_installchangelogs
70         dh_installdocs
71         dh_install -v --sourcedir=debian/tmp
72         dh_link
73         dh_strip --dbg-package=load-applet
74         dh_compress
75         dh_fixperms
76         dh_makeshlibs -V
77         dh_installdeb
78         dh_shlibdeps
79         dh_gencontrol
80         dh_md5sums
81         dh_builddeb
82
83 binary: binary-indep binary-arch
84 .PHONY: build clean binary-indep binary-arch binary install