- $(checkdir)
- rm -f build
- -$(MAKE) -i distclean
- rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars
-
-binary-indep: checkroot build
- $(checkdir)
-# There are no architecture-independent files to be uploaded
-# generated by this package. If there were any they would be
-# made here.
-
-binary-arch: checkroot build
- $(checkdir)
- rm -rf debian/tmp
- install -d debian/tmp/DEBIAN\
- -d debian/tmp/usr/share/doc/$(package)
- install -m 755 debian/postinst debian/prerm debian/tmp/DEBIAN
- install -m 644 debian/shlibs debian/tmp/DEBIAN
- $(MAKE) prefix=`pwd`/debian/tmp/usr install
- install -m 644 doc/*.html debian/tmp/usr/share/doc/$(package)
- install -m 644 doc/*.ps debian/tmp/usr/share/doc/$(package)
- install -m 644 doc/*.txt debian/tmp/usr/share/doc/$(package)
- gzip debian/tmp/usr/share/doc/$(package)/*.ps
- gzip debian/tmp/usr/share/doc/$(package)/*.txt
- cp debian/copyright debian/tmp/usr/share/doc/$(package)/.
- cp debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian
- cp CHANGELOG debian/tmp/usr/share/doc/$(package)/changelog
- strip --strip-debug debian/tmp/usr/lib/*.a
- strip --strip-unneeded debian/tmp/usr/lib/lib*.so.$(version)
- dpkg-shlibdeps debian/tmp/usr/bin/yaz-client debian/tmp/usr/bin/yaz-ztest
- dpkg-gencontrol
- chown -R root.root debian/tmp
- chmod -R g-ws debian/tmp
- dpkg --build debian/tmp ..
-
-define checkdir
- test -f debian/rules
-endef
-
-# Below here is fairly generic really
-
-binary: binary-indep binary-arch
-
-checkroot:
- $(checkdir)
- test root = "`whoami`"
-
-.PHONY: binary binary-arch binary-indep clean checkroot
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+
+ # Add here commands to clean up after the build process.
+ -$(MAKE) distclean
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+ -cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+ -cp -f /usr/share/misc/config.guess config.guess
+endif
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/tmp
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ cp LICENSE debian/copyright
+ dh_installdocs -A README
+ dh_installchangelogs
+ dh_installexamples
+ mv debian/tmp/usr/share/doc/yaz debian/tmp/usr/share/doc/yaz-doc
+ dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_python
+ dh_makeshlibs -V 'libyaz4 (>= 4.0.4)'
+ dh_installdeb
+ dh_shlibdeps -l debian/libyaz4/usr/lib
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install