From 12c55e7b4114d0263f90b8eb20ef67dcaf82d971 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 24 Sep 2001 21:47:30 +0000 Subject: [PATCH] Added Morten Garkier Hendriksens Debian build rules. --- debian/changelog | 18 ++--- debian/control | 13 --- debian/control.templ | 50 ++++++++++++ debian/copyright | 23 ------ debian/postinst | 2 - debian/prerm | 2 - debian/rules | 218 ++++++++++++++++++++++++++++++++++---------------- debian/shlibs | 2 - 8 files changed, 205 insertions(+), 123 deletions(-) delete mode 100644 debian/control create mode 100644 debian/control.templ delete mode 100644 debian/copyright delete mode 100755 debian/postinst delete mode 100644 debian/prerm delete mode 100644 debian/shlibs diff --git a/debian/changelog b/debian/changelog index b12057b..946b8c5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,14 +1,12 @@ -yaz (1.7-1) experimental; urgency=low - * Build in sub directory build instead of root directory. - - -- Adam Dickmeiss Wed, 06 Jun 2001 22:33:00 +0200 +yaz (1.7-CVS20010507) unstable; urgency=low -yaz (1.7) experimental; urgency=low - * Initial version. + * New upstream - -- Adam Dickmeiss Mon, 28 May 2001 14:42:18 +0200 + -- Morten Garkier Hendriksen Mon, 7 May 2001 15:41:54 +0200 -Local variables: -mode: debian-changelog -End: +yaz (1.7-1) unstable; urgency=low + + * First debian package + + -- Morten Garkier Hendriksen Sat, 27 Jan 2001 19:09:57 +0100 diff --git a/debian/control b/debian/control deleted file mode 100644 index 2dd8157..0000000 --- a/debian/control +++ /dev/null @@ -1,13 +0,0 @@ -Source: yaz -Section: libs -Priority: optional -Maintainer: Adam Dickmeiss -Standards-Version: 1.7 - -Package: yaz -Architecture: any -Depends: ${shlibs:Depends} -Provides: yaz -Description: Z39.50 library - YAZ is a library implementing the Z39.50 protocol - for information retrieval. diff --git a/debian/control.templ b/debian/control.templ new file mode 100644 index 0000000..ef17703 --- /dev/null +++ b/debian/control.templ @@ -0,0 +1,50 @@ +Source: yaz +Standards-Version: ${Source-Version} +Maintainer: Morten Garkier Hendriksen +Priority: extra + +Package: yaz-doc +Section: devel +Architecture: any +Description: The YAZ Z39.50 toolkit (documentation) + The YAZ-toolkit is a C-toolkit for building + origins and/or targets using the Z39.50 protocol for + information retrieval. + . + YAZ supports a substantial subset of the Z39.50 standard + and features a SSL protocol layer as an option. + . + YAZ is made by the danish software company Index Data + and further information is available at http://www.indexdata.dk/ + +Package: @YAZ_RUNTIME@ +Section: libs +Architecture: any +Depends: ${shlibs:Depends} +Description: The YAZ Z39.50 toolkit (runtime files) + The YAZ-toolkit is a C-toolkit for building + origins and/or targets using the Z39.50 protocol for + information retrieval. + . + YAZ supports a substantial subset of the Z39.50 standard + and features a SSL protocol layer as an option. + . + YAZ is made by the danish software company Index Data + and further information is available at http://www.indexdata.dk/ + +Package: @YAZ_DEVEL@ +Depends: @YAZ_RUNTIME@, ${shlibs:Depends} +Section: devel +Architecture: any +Recommends: yaz-doc +Description: The YAZ Z39.50 toolkit (development files) + The YAZ-toolkit is a C-toolkit for building + origins and/or targets using the Z39.50 protocol for + information retrieval. + . + YAZ supports a substantial subset of the Z39.50 standard + and features a SSL protocol layer as an option. + . + YAZ is made by the danish software company Index Data + and further information is available at http://www.indexdata.dk/ + diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index 2e74316..0000000 --- a/debian/copyright +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 1995-2000, Index Data. - -Permission to use, copy, modify, distribute, and sell this software and -ts documentation, in whole or in part, for any purpose, is hereby granted, -provided that: - -1. This copyright and permission notice appear in all copies of the -software and its documentation. Notices of copyright or attribution -which appear at the beginning of any file must remain unchanged. - -2. The names of Index Data or the individual authors may not be used to -endorse or promote products derived from this software without specific -prior written permission. - -THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, -EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL, -INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR -NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -OF THIS SOFTWARE. diff --git a/debian/postinst b/debian/postinst deleted file mode 100755 index d37118b..0000000 --- a/debian/postinst +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -set -e diff --git a/debian/prerm b/debian/prerm deleted file mode 100644 index d37118b..0000000 --- a/debian/prerm +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -set -e diff --git a/debian/rules b/debian/rules index c260d65..c4a7a6e 100755 --- a/debian/rules +++ b/debian/rules @@ -1,75 +1,151 @@ #!/usr/bin/make -f -# Debian rules for YAZ -# $Id: rules,v 1.2 2001-06-13 20:47:40 adam Exp $ -# -# Modified from: -# Sample debian/rules file - for GNU Hello (1.3). -# Copyright 1994,1995 by Ian Jackson. -# I hereby give you perpetual unlimited permission to copy, -# modify and relicense this file, provided that you do not remove -# my name from the file itself. (I assert my moral right of -# paternity under the Copyright, Designs and Patents Act 1988.) -# This file may have to be extensively modified - -package=yaz -soversion=1.0.0 - -build: - $(checkdir) +# Sample debian/rules that uses debhelper. +# GPL copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=1 + +export YAZ_WITH_SSL=1 +CONFIG_FLAGS=--enable-static --enable-shared --enable-tcpd --prefix=/usr + +# Enable parallel builds if CONCURRENCY_LEVEL is set +ifdef CONCURRENCY_LEVEL +MCFLAGS=-j$(CONCURRENCY_LEVEL) +else +MCFLAGS= +endif + +ifeq ($(YAZ_WITH_SSL),1) +BUILD_SSL=1 +SSL_FLAGS=--with-openssl +DEVEL_NAME=yaz-devel-ssl +RUNTIME_NAME=yaz-runtime-ssl +else +SSL_FLAGS= +DEVEL_NAME=yaz-devel +RUNTIME_NAME=yaz-runtime +endif + +ifdef DEB_YAZ_USE_CVS +YAZSRCDIR=$(shell pwd) +YAZ_VERSION=$(shell date -r$(YAZSRCDIR)/CVS +"CVS%Y%m%d") +else +YAZSRCDIR=$(shell pwd) +YAZ_VERSION=1.7 +endif + +configure: stamp-configure +stamp-configure: +ifeq ($(BUILD_SSL),1) + cat debian/control.templ | sed -e "s/@YAZ_RUNTIME@/yaz-runtime-ssl/g; s/@YAZ_DEVEL@/yaz-devel-ssl/g; s/@YAZ_VERSION@/$(YAZ_VERSION)/g" > debian/control +else + cat debian/control.templ | sed -e "s/@YAZ_RUNTIME@/yaz-runtime/g; s/@YAZ_DEVEL@/yaz-devel/g; s/@YAZ_VERSION@/$(YAZ_VERSION)/g" > debian/control +endif + touch stamp-configure + dh_testdir + + -rm -rf build mkdir build - cd build; ../configure --prefix=/usr --enable-shared - cd build; $(MAKE) CFLAGS=-O2 - cd build/doc; $(MAKE) CFLAGS=-O2 - touch build + cd build; $(YAZSRCDIR)/configure $(CONFIG_FLAGS) $(SSL_FLAGS) + +ifdef DEB_YAZ_USE_CVS + @echo "Now configured for using YAZ-CVS checkout with datestamp $(YAZ_VERSION)" +endif + + +build: stamp-build +stamp-build: stamp-configure + dh_testdir + + # Add here commands to compile the package. + $(MAKE) -C build $(MCFLAGS) + + touch stamp-build clean: - $(checkdir) - rm -rf build - 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 - cd build; $(MAKE) prefix=`pwd`/../debian/tmp/usr install - if test -f doc/yaz.txt; then \ - install -m 644 doc/*.html doc/*.ps doc/*.txt debian/tmp/usr/share/doc/$(package); \ - else \ - install -m 644 build/doc/*.html build/doc/*.ps build/doc/*.txt debian/tmp/usr/share/doc/$(package); \ - fi - 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.$(soversion) - cp debian/shlibs debian/shlibs.local - 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 +ifeq ($(BUILD_SSL),1) + cat debian/control.templ | sed -e "s/@YAZ_RUNTIME@/yaz-runtime-ssl/g; s/@YAZ_DEVEL@/yaz-devel-ssl/g; s/@YAZ_VERSION@/$(YAZ_VERSION)/g" > debian/control +else + cat debian/control.templ | sed -e "s/@YAZ_RUNTIME@/yaz-runtime/g; s/@YAZ_DEVEL@/yaz-devel/g; s/@YAZ_VERSION@/$(YAZ_VERSION)/g" > debian/control +endif + dh_testdir + #dh_testroot + -rm -f stamp-* + -rm -rf build + + dh_clean + -rm -rf debian/yaz-runtime debian/yaz-runtime-ssl debian/yaz-devel \ + debian/with-ssl debian/*.debhelper debian/substvars debian/shlibs.yaz-* + +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 +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_movefiles -p $(DEVEL_NAME) usr/share/aclocal usr/lib/*.a usr/include usr/bin + dh_movefiles -p $(RUNTIME_NAME) usr/lib usr/share/yaz + dh_installexamples -p $(DEVEL_NAME) + + dh_installdocs -p yaz-doc doc/ + dh_installdocs --all README TODO LICENSE CHANGELOG + dh_installchangelogs + dh_link + dh_strip + dh_compress -a + dh_fixperms -a + +ifeq ($(BUILD_SSL),1) + dh_installdeb -a + #dh_makeshlibs -p $(RUNTIME_NAME) -V'libyaz 1 yaz-runtime-ssl' -V'libyazthread 1 yaz-runtime-ssl' + dh_shlibdeps -p $(RUNTIME_NAME) -- debian/$(RUNTIME_NAME)/usr/lib/*.so + dh_shlibdeps -p $(DEVEL_NAME) -- debian/$(DEVEL_NAME)/usr/bin/* + echo "libyaz 1 $(RUNTIME_NAME)" > debian/$(RUNTIME_NAME)/DEBIAN/shlibs + echo "libyazthread 1 $(RUNTIME_NAME)" >> debian/$(RUNTIME_NAME)/DEBIAN/shlibs + chmod 644 debian/$(RUNTIME_NAME)/DEBIAN/shlibs + +# dh_shlibdeps -a -- debian/yaz-runtime-ssl/usr/lib/*.so debian/yaz-runtime-ssl/usr/bin/* + dh_gencontrol -p $(DEVEL_NAME) -u-DDepends="$(RUNTIME_NAME)" + dh_gencontrol -p $(RUNTIME_NAME) -u-DConflicts=yaz-runtime + dh_gencontrol -a + +else + dh_installdeb -a + + #dh_makeshlibs -p $(RUNTIME_NAME) -V'libyaz 1 yaz-runtime' -V'libyazthread 1 yaz-runtime' + dh_makeshlibs -p $(RUNTIME_NAME) + dh_shlibdeps -a + + dh_gencontrol -a + dh_gencontrol -p $(RUNTIME_NAME) -u-DConflicts=yaz-runtime-ssl +endif + dh_md5sums -a + # 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 yaz-doc + -rm -rf debian/tmp/usr/include debian/tmp/usr/share/aclocal debian/tmp/usr/lib debian/tmp/usr/bin \ + debian/tmp/usr/share/yaz + + dh_builddeb + + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install install-stamp diff --git a/debian/shlibs b/debian/shlibs deleted file mode 100644 index 3893d87..0000000 --- a/debian/shlibs +++ /dev/null @@ -1,2 +0,0 @@ -libyaz 1 yaz (>= 1.0.0) -libyazthread 1 yaz (>= 1.0.0) -- 1.7.10.4