Browse Source

Remove hard-coded destination paths for debian package creation.

pull/79/head
David Antliff 4 years ago
parent
commit
f9ff3b4d35
7 changed files with 43 additions and 24 deletions
  1. +4
    -3
      build
  2. +0
    -0
      debian-template/wiringPi/DEBIAN/postinst
  3. +0
    -0
      debian-template/wiringPi/DEBIAN/postrm
  4. +12
    -6
      devLib/Makefile
  5. +11
    -5
      gpio/Makefile
  6. +12
    -6
      wiringPi/Makefile
  7. +4
    -4
      wiringPiD/Makefile

+ 4
- 3
build View File

@@ -84,14 +84,15 @@ fi

if [ x$1 = "xdebian" ]; then
here=`pwd`
deb_destdir=${here}/debian-template/wiringPi
cd debian-template/wiringPi
rm -rf usr
cd $here/wiringPi
make install-deb
make install-deb DEB_DESTDIR=${deb_destdir}
cd $here/devLib
make install-deb INCLUDE='-I. -I../wiringPi'
make install-deb INCLUDE='-I. -I../wiringPi' DEB_DESTDIR=${deb_destdir}
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
fakeroot dpkg-deb --build wiringPi
mv wiringPi.deb wiringpi-`cat $here/VERSION`-1.deb


+ 0
- 0
debian-template/wiringPi/DEBIAN/postinst View File


+ 0
- 0
debian-template/wiringPi/DEBIAN/postrm View File


+ 12
- 6
devLib/Makefile View File

@@ -105,15 +105,21 @@ install-static: $(STATIC)
$Q install -m 0755 -d $(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
install-deb: $(DYNAMIC)
install-deb: $(DYNAMIC) check-deb-destdir
$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]"
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
uninstall:


+ 11
- 5
gpio/Makefile View File

@@ -80,13 +80,19 @@ endif
$Q mkdir -p $(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
install-deb: gpio
install-deb: gpio check-deb-destdir
$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
uninstall:


+ 12
- 6
wiringPi/Makefile View File

@@ -104,15 +104,21 @@ install: $(DYNAMIC)
$Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so
$Q $(LDCONFIG)

.PHONY: check-deb-destdir
check-deb-destdir:
ifndef DEB_DESTDIR
$(error DEB_DESTDIR is undefined)
endif

.PHONY: install-deb
install-deb: $(DYNAMIC)
install-deb: $(DYNAMIC) check-deb-destdir
$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]"
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
uninstall:


+ 4
- 4
wiringPiD/Makefile View File

@@ -78,10 +78,10 @@ install: wiringpid
.PHONY: install-deb
install-deb: gpio
$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
uninstall:


Loading…
Cancel
Save