5
VERSION=`sh showversion.sh`
7
RELEASE=`cat buildid.dat`
10
# Chosing the right architecture
11
if test `uname -m` = "x86_64"; then ARCH=amd64
12
else ARCH=`uname -m|sed 's/^i[3-9]86/i386/'`
15
DEBNAME=${OSSNAME}-${VERSION}-${RELEASE}_${ARCH}
17
# Checking for known MD5 hashing programs
18
if type md5sum > /dev/null 2>&1; then MD5=MD5SUM
19
elif type openssl > /dev/null 2>&1; then MD5=OPENSSL
20
elif type md5 > /dev/null 2>&1; then MD5=MD5
21
elif type digest > /dev/null 2>&1; then MD5=DIGEST
22
else echo "There has been no MD5 creation utily found. deb archive creation will be aborted." && exit 1
25
echo building $DEBNAME.deb
28
mkdir control 2>/dev/null
29
echo "2.0" > debian-binary
30
cat > control/control << END
32
Version: ${VERSION}-${RELEASE}
36
Installed-Size: `du -ks prototype | awk '{print $1}'`
37
Build-Depends: build-essential sed gawk libtool libgtk2.0-dev
38
Depends: binutils, gcc, libc6, libgtk2.0-0, sed (>= 1.0.0)
39
Conflicts: libflashsupport
41
Suggests: libsdl1.2debian-oss | libsdl1.2debian-all, libesd0, libwine-oss, libsox-fmt-oss, mpg123, gstreamer0.10-plugins-bad (>= 0.10.7), libasound2-plugins
42
Maintainer: 4Front Technologies <support@opensound.com>
43
Description: Open Sound System (http://www.opensound.com)
44
OSS provides libraries and necessary drivers for practically all sound
45
cards on the market including PnP and many PCI ones which enable you
46
to play sound files, compose music, use MIDI (only included in the
47
testing releases) and adjust your sound card using various user space
51
# Copying the menu and copyright file to the right place, taking care that the md5sums generation will take place AFTER this step
52
mkdir -p prototype/usr/share/menu prototype/usr/share/doc/oss-linux
53
cp setup/Linux/menu.ex prototype/usr/share/menu/ossxmix
54
cp setup/Linux/copyright prototype/usr/share/doc/oss-linux/
57
# Create the MD5 sums file using the program we have found earlier
58
(cd prototype; find . -type f -exec sh ../setup/Linux/md5.sh "$MD5" "{}" \; > ../control/md5sums)
60
(cd prototype; find . -type f -print | sed 's/^.//g' | egrep "^/etc/" > ../control/conffiles)
63
# Removing older builds
64
rm -rf /tmp/prototype $DEBNAME.deb
67
cp -pRf prototype /tmp
68
cp setup/Linux/preinst setup/Linux/postinst setup/Linux/prerm setup/Linux/postrm control/
69
if test -e prototype/$OSSLIBDIR/lib/libsalsa.so*
71
cp setup/Linux/shlibs control/
75
# Correcting file and directory permissions required by lintian
76
chmod 0755 control/control
78
# Building control and data archives
79
(cd control; tar c * | gzip -9 > ../control.tar.gz)
80
(cd /tmp/prototype; tar c ./* | gzip -9 > data.tar.gz)
81
mv /tmp/prototype/data.tar.gz .
84
# Creating the actual archive
85
ar r $DEBNAME.deb debian-binary control.tar.gz data.tar.gz
89
rm -rf /tmp/prototype control control.tar.gz data.tar.gz debian-binary
92
if test -f 4front-private/export_package.sh
94
sh 4front-private/export_package.sh $OSSNAME*.deb . `sh showversion.sh` /tmp `uname -i`-26