@@ -84,14 +84,15 @@ fi | |||||
if [ x$1 = "xdebian" ]; then | if [ x$1 = "xdebian" ]; then | ||||
here=`pwd` | here=`pwd` | ||||
deb_destdir=${here}/debian-template/wiringPi | |||||
cd debian-template/wiringPi | cd debian-template/wiringPi | ||||
rm -rf usr | rm -rf usr | ||||
cd $here/wiringPi | cd $here/wiringPi | ||||
make install-deb | |||||
make install-deb DEB_DESTDIR=${deb_destdir} | |||||
cd $here/devLib | cd $here/devLib | ||||
make install-deb INCLUDE='-I. -I../wiringPi' | |||||
make install-deb INCLUDE='-I. -I../wiringPi' DEB_DESTDIR=${deb_destdir} | |||||
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 DEB_DESTDIR=${deb_destdir} | |||||
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 | ||||
@@ -105,15 +105,21 @@ install-static: $(STATIC) | |||||
$Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib | $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib | ||||
$Q install -m 0755 libwiringPiDev.a $(DESTDIR)$(PREFIX)/lib | $Q install -m 0755 libwiringPiDev.a $(DESTDIR)$(PREFIX)/lib | ||||
.PHONY: check-deb-destdir | |||||
check-deb-destdir: | |||||
ifndef DEB_DESTDIR | |||||
$(error DEB_DESTDIR is undefined) | |||||
endif | |||||
.PHONY: install-deb | .PHONY: install-deb | ||||
install-deb: $(DYNAMIC) | |||||
install-deb: $(DYNAMIC) check-deb-destdir | |||||
$Q echo "[Install Headers: deb]" | $Q echo "[Install Headers: deb]" | ||||
$Q install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/include | |||||
$Q install -m 0644 $(HEADERS) ~/wiringPi/debian-template/wiringPi/usr/include | |||||
$Q install -m 0755 -d $(DEB_DESTDIR)/usr/include | |||||
$Q install -m 0644 $(HEADERS) $(DEB_DESTDIR)/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 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 | |||||
install -m 0755 -d $(DEB_DESTDIR)/usr/lib | |||||
install -m 0755 libwiringPiDev.so.$(VERSION) $(DEB_DESTDIR)/usr/lib/libwiringPiDev.so.$(VERSION) | |||||
ln -sf $(DEB_DESTDIR)/usr/lib/libwiringPiDev.so.$(VERSION) $(DEB_DESTDIR)/usr/lib/libwiringPiDev.so | |||||
.PHONY: uninstall | .PHONY: uninstall | ||||
uninstall: | uninstall: | ||||
@@ -80,13 +80,19 @@ endif | |||||
$Q mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 | $Q mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 | ||||
$Q cp gpio.1 $(DESTDIR)$(PREFIX)/share/man/man1 | $Q cp gpio.1 $(DESTDIR)$(PREFIX)/share/man/man1 | ||||
.PHONY: check-deb-destdir | |||||
check-deb-destdir: | |||||
ifndef DEB_DESTDIR | |||||
$(error DEB_DESTDIR is undefined) | |||||
endif | |||||
.PHONY: install-deb | .PHONY: install-deb | ||||
install-deb: gpio | |||||
install-deb: gpio check-deb-destdir | |||||
$Q echo "[Install: deb]" | $Q echo "[Install: deb]" | ||||
$Q install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/bin | |||||
$Q install -m 0755 gpio ~/wiringPi/debian-template/wiringPi/usr/bin | |||||
$Q install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/share/man/man1 | |||||
$Q install -m 0644 gpio.1 ~/wiringPi/debian-template/wiringPi/usr/share/man/man1 | |||||
$Q install -m 0755 -d $(DEB_DESTDIR)/usr/bin | |||||
$Q install -m 0755 gpio $(DEB_DESTDIR)/usr/bin | |||||
$Q install -m 0755 -d $(DEB_DESTDIR)/usr/share/man/man1 | |||||
$Q install -m 0644 gpio.1 $(DEB_DESTDIR)/usr/share/man/man1 | |||||
.PHONY: uninstall | .PHONY: uninstall | ||||
uninstall: | uninstall: | ||||
@@ -104,15 +104,21 @@ install: $(DYNAMIC) | |||||
$Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so | $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so | ||||
$Q $(LDCONFIG) | $Q $(LDCONFIG) | ||||
.PHONY: check-deb-destdir | |||||
check-deb-destdir: | |||||
ifndef DEB_DESTDIR | |||||
$(error DEB_DESTDIR is undefined) | |||||
endif | |||||
.PHONY: install-deb | .PHONY: install-deb | ||||
install-deb: $(DYNAMIC) | |||||
install-deb: $(DYNAMIC) check-deb-destdir | |||||
$Q echo "[Install Headers: deb]" | $Q echo "[Install Headers: deb]" | ||||
$Q install -m 0755 -d ~/wiringPi/debian-template/wiringPi/usr/include | |||||
$Q install -m 0644 $(HEADERS) ~/wiringPi/debian-template/wiringPi/usr/include | |||||
$Q install -m 0755 -d $(DEB_DESTDIR)/usr/include | |||||
$Q install -m 0644 $(HEADERS) $(DEB_DESTDIR)/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 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 | |||||
install -m 0755 -d $(DEB_DESTDIR)/usr/lib | |||||
install -m 0755 libwiringPi.so.$(VERSION) $(DEB_DESTDIR)/usr/lib/libwiringPi.so.$(VERSION) | |||||
ln -sf $(DEB_DESTDIR)/usr/lib/libwiringPi.so.$(VERSION) $(DEB_DESTDIR)/usr/lib/libwiringPi.so | |||||
.PHONY: uninstall | .PHONY: uninstall | ||||
uninstall: | uninstall: | ||||
@@ -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 gpio ~/wiringPi/debian-template/wiringPi/usr/bin | |||||
$Q install -m 0755 -d ~/wiringPi/debian-template/wiringPi/man/man1 | |||||
$Q install -m 0644 gpio.1 ~/wiringPi/debian-template/wiringPi/man/man1 | |||||
$Q install -m 0755 -d $(DEB_DESTDIR)/usr/bin | |||||
$Q install -m 0755 gpio $(DEB_DESTDIR)/usr/bin | |||||
$Q install -m 0755 -d $(DEB_DESTDIR)/man/man1 | |||||
$Q install -m 0644 gpio.1 $(DEB_DESTDIR)/man/man1 | |||||
.PHONY: uninstall | .PHONY: uninstall | ||||
uninstall: | uninstall: | ||||