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