]> arthur.barton.de Git - netatalk.git/blobdiff - distrib/debian/rules
Enhanced machine type
[netatalk.git] / distrib / debian / rules
index 2a8a7f45f62b7ac3e6871ab7664e146207c4e2f0..824b41dcebfebdc7ccd100a659d6257fd8c78183 100755 (executable)
@@ -1,9 +1,16 @@
 #! /usr/bin/make -f
 
+# Uncomment the following line to enable OpenSSL support. (If it's installed.)
+#USE_SSL=yes
+
+# Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+# This is the debhelper compatability version to use.
+export DH_COMPAT=3
+
 # support the DEB_BUILD_OPTIONS variable (partly stolen from gnome-utils)
-CFLAGS :=
+CFLAGS := -O2
 LDFLAGS :=
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
   CFLAGS += -g
@@ -12,57 +19,81 @@ endif
 export CFLAGS
 export LDFLAGS
 
-build: build-stamp
+CONFIGURE_FLAGS = \
+       --with-shadow --enable-fhs --sysconfdir=/etc/netatalk           \
+       --with-tcp-wrappers --mandir=/usr/share/man --prefix=/usr       \
+       --enable-timelord --enable-overwrite                            \
+       --with-cracklib=/var/cache/cracklib/cracklib_dict
+ifneq "x$(USE_SSL)" "xyes"
+CONFIGURE_FLAGS += --without-ssl-dir
+endif
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+
+       ./configure $(CONFIGURE_FLAGS)
+
+       touch configure-stamp
+
+build: configure-stamp build-stamp
 build-stamp:
        dh_testdir
 
-       ./configure --with-cflags=-O2 --with-shadow \
-               --enable-fhs --with-tcp-wrappers --enable-timelord
        $(MAKE)
 
        touch build-stamp
 
 clean:
        dh_testdir
-       rm -f build-stamp
-       -$(MAKE) distclean
-       dh_clean
+       dh_testroot
+       rm -f build-stamp configure-stamp
 
-binary: binary-arch binary-indep
+       -$(MAKE) distclean
 
-binary-indep: build
+       dh_clean
 
-binary-arch: build
+install: build
        dh_testdir
        dh_testroot
        dh_clean -k
        dh_installdirs
 
-       $(MAKE) install DESTDIR="`pwd`/debian/tmp" # CFLAGS="-Wall -O2"
+       $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+
+       # Manually move a file that would get installed in the wrong place.
+       mv debian/tmp/etc/netatalk/netatalk.conf debian/netatalk/etc/default/netatalk
+
+       # Install logcheck files
+       install -m 644 debian/logcheck/ignore.d.server debian/netatalk/etc/logcheck/ignore.d.server/netatalk
+       install -m 644 debian/logcheck/violations.ignore.d debian/netatalk/etc/logcheck/violations.ignore.d/netatalk
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       dh_movefiles
 
        dh_installdocs
+       dh_installexamples
        dh_installinit --update-rcd-params="defaults 50 50"
        dh_installman
        dh_undocumented
        dh_installchangelogs ChangeLog
-
-       # Manually remove a header file that is shipped with glibc and
-       # the Linux Kernel.
-       rm debian/tmp/usr/include/netatalk/at.h
-
-       dh_movefiles
-       rmdir debian/tmp/usr/include/atalk debian/tmp/usr/include/netatalk
-       rmdir debian/tmp/usr/include
-       rmdir debian/tmp/usr/share/aclocal
-       rmdir debian/tmp/usr/share/man/man3 debian/tmp/usr/share/man/man4
-
+       dh_link
        dh_strip
        dh_compress
        dh_fixperms
+       dh_makeshlibs
        dh_installdeb
        dh_shlibdeps
+       dh_perl
        dh_gencontrol
        dh_md5sums
        dh_builddeb
 
-.PHONY: clean binary binary-arch binary-indep
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure