]> git.sesse.net Git - vlc/blob - debian/woody-buildpackage
f17c1beef5576cfe2a0faa77e6e4f0274d36b84a
[vlc] / debian / woody-buildpackage
1 #! /bin/sh
2
3 # $Id: woody-buildpackage,v 1.8 2003/03/11 18:57:30 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 #                  libqt3-dev with libqt-dev
20 #                  libarts1-dev with libarts-dev
21 #          remove libwxgtk2.4-dev
22 #                 libflac-dev
23 sed -e 's/liba52-[^-]*-dev/a52dec-dev (>=0.7.3)/' \
24     -e 's/libdv[0-9]*-dev/libdv-dev/' \
25     -e 's/kdelibs[0-9]*-dev/kdelibs-dev/' \
26     -e 's/libqt[0-9]*-dev/libqt-dev/' \
27     -e 's/libarts[0-9]*-dev/libarts-dev/' \
28     -e 's/, libwx[^,]*//' \
29     -e '/Package: wxvlc/,/^ *$/d' \
30     -e 's/, libflac-dev[^,]*//' \
31     < debian/control > debian/control.woody
32
33 # rules: remove wxwindows stuff
34 #        change changelog path
35 sed -e '/# Package: wxvlc/,/^ *$/d' \
36     -e 's,^ARCH_EXCLUDE =,& -Nwxvlc,' \
37     -e 's,--enable-wxwindows,--disable-wxwindows,' \
38     -e 's,--enable-flac,--disable-flac,' \
39     -e 's, debian/changelog , debian/changelog.woody ,' \
40     -e 's,dh_gencontrol[^#]*,& -- -ldebian/changelog.woody,' \
41     < debian/rules > debian/rules.woody
42 chmod a+x debian/rules.woody
43
44 # Environment variables - taken from dpkg-buildpackage
45 curd="`pwd`"
46 dirn="`basename \"$curd\"`"
47 package="`dpkg-parsechangelog -ldebian/changelog.woody | sed -n 's/^Source: //p'`"
48 version="`dpkg-parsechangelog -ldebian/changelog.woody | sed -n 's/^Version: //p'`"
49 maintainer="`dpkg-parsechangelog -ldebian/changelog.woody | sed -n 's/^Maintainer: //p'`"
50 eval `dpkg-architecture -a -t -s -f`
51 arch="`dpkg-architecture -a -t -qDEB_HOST_ARCH`"
52 sversion=`echo "$version" | perl -pe 's/^\d+://'`
53 pv="${package}_${sversion}"
54 pva="${package}_${sversion}_${arch}"
55 chg=../"$pva.changes"
56
57 # Do the real work
58 dpkg-checkbuilddeps -B debian/control.woody || exit 1
59 fakeroot debian/rules.woody clean
60 cd ..; dpkg-source -l"$dirn"/debian/changelog.woody -b "$dirn"; cd "$dirn"
61 debian/rules.woody build
62 fakeroot debian/rules.woody binary
63 dpkg-genchanges -ldebian/changelog.woody -cdebian/control.woody >"$chg"
64
65 # Clean up
66 rm -f debian/rules.woody debian/control.woody debian/changelog.woody
67