Work in progress: new .deb build procedure.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@37788 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Ivan Vučica 2014-04-07 00:42:20 +00:00
parent c59186fe4c
commit befda337de
5 changed files with 357 additions and 145 deletions

View file

@ -1,3 +1,13 @@
2014-04-07 Ivan Vucica <ivan@vucica.net>
* Master/deb.make, bake_debian_files.sh: Rewrite of .deb-building
system that will produce both a source package and a binary package.
Work in progress; currently only gnustep-make itself builds correctly.
* GNUmakefile.in: Added the svn-export target which uses local files
to do the equivalent of 'make dist'. Switched to new way of building
.deb using bake_debian_files.sh.
* deb-equivs-control.template: No longer necessary; removed.
2014-03-27 Richard Frith-Macdonald <rfm@gnu.org>
* TestFramework/ObjectTesting.h: Add PASS_MATCH macro for matching

View file

@ -223,7 +223,7 @@ install: generated-files
$(INSTALL_PROGRAM) -m 755 "$(srcdir)/java-executable.template" "$(makedir)"; \
$(INSTALL_PROGRAM) -m 755 executable.template "$(makedir)"; \
$(INSTALL_DATA) "$(srcdir)/nsi-app.template" "$(makedir)"; \
$(INSTALL_DATA) "$(srcdir)/deb-equivs-control.template" "$(makedir)"; \
$(INSTALL_DATA) -m 755 "$(srcdir)/bake_debian_files.sh" "$(makedir)"; \
$(INSTALL_DATA) config-noarch.make "$(makedir)"; \
$(INSTALL_DATA) filesystem.make "$(makedir)"; \
$(INSTALL_DATA) config.make "$(makedir)/$(GNUSTEP_TARGET_LDIR)")
@ -301,7 +301,7 @@ uninstall:
rm -f "$(makedir)/app-wrapper.template"
rm -f "$(makedir)/java-executable.template"
rm -f "$(makedir)/nsi-app.template"
rm -f "$(makedir)/deb-equivs-control.template"
rm -f "$(makedir)/bake_debian_files.sh"
rm -f "$(GNUSTEP_SYSTEM_ROOT)/share/config.site"
rm -f "$(makedir)/config-noarch.make"
rm -f "$(makedir)/filesystem.make"
@ -334,6 +334,7 @@ distclean: clean
rm -f filesystem.make filesystem.sh filesystem.csh
rm -f gnustep-make.spec GNUstep.conf GNUstep-strict-v2.conf
rm -f config-precomp-test.out config-precomp-test.h.gch config-precomp-test.log
rm -f debian_dist/
docs:
(cd Documentation; $(MAKE))
@ -363,6 +364,15 @@ svn-snapshot:
tar --gzip -cf gnustep-make-$(GNUSTEP_MAKE_VERSION).tar.gz gnustep-make-$(GNUSTEP_MAKE_VERSION)
rm -rf gnustep-make-$(GNUSTEP_MAKE_VERSION)
svn-export:
@echo Note: any local changes are included.
svn export . \
gnustep-make-$(GNUSTEP_MAKE_VERSION)
tar --gzip -cf gnustep-make-$(GNUSTEP_MAKE_VERSION).tar.gz gnustep-make-$(GNUSTEP_MAKE_VERSION)
rm -rf gnustep-make-$(GNUSTEP_MAKE_VERSION)
dist: svn-export
cvs-tag:
cvs -z3 rtag make-$(VERTAG) make
@ -405,30 +415,17 @@ rpm: test-RPM_TOPDIR svn-dist
fi; \
$${rpmbuild} -ba gnustep-make.spec
deb: gnustep-make_$(GNUSTEP_MAKE_VERSION)_all.deb
deb: debian_dist/gnustep-make_$(GNUSTEP_MAKE_VERSION)_all.deb
gnustep-make_$(GNUSTEP_MAKE_VERSION)_all.deb: gnustep-make.debequivs
equivs-build gnustep-make.debequivs
-rm gnustep-make.debequivs
gnustep-make.debequivs:
-rm -rf /tmp/gsmake-deb
make install DESTDIR=/tmp/gsmake-deb
deb_infile=deb-equivs-control.template ; \
DEB_DOMAIN=System ; \
DEB_LOWERCASE_PACKAGE_NAME=gnustep-make ; \
PACKAGE_VERSION=$(GNUSTEP_MAKE_VERSION) ; \
DEB_ARCHITECTURE=all ; \
GNUSTEP_FILE_LIST=/tmp/gsmake-deb.list ; \
echo -n 'Files:' > $${GNUSTEP_FILE_LIST} ; \
find /tmp/gsmake-deb -type l -or -type f | sed 's,/tmp/gsmake-deb\(.*\)/\(.*\), /tmp/gsmake-deb\1/\2 \1,' >> $${GNUSTEP_FILE_LIST} ; \
sed -e :t \
-e "s,@gs_domain@,$${DEB_DOMAIN},;t t" \
-e "s,@gs_name@,$${DEB_LOWERCASE_PACKAGE_NAME},;t t" \
-e "s,@gs_version@,$${PACKAGE_VERSION},;t t" \
-e "s,@gs_arch@,$${DEB_ARCHITECTURE},;t t" \
-e "/@file_list@/{ r $${GNUSTEP_FILE_LIST}" -e "d}" \
$$deb_infile > gnustep-make.debequivs
debian_dist/gnustep-make_$(GNUSTEP_MAKE_VERSION)_all.deb: dist
-rm -rf debian_dist
mkdir -p debian_dist
cp gnustep-make-$(GNUSTEP_MAKE_VERSION).tar.gz debian_dist/gnustep-make_$(GNUSTEP_MAKE_VERSION).orig.tar.gz
cd debian_dist && tar xfz gnustep-make_$(GNUSTEP_MAKE_VERSION).orig.tar.gz
PACKAGE_NAME="gnustep-make" VERSION=$(GNUSTEP_MAKE_VERSION) DEB_MAINTAINER="GNUstep Developers <gnustep-dev@gnu.org>" DEB_ARCHITECTURE=all /bin/bash bake_debian_files.sh debian_dist/gnustep-make-$(GNUSTEP_MAKE_VERSION)/
printf "\noverride_dh_auto_configure:\n\tdh_auto_configure -- $(DEB_CONFIGURE_FLAGS)\n" >> debian_dist/gnustep-make-$(GNUSTEP_MAKE_VERSION)/debian/rules
cd debian_dist/gnustep-make-$(GNUSTEP_MAKE_VERSION)/ && debuild -us -uc
# rm -rf debian_dist/gnustep-make-$(GNUSTEP_MAKE_VERSION)
generated-files: GNUmakefile GNUstep.sh GNUstep.csh fixpath.sh config-noarch.make config.make \
openapp opentool gnustep-make.spec executable.template gnustep-config \

