| 1 |
dato-guest |
164 |
#! /bin/sh
|
| 2 |
|
|
# This file writes debian/substvars and appends it to
|
| 3 |
|
|
# debian/$packages.substvars. Called from common/rules.mk after dh_shlibdeps.
|
| 4 |
|
|
# $Id$
|
| 5 |
|
|
|
| 6 |
|
|
listpackages=debian/common/list-packages
|
| 7 |
|
|
chmod +x $listpackages
|
| 8 |
|
|
|
| 9 |
|
|
OUT=debian/substvars
|
| 10 |
|
|
exec >$OUT
|
| 11 |
|
|
|
| 12 |
|
|
# Package version, package upstream version, package next upstream version
|
| 13 |
|
|
VERSION=`dpkg-parsechangelog | grep -E '^Version:' | cut -f 2 -d ' '`
|
| 14 |
|
|
VERSION_NODEB=`echo $VERSION | sed -e s/-[^-]*$//`
|
| 15 |
|
|
VERSION_NODEB_NEXT=`echo $VERSION_NODEB | perl -pe 's/(?<=\.)(\d+)$/($1+1)/e'`
|
| 16 |
|
|
|
| 17 |
|
|
# Build-Dependencies on kdelibs4-dev go like kdelibs4-dev (>> ${Source-Version-NoDebRev})
|
| 18 |
|
|
echo "Source-Version-NoDebRev=$VERSION_NODEB"
|
| 19 |
|
|
|
| 20 |
|
|
# This next two loops provide a ${Variable} for each package, with the
|
| 21 |
|
|
# following dependency policy: dependencies on arch-specific packages
|
| 22 |
|
|
# use an exact version; dependencies on arch-all packages only require
|
| 23 |
|
|
# the same upstream version (to allow binary NMUs).
|
| 24 |
|
|
#
|
| 25 |
|
|
# Later, it should be discussed the tightening the policy to: "packages
|
| 26 |
|
|
# from a same source package must be all at the same version." See my
|
| 27 |
|
|
# comments on Bug#276607. Currently, only packages with dependencies
|
| 28 |
|
|
# between them are forced to be the same version; the commented third
|
| 29 |
|
|
# loop would force *all* packages from a same source to be at the same
|
| 30 |
|
|
# version. Hopefully it won't be necessary.
|
| 31 |
|
|
|
| 32 |
|
|
for p in `$listpackages arch`; do
|
| 33 |
|
|
echo "$p:Depends=$p (= $VERSION)"
|
| 34 |
|
|
done
|
| 35 |
|
|
|
| 36 |
|
|
for p in `$listpackages indep`; do
|
| 37 |
|
|
echo "$p:Depends=$p (>> $VERSION_NODEB), $p (<< $VERSION_NODEB_NEXT)"
|
| 38 |
|
|
done
|
| 39 |
|
|
|
| 40 |
|
|
# Conflicts for $source-base
|
| 41 |
|
|
# echo -n "Strict-Conflicts="
|
| 42 |
|
|
# for p in `$listpackages arch`; do
|
| 43 |
|
|
# echo -n "$p (<< $VERSION_NODEB), $p (>> $VERSION_NODEB_NEXT),"
|
| 44 |
|
|
# done
|
| 45 |
|
|
# echo
|
| 46 |
|
|
|
| 47 |
|
|
# I'd like to know if this can be done less uglyly
|
| 48 |
|
|
for p in `$listpackages`; do
|
| 49 |
|
|
cat $OUT >>debian/$p.substvars
|
| 50 |
|
|
done
|