forked from autosub-team/autosub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_deb.sh
44 lines (33 loc) · 873 Bytes
/
build_deb.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
36
37
38
39
40
41
42
43
44
#!/bin/bash
set -e
if test $# -ne 1;
then
echo "+++ Usage: build_deb.sh <version>"
exit 1
fi
PACKAGE_NAME=autosub-$1
ORIG_PATH=$(pwd)
export EMAIL="[email protected]"
export DEBFULLNAME="Andreas Platschek"
mkdir -p /tmp/$PACKAGE_NAME/bin
mkdir /tmp/$PACKAGE_NAME/doc
cd /tmp/$PACKAGE_NAME
git clone https://github.com/andipla/autosub.git
cd autosub
wget http://www.web2py.com/examples/static/web2py_src.zip
unzip web2py_src.zip
rm web2py_src.zip
cd -
dh_make -y -i --native -c gpl2
dh_link /usr/share/pyshared/autosub/autosub.sh /usr/bin/autosub
#copy prepared config files
cp $ORIG_PATH/debian/control debian/
cp $ORIG_PATH/debian/autosub.install debian/
cp $ORIG_PATH/debian/rules debian/
dpkg-buildpackage -uc -us
#clean it all up
cd ..
cp autosub_${1}_all.deb $ORIG_PATH
cp autosub_${1}.tar.xz $ORIG_PATH
cd $ORIG_PATH
rm -rf /tmp/autosub-$1