Gordons Projects

--> Projects Top-Level GIT

Build system: Move template-based debian build into debian-template
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 12 Sep 2015 17:25:39 +0000 (17:25 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 12 Sep 2015 19:38:19 +0000 (20:38 +0100)
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 <ijackson@chiark.greenend.org.uk>
.gitignore
build
debian-template/wiringPi/DEBIAN/control [moved from debian/wiringPi/DEBIAN/control with 100% similarity]
debian-template/wiringPi/DEBIAN/postinst [moved from debian/wiringPi/DEBIAN/postinst with 100% similarity]
debian-template/wiringPi/DEBIAN/postrm [moved from debian/wiringPi/DEBIAN/postrm with 100% similarity]
devLib/Makefile
gpio/Makefile
wiringPi/Makefile

index c1855e9..ed2ec80 100644 (file)
@@ -2,6 +2,6 @@
 *.so
 lib*.so.*
 *~
 *.so
 lib*.so.*
 *~
-debian/wiringPi
-debian/wiringpi-*.deb
+debian-template/wiringPi
+debian-template/wiringpi-*.deb
 gpio/gpio
 gpio/gpio
diff --git a/build b/build
index 00a366b..524c14a 100755 (executable)
--- a/build
+++ b/build
@@ -77,15 +77,15 @@ fi
 
 if [ x$1 = "xdebian" ]; then
   here=`pwd`
 
 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
   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
   fakeroot dpkg-deb --build wiringPi
   mv wiringPi.deb  wiringpi-`cat $here/VERSION`-1.deb
   exit
index 5cac38e..48cf3ae 100644 (file)
@@ -104,12 +104,12 @@ install-static:   $(STATIC)
 .PHONY:        install-deb
 install-deb:   $(DYNAMIC)
        $Q echo "[Install Headers: deb]"
 .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]"
        $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:
 
 .PHONY:        uninstall
 uninstall:
index 82416a7..82a817c 100644 (file)
@@ -81,8 +81,8 @@ install: gpio
 .PHONY:        install-deb
 install-deb:   gpio
        $Q echo "[Install: deb]"
 .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:
 
 .PHONY:        uninstall
 uninstall:
index bc8c848..3a1b99f 100644 (file)
@@ -128,12 +128,12 @@ install-static:   $(STATIC)
 .PHONY:        install-deb
 install-deb:   $(DYNAMIC)
        $Q echo "[Install Headers: deb]"
 .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]"
        $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:
 
 .PHONY:        uninstall
 uninstall: