forked from localwiki/localwiki
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakedeb_ppa.sh
executable file
·35 lines (27 loc) · 1.12 KB
/
makedeb_ppa.sh
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
34
35
#!/bin/bash
# Makes deb source for a given Ubuntu release using prebuilt source
# and uploads it to the localwiki PPA
if [[ "$1" = "" ]] || [[ "$2" = "" ]] || [[ "$3" = "" ]]
then
echo "Usage: $0 <ubuntu_release(ex: lucid)> <prebuilt_dist.orig.tar.gz> <user/ppa>"
exit
fi
cd ..
LW_VERSION=$(python -c "from sapling import get_version; print get_version().replace(' ', '.')")
UBUNTU_RELEASE=$1
DEBIAN_VERSION="0ubuntu1~${UBUNTU_RELEASE}"
DIST_FILE=$2
PPA=$3
VERSION="${LW_VERSION}-${DEBIAN_VERSION}"
DEPENDS=$(deb_utils/depends.sh ${UBUNTU_RELEASE})
echo "Building package source for localwiki_${VERSION}"
rm -r deb_dist/
rm -r localwiki.egg-info/
python setup.py --command-packages=stdeb.command sdist_dsc --ignore-install-requires --suite ${UBUNTU_RELEASE} --debian-version ${DEBIAN_VERSION} --depends "${DEPENDS}" --use-premade-distfile ${DIST_FILE}
cp deb_utils/localwiki.postinst deb_dist/localwiki-${LW_VERSION}/debian
cp deb_utils/triggers deb_dist/localwiki-${LW_VERSION}/debian
cd deb_dist/localwiki-${LW_VERSION}
dpkg-buildpackage -rfakeroot -S -sa
cd ../
dput ppa:${PPA} localwiki_${VERSION}_source.changes
cd ../deb_utils