| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
if test "$1" = "ubuntu"; then |
| 4 |
APPEND="ubuntu1"; |
| 5 |
else |
| 6 |
if test "$1" = "debian"; then |
| 7 |
APPEND=""; |
| 8 |
else |
| 9 |
echo "Usage: makedeb [ubuntu|debian]"; |
| 10 |
exit 1; |
| 11 |
fi |
| 12 |
fi |
| 13 |
|
| 14 |
# get the version from configure.ac |
| 15 |
VERSION=$(grep AC_INIT\(\\\[obconf\\] configure.ac|cut -d [ -f 3-|cut -d ] -f 1) |
| 16 |
|
| 17 |
echo |
| 18 |
echo "Building deb for obconf-$VERSION-0$APPEND" |
| 19 |
echo |
| 20 |
|
| 21 |
TIME="$(date '+%a, %d %B %Y %T %z')" |
| 22 |
|
| 23 |
IN=debian/changelog.in |
| 24 |
OUT=debian/changelog |
| 25 |
|
| 26 |
# make sure configure gets run with the right parameters |
| 27 |
make distclean > /dev/null || rm -f config.status |
| 28 |
|
| 29 |
rm -f $OUT |
| 30 |
|
| 31 |
sed -e "s!@time@!$TIME!" -e "s!@version@!$VERSION-0$APPEND!" $IN >$OUT && \ |
| 32 |
fakeroot debian/rules binary && \ |
| 33 |
make distclean > /dev/null |