summaryrefslogtreecommitdiff
path: root/makedeb
blob: ec0d62066e2eb5481b8a8e58e190d65e02da6d92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh

if test "$1" = "ubuntu"; then
    APPEND="ubuntu1";
else
    if test "$1" = "debian"; then
        APPEND="";
    else
        echo "Usage: makedeb [ubuntu|debian]";
        exit 1;
    fi
fi

# get the version from configure.ac
VERSION=$(grep AC_INIT\(\\\[openbox\\] configure.ac|cut -d [ -f 3-|cut -d ] -f 1)

echo
echo "Building deb for openbox-$VERSION-0$APPEND"
echo

TIME="$(date '+%a, %d %B %Y %T %z')"

IN=debian/changelog.in
OUT=debian/changelog

# make sure configure gets run with the right parameters
make distclean > /dev/null || rm -f config.status

rm -f $OUT

sed -e "s!@time@!$TIME!" -e "s!@version@!$VERSION-0$APPEND!" $IN >$OUT && \
fakeroot debian/rules binary && \
make distclean > /dev/null