1 #!/usr/bin/make -f
2 # debian/rules for fusedav
3 #
4 # Written by Sebastian Harl <tokkee@debian.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 (,$(filter 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 patch
27 dh_testdir
28 [ -e $(BUILDDIR) ] || mkdir $(BUILDDIR)
29 touch aclocal.m4 configure config.h.in Makefile.in
30 cd $(BUILDDIR) && CFLAGS="$(CFLAGS)" ../../configure \
31 --host=$(DEB_HOST_GNU_TYPE) \
32 --build=$(DEB_BUILD_GNU_TYPE) \
33 --prefix=/usr
35 build: build-stamp
37 build-stamp: $(BUILDDIR)/config.status
38 dh_testdir
40 $(MAKE) -C $(BUILDDIR)
42 touch build-stamp
44 clean: unpatch
45 dh_testdir
46 dh_testroot
47 rm -f build-stamp
49 rm -rf $(BUILDDIR)
51 dh_clean
53 install: build
54 dh_testdir
55 dh_testroot
56 dh_clean -k
58 $(MAKE) -C $(BUILDDIR) install DESTDIR=$(CURDIR)/debian/fusedav
60 binary-indep:
61 # nothing to do here
63 binary-arch: build install
64 dh_testdir
65 dh_testroot
66 dh_installchangelogs
67 dh_installdocs README
68 dh_installman debian/fusedav.1
69 dh_link
70 dh_strip
71 dh_compress
72 dh_fixperms
73 dh_installdeb
74 dh_shlibdeps
75 dh_gencontrol
76 dh_md5sums
77 dh_builddeb
79 binary: binary-indep binary-arch
80 .PHONY: build clean binary-indep binary-arch binary install