missed one!
[debian/atlc] / debian / rules
1 #!/usr/bin/make -f
2
3 # This has to be exported to make some magic below work.
4 export DH_OPTIONS
5
6 # These are used for cross-compiling and for saving the configure script
7 # from having to guess our platform (since we know it already)
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
11
12 CFLAGS = -Wall -g -O2
13
14 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
15         INSTALL_PROGRAM += -s
16 endif
17
18 config.status: configure
19         dh_testdir
20         cp -f /usr/share/misc/config.sub config.sub
21         cp -f /usr/share/misc/config.guess config.guess
22         ./configure \
23                 --host=$(DEB_HOST_GNU_TYPE) \
24                 --build=$(DEB_BUILD_GNU_TYPE) \
25                 --prefix=/usr \
26                 --docdir=\$${prefix}/share/doc/atlc \
27                 --mandir=\$${prefix}/share/man \
28                 --infodir=\$${prefix}/share/info \
29                 --enable-hardware-info
30
31 build:  build-arch build-indep
32 build-arch:     build-stamp
33 build-indep:    build-stamp
34 build-stamp:    config.status
35         dh_testdir
36         $(MAKE)
37         $(MAKE) check
38         touch build-stamp
39
40 clean:
41         dh_testdir
42         dh_testroot
43         rm -f build-stamp config-stamp
44
45         [ ! -f Makefile ] || $(MAKE) distclean
46         rm -rf tmp
47
48         dh_clean
49
50 install: 
51         dh_testdir
52         dh_testroot
53         dh_prep 
54         dh_installdirs 
55         
56         $(MAKE) install DESTDIR=$(CURDIR)/debian/atlc
57         mv debian/atlc/usr/share/atlc/examples \
58                 debian/atlc-examples/usr/share/atlc/examples
59         rm debian/atlc-examples/usr/share/atlc/examples/create_for_Makefile.am
60
61         dh_install
62
63 binary-indep: build install
64         dh_testdir
65         dh_testroot
66         dh_installchangelogs -i ChangeLog
67         dh_installdocs -i
68         dh_installman -i
69         dh_link -i
70         dh_strip -i
71         dh_compress  -i
72         dh_fixperms -i
73         dh_installdeb -i
74         dh_gencontrol -i
75         dh_md5sums -i
76         dh_builddeb -i
77
78 binary-arch: build install
79         dh_testdir
80         dh_testroot
81         dh_installchangelogs -a ChangeLog
82         dh_installdocs -a
83         mv debian/atlc/usr/share/atlc/docs/* debian/atlc/usr/share/doc/atlc
84         rm -rf debian/atlc/usr/share/atlc
85         dh_installman -a
86         dh_link -a
87         dh_strip -a
88         dh_compress  -a
89         dh_fixperms -a
90         dh_installdeb -a
91         dh_shlibdeps -a
92         dh_gencontrol -a
93         dh_md5sums -a
94         dh_builddeb -a
95
96 binary: binary-arch binary-indep
97 .PHONY: build clean binary-indep binary-arch binary install