a7be06e479285b6063d84258aa05b6f994c824fc
1 #!/usr/bin/make -f
2 # debian/rules for cadaver
3 #
4 # Written by Sebastian Harl <sh@tokkee.org>.
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14 CFLAGS = -Wall -g
16 BUILDDIR = ./debian/build/
18 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
19 CFLAGS += -O0
20 else
21 CFLAGS += -O2
22 endif
24 $(BUILDDIR)/config.status: configure
25 dh_testdir
27 for file in config.guess config.sub; do \
28 mv $$file $$file.upstream; \
29 ln -s /usr/share/misc/$$file .; \
30 done
32 [ -e $(BUILDDIR) ] || mkdir $(BUILDDIR)
33 cd $(BUILDDIR) && CFLAGS="$(CFLAGS)" ../../configure \
34 --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
35 --prefix=/usr --mandir=\$${prefix}/share/man \
36 --enable-warnings --enable-netrc --with-ssl=gnutls
38 build: build-stamp
40 build-stamp: $(BUILDDIR)/config.status
41 dh_testdir
42 dh_clean
44 cp -r ./src/ $(BUILDDIR)
45 $(MAKE) -C $(BUILDDIR)
47 touch build-stamp
49 clean:
50 dh_testdir
51 dh_testroot
52 rm -f build-stamp
54 rm -rf $(BUILDDIR)
55 rm -f po/*.gmo
57 for file in config.guess config.sub; do \
58 if [ -e $$file.upstream ]; then \
59 rm -f $$file; \
60 mv $$file.upstream $$file; \
61 fi \
62 done
64 dh_clean
66 install: build
67 dh_testdir
68 dh_testroot
69 dh_clean -k
70 dh_installdirs
72 $(MAKE) -C $(BUILDDIR) install prefix=$(CURDIR)/debian/cadaver/usr
74 binary-indep:
75 # nothing to do here
77 binary-arch: build install
78 dh_testdir
79 dh_testroot
80 dh_installchangelogs -a ChangeLog
81 dh_installdocs -a BUGS FAQ INTEROP NEWS README THANKS TODO
82 dh_installmenu -a
83 dh_installman -a
84 dh_link -a
85 dh_strip -a
86 dh_compress -a
87 dh_fixperms -a
88 dh_installdeb -a
89 dh_shlibdeps -a
90 dh_gencontrol -a
91 dh_md5sums -a
92 dh_builddeb -a
94 binary: binary-indep binary-arch
95 .PHONY: build clean install binary-indep binary-arch binary