View file

@ -30,18 +30,6 @@
#
# Processor architecture is detected from output of $(CC) -dumpmachine.
# If $(CC) is not defined, gcc is used.
#
# NOTE! NOTE! NOTE!
# equivs-build 2.0.9 has a bug and will NOT work with absolute
# paths, which is something this version of deb.make depends on.
# See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662946
#
# Until the patch goes into upstream 'equivs', you will need to
# patch your /usr/bin/equivs-build manually. Find the line:
# $install_files{"$2/$1"} = $1;
# change it to:
# $install_files{"$2/".basename($1)} = $1;
#
# [1] Add - after common.make - the following lines in your GNUmakefile:
#
@ -59,85 +47,44 @@
# PACKAGE_NEEDS_CONFIGURE = yes
#
# in your makefile.
DEB_BUILD=equivs-build
# the GNUstep Debian packages always put things in, e.g. /GNUstep/System,
# so we need to match these regardless of the local filesystem layout
# Hackish way to get the installation dir/domain
DEB_DOMAIN=System
DEB_BASE=$(dir $(GNUSTEP_SYSTEM_ROOT))
ifeq ($(GNUSTEP_INSTALLATION_DOMAIN), LOCAL)
DEB_DOMAIN=Local
DEB_BASE=$(dir $(GNUSTEP_LOCAL_ROOT))
endif
# Which user would we install in? Use Local instead.
ifeq ($(GNUSTEP_INSTALLATION_DOMAIN), USER)
DEB_DOMAIN=Local
DEB_BASE=$(dir $(GNUSTEP_LOCAL_ROOT))
endif
ABS_OBJ_DIR=$(shell (cd "$(GNUSTEP_BUILD_DIR)"; pwd))/obj
GNUSTEP_FILE_LIST = $(ABS_OBJ_DIR)/package/file-list
REL_INSTALL_DIR=$(GNUSTEP_OBJ_DIR)/package/$(DEB_BASE)
ifeq ($(CC), )
CC=gcc
CC=cc
endif
DEB_ARCHITECTURE=$(shell (/bin/bash -c "$(CC) -dumpmachine | sed -e 's,\\([^-]*\\).*,\\1,g'"))
DEB_LOWERCASE_PACKAGE_NAME=$(shell (echo $(PACKAGE_NAME) | sed -e 's/\(.*\)/\L\1/'))
_DEB_ARCH=$(GNUSTEP_TARGET_CPU) # $(shell (/bin/bash -c "$(CC) -dumpmachine | sed -e 's,\\([^-]*\\).*,\\1,g'"))
_DEB_LOWERCASE_PACKAGE_NAME=$(shell (echo $(PACKAGE_NAME) | sed -e 's/\(.*\)/\L\1/'))
DEB_FILE_NAME=$(PACKAGE_NAME).debequivs
DEB_FILE=$(DEB_LOWERCASE_PACKAGE_NAME)_$(VERSION)_$(DEB_ARCHITECTURE).deb
DEB_TEMPLATE=$(GNUSTEP_MAKEFILES)/deb-equivs-control.template
DEB_IN=$(PACKAGE_NAME).control.in
_DEB_VERSION=$(PACKAGE_VERSION)
ifeq ($(_DEB_VERSION), )
_DEB_VERSION=$(VERSION)
endif
_DEB_ORIGTARNAME=$(_DEB_LOWERCASE_PACKAGE_NAME)_$(_DEB_VERSION)
_DEB_FILE=$(_DEB_TARNAME)_$(_DEB_ARCH).deb
# DEB_DESTINATION=\$$DOMDIR
DEB_DESTINATION=/GNUstep
_ABS_OBJ_DIR=$(shell (cd "$(GNUSTEP_BUILD_DIR)"; pwd))/obj
.PHONY: debfile deb deb_package_install deb_build_filelist
ifeq ($(DEB_BUILD_DEPENDS), )
DEB_BUILD_DEPENDS=gnustep-make (=$(GNUSTEP_MAKE_VERSION))
else
DEB_BUILD_DEPENDS=$(DEB_BUILD_DEPENDS), gnustep-make (=$(GNUSTEP_MAKE_VERSION))
endif
deb_package_install:
$(ECHO_NOTHING)if [ -d $(ABS_OBJ_DIR)/package ]; then \
rm -rf $(ABS_OBJ_DIR)/package; fi;$(END_ECHO)
$(ECHO_NOTHING)$(MAKE) DESTDIR=$(ABS_OBJ_DIR)/package deblist=yes install$(END_ECHO)
.PHONY: deb
#
# Target to build up the file lists
#
deb_build_filelist::
# Note: 'readlink -f PATH' is here in place of 'realpath'.
# While 'readlink' is not available everywhere, it's available under Debian,
# and that's what counts.
$(ECHO_NOTHING)rm -f $(GNUSTEP_FILE_LIST)$(END_ECHO)
$(ECHO_NOTHING)echo -n "Files:" > $(GNUSTEP_FILE_LIST)$(END_ECHO)
$(ECHO_NOTHING)find $(REL_INSTALL_DIR) -type l -or -type f | sed 's,'$(REL_INSTALL_DIR)'\(.*\)/\(.*\), '$(REL_INSTALL_DIR)'\1/\2 '$(DEB_DESTINATION)'/\1,' >> $(GNUSTEP_FILE_LIST)$(END_ECHO)
#
# The user will type `make debfile' to generate the equivs control file
#
debfile: $(DEB_FILE_NAME)
#
# This is the real target
#
$(DEB_FILE_NAME): deb_package_install deb_build_filelist
$(ECHO_NOTHING)echo "Generating the deb equivs control file..."$(END_ECHO)
$(ECHO_NOTHING)rm -f $@$(END_ECHO)
$(ECHO_NOTHING)if [ -f $(DEB_IN) ]; then \
deb_infile=${DEB_IN}; \
else \
deb_infile=${DEB_TEMPLATE}; fi; \
sed -e :t \
-e "s,@gs_domain@,$(DEB_DOMAIN),;t t" \
-e "s,@gs_name@,$(DEB_LOWERCASE_PACKAGE_NAME),;t t" \
-e "s,@gs_version@,$(PACKAGE_VERSION),;t t" \
-e "s,@gs_arch@,$(DEB_ARCHITECTURE),;t t" \
-e "/@file_list@/{ r ${GNUSTEP_FILE_LIST}" -e "d}" \
$$deb_infile > $@ \
$(END_ECHO)
deb: debfile
ifeq ($(_DEB_SHOULD_EXPORT), )
../$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz: dist
deb: ../$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
_DEB_SHOULD_EXPORT=1 make deb
else
# Export all variables, but only in explicit invocation of 'make deb'
export
deb:
$(ECHO_NOTHING)echo "Generating the deb package..."$(END_ECHO)
${DEB_BUILD} $(DEB_FILE_NAME)
-rm -rf $(_ABS_OBJ_DIR)/debian_dist
mkdir -p $(_ABS_OBJ_DIR)/debian_dist
cp ../$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz $(_ABS_OBJ_DIR)/debian_dist/$(_DEB_ORIGTARNAME).orig.tar.gz
cd $(_ABS_OBJ_DIR)/debian_dist && tar xfz $(_DEB_ORIGTARNAME).orig.tar.gz
/bin/bash $(GNUSTEP_MAKEFILES)/bake_debian_files.sh $(_ABS_OBJ_DIR)/debian_dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/
printf "\noverride_dh_auto_configure:\n\tdh_auto_configure -- $(DEB_CONFIGURE_FLAGS)\noverride_dh_auto_build:\n\tmake\n\tdh_auto_build\nbuild::\n\tmake" >> $(_ABS_OBJ_DIR)/debian_dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/debian/rules
cd $(_ABS_OBJ_DIR)/debian_dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ && debuild -us -uc
endif

