#! /bin/sh ## mkpkg.debian -- create a native package ## Time-stamp: "2007-07-04 11:58:12 bkorb" ## ## This file is part of AutoGen. ## AutoGen copyright (c) 1992-2007 Bruce Korb - all rights reserved ## ## AutoGen is free software: you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by the ## Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## AutoGen is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ## See the GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License along ## with this program. If not, see . ## --------------------------------------------------------------------- ## $Id: mkpkg.debian,v 4.7 2007/07/04 20:51:19 bkorb Exp $ ## --------------------------------------------------------------------- ## Code: if test -z "${top_builddir}" then # this script is likely being invoked on a freshly unrolled tarball # subdir=$(set -- autogen[-_]*/pkg/mkpkg.debian test -f ${1} && echo ${1%/pkg/mkpkg.debian} ) if test -d "${subdir}" then cd ${subdir} else while test ! -f pkg/mkpkg.debian do cd .. test ${PWD} = / && echo cannot locate pkt/mkpkg.debian && exit 1 done fi top_builddir=${PWD} top_srcdir=${PWD} srcdir=${PWD}/pkg builddir=${PWD}/pkg . ./VERSION PACKAGE_BUGREPORT="${EADDR}" PACKAGE_NAME="${PACKAGE}" PACKAGE_STRING="${PACKAGE} ${AG_VERSION}" PACKAGE_TARNAME=autogen PACKAGE_VERSION="${AG_VERSION}" else builddir=$(pwd) cd ${top_builddir} || exit 1 fi debver=$(echo ${PACKAGE_VERSION} | sed 's/pre/~pre/') if test ! -f ../autogen_${debver}.orig.tar.gz then if test -f ../autogen?${PACKAGE_VERSION}.tar.gz then ln ../autogen?${PACKAGE_VERSION}.tar.gz \ ../autogen_${debver}.orig.tar.gz else ${MAKE:-make} dist || exit 1 mv autogen-${PACKAGE_VERSION}.tar.gz \ ../autogen_${debver}.orig.tar.gz || exit 1 fi fi set -e test -d debian || mkdir debian cd debian exec 3> copyright cat >&3 <<- _EOF_ This package was debianized by James R. Van Zandt on Fri, 18 Jun 1999 21:23:48 -0400. The current maintainer is Matt Kraai . It was downloaded from http://osdn.dl.sourceforge.net/autogen/autogen-${AG_VERSION}.tar.gz. Copyright & Licensing: _EOF_ ( sed -n '/AutoGen copyright/,/^ \*\//p;50q' ${top_srcdir}/agen5/autogen.c echo >&3 sed -n '/Automated Options copyright/,/^ \*\//p;100q' \ ${top_srcdir}/autoopts/autoopts.c ) | grep -v '^ \*/$' >&3 cat >&3 <<- _EOF_ On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in '/usr/share/common-licenses/GPL'. _EOF_ exec 3>&- cp ${top_srcdir}/pkg/debian/* . case "$(set -o | egrep '^xtrace')" in ( *on ) sedcmd='s/.* DH_VERBOSE=.*/export DH_VERBOSE=1/' ;; ( *off) sedcmd='s/.* DH_VERBOSE=.*/#export DH_VERBOSE=0/' ;; esac argchk=$(texi2html -split=chapter -subdir=html --help 2>&1 1>/dev/null) test -n "${argchk}" && \ sedcmd="${sedcmd};"'s/-split=chapter -subdir=html *//' sed "${sedcmd}" rules > XX mv -f XX rules chmod a+x rules cd .. fakeroot dpkg-buildpackage -d ## Local Variables: ## mode: shell-script ## indent-tabs-mode: nil ## sh-indentation: 2 ## sh-basic-offset: 2 ## End: ## mkpkg.debian ends here