From ac0f074ff7b79eb5201fdbbb5a44200ada2a6f99 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 12 Sep 2015 17:25:39 +0000 Subject: [PATCH] Build system: Move template-based debian build into debian-template We are going to want to introduce a real Debian source package build system. But that needs to contain a lot of things in debian/ which ought not to appear in the .deb made by the existing ad-hoc `./build debian' arrangements, which we want to keep so as not to unduly disturb existing users. So rename the whole debian/ directory to debian-template/ and change all references in the build system. Signed-off-by: Ian Jackson --- .gitignore | 4 ++-- build | 6 +++--- debian-template/wiringPi/DEBIAN/control | 10 ++++++++++ debian-template/wiringPi/DEBIAN/postinst | 5 +++++ debian-template/wiringPi/DEBIAN/postrm | 2 ++ debian/wiringPi/DEBIAN/control | 10 ---------- debian/wiringPi/DEBIAN/postinst | 5 ----- debian/wiringPi/DEBIAN/postrm | 2 -- devLib/Makefile | 10 +++++----- gpio/Makefile | 4 ++-- wiringPi/Makefile | 10 +++++----- 11 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 debian-template/wiringPi/DEBIAN/control create mode 100755 debian-template/wiringPi/DEBIAN/postinst create mode 100755 debian-template/wiringPi/DEBIAN/postrm delete mode 100644 debian/wiringPi/DEBIAN/control delete mode 100755 debian/wiringPi/DEBIAN/postinst delete mode 100755 debian/wiringPi/DEBIAN/postrm diff --git a/.gitignore b/.gitignore index c1855e9..ed2ec80 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,6 @@ *.so lib*.so.* *~ -debian/wiringPi -debian/wiringpi-*.deb +debian-template/wiringPi +debian-template/wiringpi-*.deb gpio/gpio diff --git a/build b/build index 00a366b..524c14a 100755 --- a/build +++ b/build @@ -77,15 +77,15 @@ fi if [ x$1 = "xdebian" ]; then here=`pwd` - cd debian/wiringPi + cd debian-template/wiringPi rm -rf usr cd $here/wiringPi make install-deb cd $here/devLib make install-deb INCLUDE='-I. -I../wiringPi' cd $here/gpio - make install-deb INCLUDE='-I../wiringPi -I../devLib' LDFLAGS=-L../debian/wiringPi/usr/lib - cd $here/debian + make install-deb INCLUDE='-I../wiringPi -I../devLib' LDFLAGS=-L../debian-template/wiringPi/usr/lib + cd $here/debian-template fakeroot dpkg-deb --build wiringPi mv wiringPi.deb wiringpi-`cat $here/VERSION`-1.deb exit diff --git a/debian-template/wiringPi/DEBIAN/control b/debian-template/wiringPi/DEBIAN/control new file mode 100644 index 0000000..73ee094 --- /dev/null +++ b/debian-template/wiringPi/DEBIAN/control @@ -0,0 +1,10 @@ +Package: wiringpi +Version: 2.24 +Section: libraries +Priority: optional +Architecture: armhf +Depends: libc6 +Maintainer: Gordon Henderson +Description: The wiringPi libraries, headers and gpio command + Libraries to allow GPIO access on a Raspberry Pi from C and C++ + programs as well as from the command-line diff --git a/debian-template/wiringPi/DEBIAN/postinst b/debian-template/wiringPi/DEBIAN/postinst new file mode 100755 index 0000000..4997e98 --- /dev/null +++ b/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 diff --git a/debian-template/wiringPi/DEBIAN/postrm b/debian-template/wiringPi/DEBIAN/postrm new file mode 100755 index 0000000..4be8c58 --- /dev/null +++ b/debian-template/wiringPi/DEBIAN/postrm @@ -0,0 +1,2 @@ +#!/bin/sh +/sbin/ldconfig diff --git a/debian/wiringPi/DEBIAN/control b/debian/wiringPi/DEBIAN/control deleted file mode 100644 index 73ee094..0000000 --- a/debian/wiringPi/DEBIAN/control +++ /dev/null @@ -1,10 +0,0 @@ -Package: wiringpi -Version: 2.24 -Section: libraries -Priority: optional -Architecture: armhf -Depends: libc6 -Maintainer: Gordon Henderson -Description: The wiringPi libraries, headers and gpio command - Libraries to allow GPIO access on a Raspberry Pi from C and C++ - programs as well as from the command-line diff --git a/debian/wiringPi/DEBIAN/postinst b/debian/wiringPi/DEBIAN/postinst deleted file mode 100755 index 4997e98..0000000 --- a/debian/wiringPi/DEBIAN/postinst +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -set -e -/bin/chown root.root /usr/bin/gpio -/bin/chmod 4755 /usr/bin/gpio -/sbin/ldconfig diff --git a/debian/wiringPi/DEBIAN/postrm b/debian/wiringPi/DEBIAN/postrm deleted file mode 100755 index 4be8c58..0000000 --- a/debian/wiringPi/DEBIAN/postrm +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -/sbin/ldconfig diff --git a/devLib/Makefile b/devLib/Makefile index 5cac38e..48cf3ae 100644 --- a/devLib/Makefile +++ b/devLib/Makefile @@ -104,12 +104,12 @@ install-static: $(STATIC) .PHONY: install-deb install-deb: $(DYNAMIC) $Q echo "[Install Headers: deb]" - $Q install -m 0755 -d ~/wiringPi/debian/wiringPi/usr/include - $Q install -m 0644 $(HEADERS) ~/wiringPi/debian/wiringPi/usr/include + $Q install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/include + $Q install -m 0644 $(HEADERS) ~/wiringPi/debian-template/wiringPi/usr/include $Q echo "[Install Dynamic Lib: deb]" - install -m 0755 -d ~/wiringPi/debian/wiringPi/usr/lib - install -m 0755 libwiringPiDev.so.$(VERSION) ~/wiringPi/debian/wiringPi/usr/lib/libwiringPiDev.so.$(VERSION) - ln -sf ~/wiringPi/debian/wiringPi/usr/lib/libwiringPiDev.so.$(VERSION) ~/wiringPi/debian/wiringPi/usr/lib/libwiringPiDev.so + install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/lib + install -m 0755 libwiringPiDev.so.$(VERSION) ~/wiringPi/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 .PHONY: uninstall uninstall: diff --git a/gpio/Makefile b/gpio/Makefile index 82416a7..82a817c 100644 --- a/gpio/Makefile +++ b/gpio/Makefile @@ -81,8 +81,8 @@ install: gpio .PHONY: install-deb install-deb: gpio $Q echo "[Install: deb]" - $Q install -m 0755 -d ~/wiringPi/debian/wiringPi/usr/bin - $Q install -m 0755 gpio ~/wiringPi/debian/wiringPi/usr/bin + $Q install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/bin + $Q install -m 0755 gpio ~/wiringPi/debian-template/wiringPi/usr/bin .PHONY: uninstall uninstall: diff --git a/wiringPi/Makefile b/wiringPi/Makefile index bc8c848..3a1b99f 100644 --- a/wiringPi/Makefile +++ b/wiringPi/Makefile @@ -128,12 +128,12 @@ install-static: $(STATIC) .PHONY: install-deb install-deb: $(DYNAMIC) $Q echo "[Install Headers: deb]" - $Q install -m 0755 -d ~/wiringPi/debian/wiringPi/usr/include - $Q install -m 0644 $(HEADERS) ~/wiringPi/debian/wiringPi/usr/include + $Q install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/include + $Q install -m 0644 $(HEADERS) ~/wiringPi/debian-template/wiringPi/usr/include $Q echo "[Install Dynamic Lib: deb]" - install -m 0755 -d ~/wiringPi/debian/wiringPi/usr/lib - install -m 0755 libwiringPi.so.$(VERSION) ~/wiringPi/debian/wiringPi/usr/lib/libwiringPi.so.$(VERSION) - ln -sf ~/wiringPi/debian/wiringPi/usr/lib/libwiringPi.so.$(VERSION) ~/wiringPi/debian/wiringPi/usr/lib/libwiringPi.so + install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/lib + install -m 0755 libwiringPi.so.$(VERSION) ~/wiringPi/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 .PHONY: uninstall uninstall: