]> git.sesse.net Git - vlc/blob - debian/woody-buildpackage
* ./debian/control: changed the libvlc0-dev section to libdevel (to match
[vlc] / debian / woody-buildpackage
1 #! /bin/sh
2 # $Id: woody-buildpackage,v 1.14 2003/04/11 19:15:36 sam Exp $
3 # Build VLC on a Debian woody system
4
5 set -x
6 set -e
7
8 test -d debian
9
10 # changelog: replace (1.2.3-4) with (1.2.3-0woody.4)
11 sed -e 's/^vlc (\([^)]*\)-\([^-)]*\))/vlc (\1-0woody.\2)/' \
12     -e 's/ unstable; / stable; /' \
13     < debian/changelog > debian/changelog.woody
14
15 # control: replace liba52-*-dev with a52dec-dev (>=0.7.3)
16 #                  libdv*-dev with libdv-dev
17 #                  kdelibs4-dev with kdelibs-dev
18 #                  libqt3-mt-dev libqt3-compat-headers with libqt-dev
19 #                  libarts1-dev with libarts-dev
20 #                  libdvdread3-dev with libdvdread2-dev
21 #                  libdvdplay0-dev (>=1.0.1-2) with libdvdplay0-dev
22 #          remove libwxgtk2.4-dev
23 #                 libflac-dev
24 #                 libidl0 (workaround for mozilla-dev's bad deps)
25 #                 libglib2.0-0 (workaround for mozilla-dev's bad deps)
26 #          change Section: gnome with Section: graphics
27 #                 Section: kde with Section: kde
28 #                 Section: libdevel with Section: devel
29 sed -e 's/liba52-[^-]*-dev/a52dec-dev (>=0.7.3)/' \
30     -e 's/libdv[0-9]*-dev/libdv-dev/' \
31     -e 's/kdelibs[0-9]*-dev/kdelibs-dev/' \
32     -e 's/libqt[0-9]*-mt-dev/libqt-dev/' \
33     -e 's/, libqt[0-9]*-compat-headers[^,]*//' \
34     -e 's/libarts[0-9]*-dev/libarts-dev/' \
35     -e 's/libdvdread[0-9]*-dev/libdvdread2-dev/' \
36     -e 's/, libdvdplay0-dev[^,]*/, libdvdplay0-dev/' \
37     -e 's/, libwx[^,]*//' \
38     -e '/Package: wxvlc/,/^ *$/d' \
39     -e 's/, libflac-dev[^,]*//' \
40     -e 's/, libidl0[^,]*//' \
41     -e 's/, libglib2.0-0[^,]*//' \
42     -e 's/Section: gnome/Section: graphics/' \
43     -e 's/Section: kde/Section: graphics/' \
44     -e 's/Section: libdevel/Section: devel/' \
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