forked from auto3000/RPi.GPIO_NP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_deb
executable file
·35 lines (30 loc) · 1.2 KB
/
make_deb
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
# This README file gives a very rough idea of how to build Debian
# packages for this module
# There may be dependencies I've forgotten to mention!
# Version numbers may change as well!
VERSION=0.6.3
DISTRO=`lsb_release -sc`
#DEBFULLNAME="Ben Croston"
#DEBEMAIL="[email protected]"
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
set -e
# install debian package build dependencies
# sudo apt-get install devscripts build-essential fakeroot dh-make python-dev python3-dev python-setuptools python3-setuptools
python setup.py sdist
rm -rf ~/build_rpi.gpio
mkdir ~/build_rpi.gpio
cp dist/RPi.GPIO-$VERSION.tar.gz ~/build_rpi.gpio/rpi.gpio_$VERSION~$DISTRO.orig.tar.gz
cd ~/build_rpi.gpio
tar xvfz rpi.gpio_$VERSION~$DISTRO.orig.tar.gz
cp -a $SCRIPTPATH/debian_$DISTRO ~/build_rpi.gpio/RPi.GPIO-$VERSION/debian
# build .deb files
cd ~/build_rpi.gpio/RPi.GPIO-$VERSION
debuild -us -uc
#debuild clean
cp ~/build_rpi.gpio/python*deb $SCRIPTPATH/dist
cp ~/build_rpi.gpio/rpi.gpio_$VERSION~$DISTRO.orig.tar.gz $SCRIPTPATH/dist
cp ~/build_rpi.gpio/rpi.gpio_$VERSION~$DISTRO*.dsc $SCRIPTPATH/dist
cp ~/build_rpi.gpio/rpi.gpio_$VERSION~$DISTRO*.debian.tar.* $SCRIPTPATH/dist
rm -rf ~/build_rpi.gpio
rm $SCRIPTPATH/MANIFEST