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 $(DPATCH_STAMPFN)
27 dh_testdir
28 [ -e $(BUILDDIR) ] || mkdir $(BUILDDIR)
29 cd $(BUILDDIR) && CFLAGS="$(CFLAGS)" ../../configure \
30 --host=$(DEB_HOST_GNU_TYPE) \
31 --build=$(DEB_BUILD_GNU_TYPE) \
32 --prefix=/usr
34 build: build-stamp
36 build-stamp: $(BUILDDIR)/config.status
37 dh_testdir
39 $(MAKE) -C $(BUILDDIR)
41 touch build-stamp
43 clean: unpatch
44 dh_testdir
45 dh_testroot
46 rm -f build-stamp
48 rm -rf $(BUILDDIR)
50 dh_clean
52 install: build
53 dh_testdir
54 dh_testroot
55 dh_clean -k
57 $(MAKE) -C $(BUILDDIR) install DESTDIR=$(CURDIR)/debian/fusedav
59 binary-indep:
60 # nothing to do here
62 binary-arch: build install
63 dh_testdir
64 dh_testroot
65 dh_installchangelogs
66 dh_installdocs README
67 dh_installman debian/fusedav.1
68 dh_link
69 dh_strip
70 dh_compress
71 dh_fixperms
72 dh_installdeb
73 dh_shlibdeps
74 dh_gencontrol
75 dh_md5sums
76 dh_builddeb
78 binary: binary-indep binary-arch
79 .PHONY: build clean binary-indep binary-arch binary install