293
bake_debian_files.sh Executable file
View file

@ -0,0 +1,293 @@
#!/bin/bash
# Copyright (C) 2014 Free Software Foundation, Inc.
#
# Author: Ivan Vucica <ivan@vucica.net>
#
# This file is part of the GNUstep Makefile Package.
#
# This library 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.
#
# You should have received a copy of the GNU General Public
# License along with this library; see the file COPYING.
# If not, write to the Free Software Foundation,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
if [ -z "${1}" ] ; then
echo "usage: "$(basename "${0}")" [source_code_directory]"
exit 1
fi
cd ${1} && destination="$(pwd)" && cd -
destination="${destination}"/debian
if mkdir -p "${destination}" ; then : else exit 1 ; fi
rm "${destination}"/control 2> /dev/null
rm "${destination}"/changelog 2> /dev/null
deb_lowercase_package_name=$(echo ${PACKAGE_NAME} | sed -e 's/\(.*\)/\L\1/')
if [ ! -z "${SVNPREFIX}" ] ; then
svn_path="${SVNPREFIX}"
fi
if [ ! -z "${SVN_BASE_URL}" ] && [ ! -z "${SVN_MODULE_NAME}" ] ; then
svn_path=${SVN_BASE_URL}/${SVN_MODULE_NAME}
fi
default_distribution="unstable"
distrib_id="$(grep DISTRIB_ID /etc/lsb-release | sed 's/DISTRIB_ID=\(.*\)$/\1/')"
if [[ "${distrib_id}" == "Ubuntu" ]] ; then
default_distribution=$(grep DISTRIB_CODENAME /etc/lsb-release | sed 's/DISTRIB_CODENAME=//')
fi
target_arch=${GNUSTEP_TARGET_CPU:-any}
if [[ "${target_arch}" -eq "i686" ]] ; then
target_arch=i386
elif [[ "${target_arch}" -eq "x86_64" ]] ; then
target_arch=amd64
fi
DEB_SOURCE=${DEB_SOURCE:-${deb_lowercase_package_name}}
DEB_PACKAGE=${DEB_PACKAGE:-${deb_lowercase_package_name}}
DEB_ARCHITECTURE=${DEB_ARCHITECTURE:-${target_arch}} #$(shell (/bin/bash -c "$(CC) -dumpmachine | sed -e 's,\\([^-]*\\).*,\\1,g'"))}
DEB_SECTION=${DEB_SECTION:-gnustep}
DEB_PRIORITY=${DEB_PRIORTY:-optional}
DEB_VCS_SVN=${DEB_VCS_SVN:-${svn_path}}
DEB_VERSION=${DEB_VERSION:-${PACKAGE_VERSION:-${VERSION}}}
if [ -z "${DEB_BUILD_DEPENDS}" ] ; then
DEB_BUILD_DEPENDS="debhelper (>= 9)"
else
DEB_BUILD_DEPENDS="${DEB_BUILD_DEPENDS}, debhelper (>= 9)"
fi
DEB_DEPENDS='${shlibs:Depends}, ${misc:Depends}'" ${DEB_DEPENDS}"
DEB_DISTRIBUTION=${DEB_DISTRIBUTION:-${default_distribution}}
# Attempt to extract information from a .spec or a .spec.in file.
if which python > /dev/null ; then
FN=$(python - << _EOF
# TODO: This code does not perform substitution of variables in .spec.in files.
import tempfile
import sys
def process_specfile(specfilename):
description_mode=False
with tempfile.NamedTemporaryFile(delete=False) as tf:
with open(specfilename) as specfile:
print tf.name
for line in specfile.readlines():
line=line.rstrip()
if description_mode:
if len(line.lstrip()) > 0 and line.lstrip()[0] == '#':
continue
tf.write("RPM_DESCRIPTION=\"\${RPM_DESCRIPTION}%s\\n\"\n" % line.replace('\\'', '\\\\\\'').replace('\\"', '\\\\\\"').replace('(', '\\(').replace(')', '\\)'))
if not len(line):
continue
components=line.split(':')
if len(components)>=2:
key=components[0]
value=':'.join(components[1:]).lstrip()
if key=="Name":
tf.write("DEB_PACKAGE=\${DEB_PACKAGE:-%s}\n" % value)
tf.write("DEB_SOURCE=\${DEB_SOURCE:-%s}\n" % value)
elif key=="Release":
tf.write("DEB_VERSION_SUFFIX=\${DEB_VERSION_SUFFIX:-~%s}\n" % value)
elif key=="Source":
# Source URL is not mappable to anything useful.
# Possibly only includable in README.Debian.
pass
elif key=="License":
tf.write("DEB_LICENSE=\${DEB_LICENSE:-%s}\n" % value)
elif key=="Copyright":
# Seems to do the same as License?
pass
elif key=="Group":
# Ignore; not easily mappable, plus Debian has separate
# 'gnustep' section.
pass
elif key=="Summary":
# First line of 'Description' field
tf.write("RPM_DESCRIPTION=\"%s\n\"\n" % value)
elif key=="Packager":
tf.write("DEB_MAINTAINER=\${DEB_MAINTAINER:-\"%s\"}\n" % value)
elif key=="Vendor":
# Ignore; not useful anywhere in .deb
pass
elif key=="URL":
tf.write("DEB_HOMEPAGE=\${DEB_HOMEPAGE:-%s}\n" % value)
elif key=="Requires":
# We support only comma separated dependencies (to simplify version handling).
# Also, version mapping is very trivial.
rpmdeps = value.split(',')
debdeps = []
for rpmdep in rpmdeps:
rpmdepcomponents = rpmdep.split(' ')
debdep = rpmdepcomponents[0]
if len(rpmdepcomponents) > 1:
debdep += ' (%s)' % ' '.join(rpmdepcomponents[1:])
debdeps.append(debdep)
tf.write("if [ -z \\"\${DEB_DEPENDS}\\" ] ; then\n")
tf.write(" DEB_DEPENDS=\"%s\"\n" % ', '.join(debdeps))
tf.write("else\n")
tf.write(" DEB_DEPENDS=\"\${DEB_DEPENDS}, %s\"\n" % ', '.join(debdeps))
tf.write("fi\n")
elif key=="Provides":
tf.write("if [ -z \\"\${DEB_PROVIDES}\\" ] ; then\n")
tf.write(" DEB_PROVIDES=\"%s\"\n" % value)
tf.write("else\n")
tf.write(" DEB_PROVIDES=\"\${DEB_PROVIDES}, %s\"\n" % value)
elif key=="Version":
tf.write("DEB_VERSION=\${DEB_VERSION:-%s}\n" % value)
else:
if line == "%description":
description_mode = True
try:
process_specfile('${DEB_PACKAGE}.spec')
except:
try:
process_specfile('${DEB_PACKAGE}.spec.in')
except Exception as e:
sys.stderr.write('could not process either ${DEB_PACKAGE}.spec or ${DEB_PACKAGE}.spec.in\n')
raise
_EOF
)
if [ ! -z "${FN}" ] ; then
. $FN
DEB_DESCRIPTION="${DEB_DESCRIPTION:-${RPM_DESCRIPTION}}"
fi
fi
DEB_DESCRIPTION="${DEB_DESCRIPTION:-$(printf "Debian packaging for GNUstep based software ${PACKAGE_NAME}.\nThis package was built using gnustep-make.\n")}"
# Check that maintainer and package builder are set.
if [ -z "${DEB_MAINTAINER}" ] ; then
echo "error: You must set DEB_MAINTAINER in GNUmakefile or on command line."
exit 1
fi
if [ -z "${DEB_PACKAGE_BUILDER}" ] ; then
echo "error: You must set DEB_PACKAGE_BUILDER in GNUmakefile or on command line."
echo "(It's recommended you set it on the command line, so other people"
echo "don't accidentally claim you built their package.)"
exit 1
fi
# Check some other fields
if [ -z "${DEB_PACKAGE}" ] ; then
echo "error: Package name was not properly set in GNUmakefile."
exit 1
fi
if [ -z "${DEB_VERSION}" ] ; then
echo "error: Package version was not properly set in GNUmakefile."
exit 1
fi
echo ${destination}
# For documentation, see:
# https://www.debian.org/doc/debian-policy/ch-controlfields.html
echo "Source: " ${DEB_SOURCE} >> "${destination}"/control
echo "Maintainer:" ${DEB_MAINTAINER} >> "${destination}"/control
echo "Section:" ${DEB_SECTION} >> "${destination}"/control
echo "Priority:" ${DEB_PRIORITY} >> "${destination}"/control
if [ ! -z "${DEB_BUILD_DEPENDS}" ] ; then
echo "Build-Depends:" ${DEB_BUILD_DEPENDS} >> "${destination}"/control
fi
echo "Standards-Version: 3.9.4" >> "${destination}"/control
if [ ! -z "${DEB_HOMEPAGE}" ] ; then
echo "Homepage:" ${DEB_HOMEPAGE} >> "${destination}"/control
fi
if [ ! -z "${DEB_VCS_BROWSER}" ] ; then
echo "Vcs-Browser:" ${DEB_VCS_BROWSER} >> "${destination}"/control
fi
if [ ! -z "${DEB_VCS_ARCH}" ] ; then
echo "Vcs-Arch:" ${DEB_VCS_ARCH} >> "${destination}"/control
fi
if [ ! -z "${DEB_VCS_BZR}" ] ; then
echo "Vcs-Bzr:" ${DEB_VCS_BZR} >> "${destination}"/control
fi
if [ ! -z "${DEB_VCS_CVS}" ] ; then
echo "Vcs-Cvs:" ${DEB_VCS_CVS} >> "${destination}"/control
fi
if [ ! -z "${DEB_VCS_DARCS}" ] ; then
echo "Vcs-Darcs:" ${DEB_VCS_DARCS} >> "${destination}"/control
fi
if [ ! -z "${DEB_VCS_GIT}" ] ; then
echo "Vcs-Git:" ${DEB_VCS_GIT} >> "${destination}"/control
fi
if [ ! -z "${DEB_VCS_HG}" ] ; then
echo "Vcs-Hg:" ${DEB_VCS_HG} >> "${destination}"/control
fi
if [ ! -z "${DEB_VCS_MTN}" ] ; then
echo "Vcs-Mtn:" ${DEB_VCS_MTN} >> "${destination}"/control
fi
if [ ! -z "${DEB_VCS_SVN}" ] ; then
echo "Vcs-Svn:" ${DEB_VCS_SVN} >> "${destination}"/control
fi
echo "" >> "${destination}"/control
echo "Package:" ${DEB_PACKAGE} >> "${destination}"/control
echo "Architecture:" ${DEB_ARCHITECTURE} >> "${destination}"/control
# Comma-separated lists of packages
if [ ! -z "${DEB_PRE_DEPENDS}" ] ; then
echo "Pre-Depends:" ${DEB_PRE_DEPENDS} >> "${destination}"/control
fi
if [ ! -z "${DEB_DEPENDS}" ] ; then
echo "Depends:" ${DEB_DEPENDS} >> "${destination}"/control
fi
if [ ! -z "${DEB_RECOMMENDS}" ] ; then
echo "Recommends:" ${DEB_RECOMMENDS} >> "${destination}"/control
fi
if [ ! -z "${DEB_SUGGESTS}" ] ; then
echo "Suggests:" ${DEB_SUGGESTS} >> "${destination}"/control
fi
if [ ! -z "${DEB_PROVIDES}" ] ; then
echo "Provides:" ${DEB_PROVIDES} >> "${destination}"/control
fi
if [ ! -z "${DEB_REPLACES}" ] ; then
echo "Replaces:" ${DEB_REPLACES} >> "${destination}"/control
fi
if [ ! -z "${DEB_ESSENTIAL}" ] ; then
echo "Essential:" ${DEB_ESSENTIAL} >> "${destination}"/control
fi
echo "Description:" "$(echo "${DEB_DESCRIPTION}" | sed 's/^[\s]*$/./' | sed 's/\(.*\)/ \1/' | tail -c+2)" >> "${destination}"/control
###########
echo "${DEB_SOURCE} (${DEB_VERSION}) ${DEB_DISTRIBUTION}; urgency=low" >> "${destination}"/changelog
echo "" >> "${destination}"/changelog
echo " * New build." >> "${destination}"/changelog
echo "" >> "${destination}"/changelog
echo "" >> "${destination}"/changelog
echo " -- ${DEB_PACKAGE_BUILDER} $(date -R)" >> "${destination}"/changelog
##########
# Intentionally overwriting.
echo "9" > "${destination}"/compat
mkdir -p "${destination}"/source
echo "3.0 (quilt)" > "${destination}"/source/format
###########
# Intentionally overwriting.
cat > "${destination}"/rules << _EOF
#!/usr/bin/make -f
%:
dh \$@
_EOF
chmod 755 "${destination}"/rules
##########
if [ -e COPYING ] ; then
cp COPYING ${destination}/copyright
fi
if [ -e LICENSE ] ; then
cp LICENSE ${destination}/copyright
fi

View file

@ -1,35 +0,0 @@
# This is a slightly modified copy of /usr/share/equivs/template.ctl,
# which would be created by 'equivs-control' program.
### Commented entries have reasonable defaults.
### Uncomment to edit them.
# Source: <source package name; defaults to package name>
Section: misc
Priority: optional
# Homepage: <enter URL here; no default>
Standards-Version: 3.9.2
Package: @gs_name@
Version: @gs_version@
Maintainer: GNUstep Developers <gnustep-dev@gnu.org>
# Note: Use 'all' if universal.
Architecture: @gs_arch@
# Pre-Depends: <comma-separated list of packages>
# Depends: <comma-separated list of packages>
# Recommends: <comma-separated list of packages>
# Suggests: <comma-separated list of packages>
# Provides: <comma-separated list of packages>
# Replaces: <comma-separated list of packages>
# Copyright: <copyright file; defaults to GPL2>
# Changelog: <changelog file; defaults to a generic changelog>
# Readme: <README.Debian file; defaults to a generic one>
# Extra-Files: <comma-separated list of additional files for the doc directory>
Files: @file_list@
Description: <short description; defaults to some wise words>
long description and info
.
second paragraph