]> git.sesse.net Git - vlc/blob - debian/woody-buildpackage
* ./debian/woody-buildpackage: Debian package creation fixes.
[vlc] / debian / woody-buildpackage
1 #! /bin/sh
2
3 # $Id: woody-buildpackage,v 1.7 2003/02/17 07:22:05 sam Exp $
4 # Build VLC for a Woody Debian system
5
6 if test ! -d debian
7 then
8   echo "No debian/ directory"
9   exit 1
10 fi
11
12 # changelog: replace (1.2.3-4) with (1.2.3-0woody.4)
13 sed -e 's/^vlc (\([^)]*\)-\([^-)]*\))/vlc (\1-0woody.\2)/' \
14     < debian/changelog > debian/changelog.woody
15
16 # control: replace liba52-*-dev with a52dec-dev (>=0.7.3)
17 #                  libdv*-dev with libdv-dev
18 #                  kdelibs4-dev with kdelibs-dev
19 #                  libarts1-dev with libarts-dev
20 #          remove libwxgtk2.4-dev
21 sed -e 's/liba52-[^-]*-dev/a52dec-dev (>=0.7.3)/' \
22     -e 's/libdv[0-9]*-dev/libdv-dev/' \
23     -e 's/kdelibs[0-9]*-dev/kdelibs-dev/' \
24     -e 's/libqt[0-9]*-dev/libqt-dev/' \
25     -e 's/libarts[0-9]*-dev/libarts-dev/' \
26     -e 's/, libwx[^,]*//' \
27     -e '/Package: wxvlc/,/^ *$/d' \
28     < debian/control > debian/control.woody
29
30 # rules: remove wxwindows stuff
31 #        change changelog path
32 sed -e '/# Package: wxvlc/,/^ *$/d' \
33     -e 's,^ARCH_EXCLUDE =,& -Nwxvlc,' \
34     -e 's,--enable-wxwindows,--disable-wxwindows,' \
35     -e 's, debian/changelog , debian/changelog.woody ,' \
36     -e 's,dh_gencontrol[^#]*,& -- -ldebian/changelog.woody,' \
37     < debian/rules > debian/rules.woody
38 chmod a+x debian/rules.woody
39
40 # Environment variables - taken from dpkg-buildpackage
41 curd="`pwd`"
42 dirn="`basename \"$curd\"`"
43 package="`dpkg-parsechangelog -ldebian/changelog.woody | sed -n 's/^Source: //p'`"
44 version="`dpkg-parsechangelog -ldebian/changelog.woody | sed -n 's/^Version: //p'`"
45 maintainer="`dpkg-parsechangelog -ldebian/changelog.woody | sed -n 's/^Maintainer: //p'`"
46 eval `dpkg-architecture -a -t -s -f`
47 arch="`dpkg-architecture -a -t -qDEB_HOST_ARCH`"
48 sversion=`echo "$version" | perl -pe 's/^\d+://'`
49 pv="${package}_${sversion}"
50 pva="${package}_${sversion}_${arch}"
51 chg=../"$pva.changes"
52
53 # Do the real work
54 dpkg-checkbuilddeps -B debian/control.woody || exit 1
55 fakeroot debian/rules.woody clean
56 cd ..; dpkg-source -l"$dirn"/debian/changelog.woody -b "$dirn"; cd "$dirn"
57 debian/rules.woody build
58 fakeroot debian/rules.woody binary
59 dpkg-genchanges -ldebian/changelog.woody -cdebian/control.woody >"$chg"
60
61 # Clean up
62 rm -f debian/rules.woody debian/control.woody debian/changelog.woody
63