]> git.sesse.net Git - vlc/blob - debian/woody-buildpackage
72be306925f3c18696c15c79a5d3d5d24758d1a3
[vlc] / debian / woody-buildpackage
1 #! /bin/sh
2
3 # $Id: woody-buildpackage,v 1.12 2003/04/01 16:13:39 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     -e 's/ unstable; / stable; /' \
15     < debian/changelog > debian/changelog.woody
16
17 # control: replace liba52-*-dev with a52dec-dev (>=0.7.3)
18 #                  libdv*-dev with libdv-dev
19 #                  kdelibs4-dev with kdelibs-dev
20 #                  libqt3-mt-dev libqt3-compat-headers with libqt-dev
21 #                  libarts1-dev with libarts-dev
22 #                  libdvdread3-dev with libdvdread2-dev
23 #                  libdvdplay0-dev (>=1.0.1-2) with libdvdplay0-dev
24 #          remove libwxgtk2.4-dev
25 #                 libflac-dev
26 #                 libidl0 (workaround for mozilla-dev's bad deps)
27 #                 libglib2.0-0 (workaround for mozilla-dev's bad deps)
28 #          change Section: gnome with Section: graphics
29 #                 Section: kde with Section: kde
30 sed -e 's/liba52-[^-]*-dev/a52dec-dev (>=0.7.3)/' \
31     -e 's/libdv[0-9]*-dev/libdv-dev/' \
32     -e 's/kdelibs[0-9]*-dev/kdelibs-dev/' \
33     -e 's/libqt[0-9]*-mt-dev/libqt-dev/' \
34     -e 's/, libqt[0-9]*-compat-headers[^,]*//' \
35     -e 's/libarts[0-9]*-dev/libarts-dev/' \
36     -e 's/libdvdread[0-9]*-dev/libdvdread2-dev/' \
37     -e 's/, libdvdplay0-dev[^,]*/, libdvdplay0-dev/' \
38     -e 's/, libwx[^,]*//' \
39     -e '/Package: wxvlc/,/^ *$/d' \
40     -e 's/, libflac-dev[^,]*//' \
41     -e 's/, libidl0[^,]*//' \
42     -e 's/, libglib2.0-0[^,]*//' \
43     -e 's/Section: gnome/Section: graphics/' \
44     -e 's/Section: kde/Section: graphics/' \
45     < debian/control > debian/control.woody
46
47 # rules: remove wxwindows stuff
48 #        change changelog path
49 sed -e '/# Package: wxvlc/,/^ *$/d' \
50     -e 's,^ARCH_EXCLUDE =,& -Nwxvlc,' \
51     -e 's,--enable-wxwindows,--disable-wxwindows,' \
52     -e 's,--enable-flac,--disable-flac,' \
53     -e 's, debian/changelog , debian/changelog.woody ,' \
54     -e 's,dh_gencontrol[^#]*,& -- -ldebian/changelog.woody,' \
55     < debian/rules > debian/rules.woody
56 chmod a+x debian/rules.woody
57
58 # Environment variables - taken from dpkg-buildpackage
59 curd="`pwd`"
60 dirn="`basename \"$curd\"`"
61 package="`dpkg-parsechangelog -ldebian/changelog.woody | sed -n 's/^Source: //p'`"
62 version="`dpkg-parsechangelog -ldebian/changelog.woody | sed -n 's/^Version: //p'`"
63 maintainer="`dpkg-parsechangelog -ldebian/changelog.woody | sed -n 's/^Maintainer: //p'`"
64 eval `dpkg-architecture -a -t -s -f`
65 arch="`dpkg-architecture -a -t -qDEB_HOST_ARCH`"
66 sversion=`echo "$version" | perl -pe 's/^\d+://'`
67 pv="${package}_${sversion}"
68 pva="${package}_${sversion}_${arch}"
69 chg=../"$pva.changes"
70
71 # Do the real work
72 dpkg-checkbuilddeps -B debian/control.woody || exit 1
73 fakeroot debian/rules.woody clean
74 cd ..; dpkg-source -l"$dirn"/debian/changelog.woody -b "$dirn"; cd "$dirn"
75 debian/rules.woody build
76 fakeroot debian/rules.woody binary
77 dpkg-genchanges -ldebian/changelog.woody -cdebian/control.woody >"$chg"
78
79 # Clean up
80 rm -f debian/rules.woody debian/control.woody debian/changelog.woody
81