Upgrade to debhelper version 7
[idzebra-moved-to-github.git] / debian / rules
index 3ae0a83..855c989 100755 (executable)
 #!/usr/bin/make -f
-# 
-# Script for building Zebra from source to .deb-packages.
-#
-# Created by Adam Dickmeiss, based on script by
-# Morten Hendriksen <mgh@dbc.dk>  and from Joey Hess.
+export DH_VERBOSE=1
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+%:
+       dh $@ --without python-support
 
-# This is the debhelper compatability version to use.
-export DH_COMPAT=2
+override_dh_auto_configure:
+       dh_auto_configure -- \
+               --with-yaz=/usr/bin \
+               --with-tclconfig=/usr/lib/tcl8.5
 
-CONFIG_FLAGS=--with-tclconfig=/usr/lib/tcl8.3 --with-yazconfig=/usr/bin --prefix=/usr
+override_dh_auto_test:
+       true
 
-# Enable parallel builds if CONCURRENCY_LEVEL is set
-ifdef CONCURRENCY_LEVEL
-MCFLAGS=-j$(CONCURRENCY_LEVEL)
-else
-MCFLAGS=
-endif
+override_dh_strip:
+       dh_strip --dbg-package=idzebra-2.0-dbg
 
-ZEBRA_VERSION=1.3.2
-ZEBRASRCDIR?=$(shell pwd)
-# If this is not IndexData's release, then it is a cvs-checkout. Go cheat!
-#   YAZ_VERSION:=$(YAZ_VERSION)-$(shell date -r$(YAZSRCDIR)/CVS +"CVS%Y%m%d")
-export ZEBRA_VERSION
+override_dh_makeshlibs:
+       dh_makeshlibs -V 'libidzebra-2.0 (>= 2.0.20)' -X mod-
 
-# Local library path for linking with right dependencies
-LOCAL_LINK=-ldebian/idzebra/usr/lib
+override_dh_installlogrotate:
+       dh_installlogrotate --name=zebrasrv
 
-$(ZEBRASRCDIR)/configure: $(ZEBRASRCDIR)/configure.in
-       cd $(ZEBRASRCDIR); sh buildconf.sh
+override_dh_installinit:
+       dh_installinit --name=zebrasrv
 
-stamp-configure: $(ZEBRASRCDIR)/configure
-       dh_testdir
-
-       -rm -rf build
-       mkdir build
-       cd build; $(ZEBRASRCDIR)/configure $(CONFIG_FLAGS)
-       touch stamp-configure
-
-build: stamp-build
-stamp-build: stamp-configure
-       dh_testdir
-
-       # Add here commands to compile the package.
-       $(MAKE) -C build $(MCFLAGS)
-
-       touch stamp-build
-
-clean:
-       dh_testdir
-       #dh_testroot
-       -rm -f stamp-*
-       -rm -rf build
-
-       dh_clean
-       -rm -rf debian/idzebra debian/*.debhelper debian/substvars
-
-install: stamp-install
-stamp-install: stamp-build
-       dh_testdir
-       dh_testroot
-       dh_clean -k -a
-       dh_installdirs -a
-
-       # Add here commands to install the package into debian/tmp.
-       -mkdirhier debian/tmp/usr
-       $(MAKE) -C build install prefix=`pwd`/debian/tmp/usr
-
-       touch stamp-install
-
-# Build architecture-independent files here.
-binary-indep: build install
-       dh_testdir
-       dh_testroot
-       dh_installdocs -p idzebra-doc doc/
-       dh_installchangelogs -p idzebra-doc
-       dh_link -p idzebra-doc
-       dh_strip -p idzebra-doc
-       dh_compress -p idzebra-doc
-       dh_fixperms -p idzebra-doc
-       dh_gencontrol -p idzebra-doc
-       dh_md5sums -p idzebra-doc
-
-       dh_builddeb -p idzebra-doc
-
-# Build architecture-dependent files here.
-binary-arch: build install
-       dh_testdir
-       dh_testroot
-       dh_movefiles -p idzebra usr/share/idzebra usr/bin
-
-       cp CHANGELOG changelog
-       dh_installdocs --all README TODO changelog debian/copyright
-
-       dh_installchangelogs
-       dh_link
-       dh_strip
-       dh_compress -a
-       dh_fixperms -a
-
-       dh_installdeb -p idzebra
-       dh_undocumented -p idzebra zebraidx.1 zebrasrv.1
-       dh_shlibdeps -p idzebra $(LOCAL_LINK) 
-
-       # Ugh Ugly hack
-       cat debian/postinst >> debian/idzebra/DEBIAN/postinst
-
-       dh_gencontrol -p idzebra
-       dh_md5sums -p idzebra
-
-       # Go kill those CVS-dirs before build
-       -find debian/tmp -type d -name CVS | xargs rm -rf
-       # For some reason it is necessary to remove empty-dirs in doc
-       -rm -rf debian/tmp/usr/include debian/tmp/usr/share/aclocal debian/tmp/usr/lib debian/tmp/usr/bin \
-               debian/tmp/usr/share/idzebra
-
-       dh_builddeb -p idzebra
-
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install install-stamp configure
-
-zebrarelease:
-       # Conveniency target for building zebra
-       dh_testdir
-       dpkg-buildpackage $(EXTRA_OPTS) -rfakeroot
+override_dh_installchangelogs:
+       dh_installchangelogs NEWS