]> git.sesse.net Git - vlc/blob - debian/woody-buildpackage
4ff1edd147d8ee9e729b6c75724048b163edbc1c
[vlc] / debian / woody-buildpackage
1 #! /bin/sh
2
3 # $Id: woody-buildpackage,v 1.6 2003/02/09 12:21: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,--enable-wxwindows,--disable-wxwindows,' \
34     -e 's, debian/changelog , debian/changelog.woody ,' \
35     -e 's,dh_gencontrol[^#]*,& -- -ldebian/changelog.woody,' \
36     < debian/rules > debian/rules.woody
37 chmod a+x debian/rules.woody
38
39 # Environment variables - taken from dpkg-buildpackage
40 curd="`pwd`"
41 dirn="`basename \"$curd\"`"
42 package="`dpkg-parsechangelog -ldebian/changelog.woody | sed -n 's/^Source: //p'`"
43 version="`dpkg-parsechangelog -ldebian/changelog.woody | sed -n 's/^Version: //p'`"
44 maintainer="`dpkg-parsechangelog -ldebian/changelog.woody | sed -n 's/^Maintainer: //p'`"
45 eval `dpkg-architecture -a -t -s -f`
46 arch="`dpkg-architecture -a -t -qDEB_HOST_ARCH`"
47 sversion=`echo "$version" | perl -pe 's/^\d+://'`
48 pv="${package}_${sversion}"
49 pva="${package}_${sversion}_${arch}"
50 chg=../"$pva.changes"
51
52 # Do the real work
53 dpkg-checkbuilddeps -B debian/control.woody || exit 1
54 fakeroot debian/rules.woody clean
55 cd ..; dpkg-source -l"$dirn"/debian/changelog.woody -b "$dirn"; cd "$dirn"
56 debian/rules.woody build
57 fakeroot debian/rules.woody binary
58 dpkg-genchanges -ldebian/changelog.woody -cdebian/control.woody >"$chg"
59
60 # Clean up
61 rm -f debian/rules.woody debian/control.woody debian/changelog.woody
62