Skip to content

Commit

Permalink
gen.package: Support for debhelper version > 10
Browse files Browse the repository at this point in the history
  • Loading branch information
mkreisl committed Aug 20, 2019
1 parent f546166 commit 7c1dcfb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gen.package
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ prepare_debhelper_tree() {

if ! grep -q 'Source\:' DEBIAN/{control,control-dbg} 2>/dev/null; then
rmsrc=yes
sed -i 's/Package:/Source:\nPackage:/' DEBIAN/{control,control-dbg} 2>/dev/null
cp -a DEBIAN/control DEBIAN/control.o
sed -i "s/Package:/Source: $package\n\nPackage:/" DEBIAN/control 2>/dev/null
fi

sarch=$(grep -m1 'Architecture\:' DEBIAN/control | awk -F':' '{print $2}' | tr -d ' ')
Expand All @@ -76,7 +77,7 @@ prepare_debhelper_tree() {
mv DEBIAN/$package/* ./
rm -fr DEBIAN/$package
rm -f debian DEBIAN/compat
[ $rmsrc = yes ] && sed -i '/Source:/d' DEBIAN/{control,control-dbg} 2>/dev/null
[ $rmsrc = yes ] && mv DEBIAN/control.o DEBIAN/control

depends=$(cat DEBIAN/$package.substvars | awk -F'Depends=' '{print $2}')
sed -i "s%\${shlibs:Depends}%$depends%" DEBIAN/control
Expand Down

0 comments on commit 7c1dcfb

Please sign in to comment.