Menu

[be8e4d]: / make_deb  Maximize  Restore  History

Download this file

38 lines (32 with data), 1.4 kB

# 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.7.1
DISTRO=`lsb_release -sc`
#DEBFULLNAME="Ben Croston"
#DEBEMAIL="ben@croston.org"
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
#  or for Buster try:
# sudo apt install debhelper dh-python python-all python-all-dev python3-all python3-all-dev 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
dpkg-buildpackage -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
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.