Browse Source

Merge pull request #13 from dolfandringa/support_deb_package

Add support for debian building
pull/17/head
Orange Pi 5 years ago committed by GitHub
parent
commit
5f2455c2d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      People
  2. 5
      build
  3. 10
      debian-template/wiringPi/DEBIAN/control
  4. 5
      debian-template/wiringPi/DEBIAN/postinst
  5. 2
      debian-template/wiringPi/DEBIAN/postrm
  6. 10
      devLib/Makefile
  7. 8
      gpio/Makefile
  8. 11
      wiringPi/Makefile
  9. 8
      wiringPiD/Makefile

4
People

@ -31,3 +31,7 @@ Andre Crone
Rik Teerling Rik Teerling
Pointing out some silly mistooks in the I2C code... Pointing out some silly mistooks in the I2C code...
Dolf Andringa
Support for multiple SpiDev devices/ports
Debian build support

5
build

@ -115,14 +115,19 @@ fi
if [ x$1 = "xdebian" ]; then if [ x$1 = "xdebian" ]; then
here=`pwd` here=`pwd`
echo "removing old libs"
cd debian-template/wiringPi cd debian-template/wiringPi
rm -rf usr rm -rf usr
echo "building wiringPi"
cd $here/wiringPi cd $here/wiringPi
make install-deb make install-deb
echo "building devLib"
cd $here/devLib cd $here/devLib
make install-deb INCLUDE='-I. -I../wiringPi' make install-deb INCLUDE='-I. -I../wiringPi'
echo "building gpio"
cd $here/gpio cd $here/gpio
make install-deb INCLUDE='-I../wiringPi -I../devLib' LDFLAGS=-L../debian-template/wiringPi/usr/lib make install-deb INCLUDE='-I../wiringPi -I../devLib' LDFLAGS=-L../debian-template/wiringPi/usr/lib
echo "Building deb package"
cd $here/debian-template cd $here/debian-template
fakeroot dpkg-deb --build wiringPi fakeroot dpkg-deb --build wiringPi
mv wiringPi.deb wiringpi-`cat $here/VERSION`-1.deb mv wiringPi.deb wiringpi-`cat $here/VERSION`-1.deb

10
debian-template/wiringPi/DEBIAN/control

@ -0,0 +1,10 @@
Package: wiringPi
Version: 2.46
Section: libraries
Priority: optional
Architecture: armhf
Depends: libc6
Maintainer: Boby Lee <leeboby@aliyun.com>
Description: The wiringPi libraries for the OrangePi, headers and gpio command
Libraries to allow GPIO access on a Raspberry Pi from C and C++
and BASIC programs as well as from the command-line

5
debian-template/wiringPi/DEBIAN/postinst

@ -0,0 +1,5 @@
#!/bin/sh
set -e
/bin/chown root.root /usr/bin/gpio
/bin/chmod 4755 /usr/bin/gpio
/sbin/ldconfig

2
debian-template/wiringPi/DEBIAN/postrm

@ -0,0 +1,2 @@
#!/bin/sh
/sbin/ldconfig

10
devLib/Makefile

@ -108,12 +108,12 @@ install-static: $(STATIC)
.PHONY: install-deb .PHONY: install-deb
install-deb: $(DYNAMIC) install-deb: $(DYNAMIC)
$Q echo "[Install Headers: deb]" $Q echo "[Install Headers: deb]"
$Q install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/include $Q install -m 0755 -d $(CURDIR)/../debian-template/wiringPi/usr/include
$Q install -m 0644 $(HEADERS) ~/wiringPi/debian-template/wiringPi/usr/include $Q install -m 0644 $(HEADERS) $(CURDIR)/../debian-template/wiringPi/usr/include
$Q echo "[Install Dynamic Lib: deb]" $Q echo "[Install Dynamic Lib: deb]"
install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/lib install -m 0755 -d $(CURDIR)/../debian-template/wiringPi/usr/lib
install -m 0755 libwiringPiDev.so.$(VERSION) ~/wiringPi/debian-template/wiringPi/usr/lib/libwiringPiDev.so.$(VERSION) install -m 0755 libwiringPiDev.so.$(VERSION) $(CURDIR)/../debian-template/wiringPi/usr/lib/libwiringPiDev.so.$(VERSION)
ln -sf ~/wiringPi/debian-template/wiringPi/usr/lib/libwiringPiDev.so.$(VERSION) ~/wiringPi/debian-template/wiringPi/usr/lib/libwiringPiDev.so ln -sf $(CURDIR)/../debian-template/wiringPi/usr/lib/libwiringPiDev.so.$(VERSION) $(CURDIR)/../debian-template/wiringPi/usr/lib/libwiringPiDev.so
.PHONY: uninstall .PHONY: uninstall
uninstall: uninstall:

8
gpio/Makefile

@ -218,10 +218,10 @@ endif
.PHONY: install-deb .PHONY: install-deb
install-deb: gpio install-deb: gpio
$Q echo "[Install: deb]" $Q echo "[Install: deb]"
$Q install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/bin $Q install -m 0755 -d $(CURDIR)/../debian-template/wiringPi/usr/bin
$Q install -m 0755 gpio ~/wiringPi/debian-template/wiringPi/usr/bin $Q install -m 0755 gpio $(CURDIR)/../debian-template/wiringPi/usr/bin
$Q install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/share/man/man1 $Q install -m 0755 -d $(CURDIR)/../debian-template/wiringPi/usr/share/man/man1
$Q install -m 0644 gpio.1 ~/wiringPi/debian-template/wiringPi/usr/share/man/man1 $Q install -m 0644 gpio.1 $(CURDIR)/../debian-template/wiringPi/usr/share/man/man1
.PHONY: uninstall .PHONY: uninstall
uninstall: uninstall:

11
wiringPi/Makefile

@ -204,6 +204,7 @@ OBJ = $(SRC:.c=.o)
all: $(DYNAMIC) all: $(DYNAMIC)
.PHONY: static .PHONY: static
static: static:
$Q cat noMoreStatic $Q cat noMoreStatic
@ -242,12 +243,12 @@ install: $(DYNAMIC)
.PHONY: install-deb .PHONY: install-deb
install-deb: $(DYNAMIC) install-deb: $(DYNAMIC)
$Q echo "[Install Headers: deb]" $Q echo "[Install Headers: deb]"
$Q install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/include $Q install -m 0755 -d $(CURDIR)/../debian-template/wiringPi/usr/include
$Q install -m 0644 $(HEADERS) ~/wiringPi/debian-template/wiringPi/usr/include $Q install -m 0644 $(HEADERS) $(CURDIR)/../debian-template/wiringPi/usr/include
$Q echo "[Install Dynamic Lib: deb]" $Q echo "[Install Dynamic Lib: deb]"
install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/lib install -m 0755 -d $(CURDIR)/../debian-template/wiringPi/usr/lib
install -m 0755 libwiringPi.so.$(VERSION) ~/wiringPi/debian-template/wiringPi/usr/lib/libwiringPi.so.$(VERSION) install -m 0755 libwiringPi.so.$(VERSION) $(CURDIR)/../debian-template/wiringPi/usr/lib/libwiringPi.so.$(VERSION)
ln -sf ~/wiringPi/debian-template/wiringPi/usr/lib/libwiringPi.so.$(VERSION) ~/wiringPi/debian-template/wiringPi/usr/lib/libwiringPi.so ln -sf $(CURDIR)/../debian-template/wiringPi/usr/lib/libwiringPi.so.$(VERSION) $(CURDIR)/../debian-template/wiringPi/usr/lib/libwiringPi.so
.PHONY: uninstall .PHONY: uninstall
uninstall: uninstall:

8
wiringPiD/Makefile

@ -78,10 +78,10 @@ install: wiringpid
.PHONY: install-deb .PHONY: install-deb
install-deb: gpio install-deb: gpio
$Q echo "[Install: deb]" $Q echo "[Install: deb]"
$Q install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/bin $Q install -m 0755 -d $(CURDIR)/../debian-template/wiringPi/usr/bin
$Q install -m 0755 gpio ~/wiringPi/debian-template/wiringPi/usr/bin $Q install -m 0755 gpio $(CURDIR)/../debian-template/wiringPi/usr/bin
$Q install -m 0755 -d ~/wiringPi/debian-template/wiringPi/man/man1 $Q install -m 0755 -d $(CURDIR)/../debian-template/wiringPi/man/man1
$Q install -m 0644 gpio.1 ~/wiringPi/debian-template/wiringPi/man/man1 $Q install -m 0644 gpio.1 $(CURDIR)/../debian-template/wiringPi/man/man1
.PHONY: uninstall .PHONY: uninstall
uninstall: uninstall:

Loading…
Cancel
Save