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 include /usr/share/dpatch/dpatch.make
26 $(BUILDDIR)/config.status: configure
27 dh_testdir
28 [ -e $(BUILDDIR) ] || mkdir $(BUILDDIR)
29 cd $(BUILDDIR) && CFLAGS="$(CFLAGS)" ../../configure \
30 --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
31 --prefix=/usr --mandir=\$${prefix}/share/man \
32 --enable-warnings --enable-netrc --without-ssl
34 build: build-stamp
36 build-stamp: $(BUILDDIR)/config.status patch
37 dh_testdir
38 dh_clean
40 cp -r ./src/ $(BUILDDIR)
41 $(MAKE) -C $(BUILDDIR)
43 touch build-stamp
45 clean: unpatch
46 dh_testdir
47 dh_testroot
48 rm -f build-stamp
50 rm -rf $(BUILDDIR)
52 dh_clean
54 install: build
55 dh_testdir
56 dh_testroot
57 dh_clean -k
58 dh_installdirs
60 $(MAKE) -C $(BUILDDIR) install prefix=$(CURDIR)/debian/cadaver/usr
62 binary-indep:
63 # nothing to do here
65 binary-arch: build install
66 dh_testdir
67 dh_testroot
68 dh_installchangelogs -a ChangeLog
69 dh_installdocs -a BUGS FAQ INTEROP NEWS README THANKS TODO
70 dh_installmenu -a
71 dh_installman -a
72 dh_link -a
73 dh_strip -a
74 dh_compress -a
75 dh_fixperms -a
76 dh_installdeb -a
77 dh_shlibdeps -a
78 dh_gencontrol -a
79 dh_md5sums -a
80 dh_builddeb -a
82 binary: binary-indep binary-arch
83 .PHONY: build clean install binary-indep binary-arch binary