woody-buildpackage 3.09 KB
Newer Older
1
2
#! /bin/sh

3
# $Id: woody-buildpackage,v 1.12 2003/04/01 16:13:39 sam Exp $
4
5
6
7
8
9
10
11
# Build VLC for a Woody Debian system

if test ! -d debian
then
  echo "No debian/ directory"
  exit 1
fi

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
18
# control: replace liba52-*-dev with a52dec-dev (>=0.7.3)
#                  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
23
#                  libdvdread3-dev with libdvdread2-dev
#                  libdvdplay0-dev (>=1.0.1-2) with libdvdplay0-dev
24
#          remove libwxgtk2.4-dev
25
#                 libflac-dev
26
27
#                 libidl0 (workaround for mozilla-dev's bad deps)
#                 libglib2.0-0 (workaround for mozilla-dev's bad deps)
28
29
#          change Section: gnome with Section: graphics
#                 Section: kde with Section: kde
30
31
sed -e 's/liba52-[^-]*-dev/a52dec-dev (>=0.7.3)/' \
    -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
37
    -e 's/libdvdread[0-9]*-dev/libdvdread2-dev/' \
    -e 's/, libdvdplay0-dev[^,]*/, libdvdplay0-dev/' \
38
39
    -e 's/, libwx[^,]*//' \
    -e '/Package: wxvlc/,/^ *$/d' \
40
    -e 's/, libflac-dev[^,]*//' \
41
42
    -e 's/, libidl0[^,]*//' \
    -e 's/, libglib2.0-0[^,]*//' \
43
44
    -e 's/Section: gnome/Section: graphics/' \
    -e 's/Section: kde/Section: graphics/' \
45
    < debian/control > debian/control.woody
46

47
48
# rules: remove wxwindows stuff
#        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
54
    -e 's, debian/changelog , debian/changelog.woody ,' \
    -e 's,dh_gencontrol[^#]*,& -- -ldebian/changelog.woody,' \
55
    < debian/rules > debian/rules.woody
56
57
chmod a+x debian/rules.woody

58
# Environment variables - taken from dpkg-buildpackage
59
60
61
62
63
64
65
66
67
68
69
70
curd="`pwd`"
dirn="`basename \"$curd\"`"
package="`dpkg-parsechangelog -ldebian/changelog.woody | sed -n 's/^Source: //p'`"
version="`dpkg-parsechangelog -ldebian/changelog.woody | sed -n 's/^Version: //p'`"
maintainer="`dpkg-parsechangelog -ldebian/changelog.woody | sed -n 's/^Maintainer: //p'`"
eval `dpkg-architecture -a -t -s -f`
arch="`dpkg-architecture -a -t -qDEB_HOST_ARCH`"
sversion=`echo "$version" | perl -pe 's/^\d+://'`
pv="${package}_${sversion}"
pva="${package}_${sversion}_${arch}"
chg=../"$pva.changes"

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
77
fakeroot debian/rules.woody binary
dpkg-genchanges -ldebian/changelog.woody -cdebian/control.woody >"$chg"
78

79
80
81
# Clean up
rm -f debian/rules.woody debian/control.woody debian/changelog.woody