Browse Source

fix deb build

Signed-off-by: Nick Xie <nick@khadas.com>
pull/68/head
Nick Xie 5 years ago
parent
commit
306078ed06
6 changed files with 20 additions and 18 deletions
  1. +3
    -3
      build
  2. +0
    -0
      debian-template/wiringPi/DEBIAN/postinst
  3. +0
    -0
      debian-template/wiringPi/DEBIAN/postrm
  4. +6
    -5
      devLib/Makefile
  5. +5
    -4
      gpio/Makefile
  6. +6
    -6
      wiringPi/Makefile

+ 3
- 3
build View File

@@ -87,11 +87,11 @@ if [ x$1 = "xdebian" ]; then
cd debian-template/wiringPi
rm -rf usr
cd $here/wiringPi
make install-deb
DEBTEMPDIR=$here make install-deb
cd $here/devLib
make install-deb INCLUDE='-I. -I../wiringPi'
DEBTEMPDIR=$here make install-deb INCLUDE='-I. -I../wiringPi'
cd $here/gpio
make install-deb INCLUDE='-I../wiringPi -I../devLib' LDFLAGS=-L../debian-template/wiringPi/usr/lib
DEBTEMPDIR=$here 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


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


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


+ 6
- 5
devLib/Makefile View File

@@ -24,6 +24,7 @@
VERSION=$(shell cat ../VERSION)
DESTDIR?=/usr
PREFIX?=/local
DEBTEMPDIR?=~/WiringPi

LDCONFIG?=ldconfig

@@ -108,12 +109,12 @@ install-static: $(STATIC)
.PHONY: install-deb
install-deb: $(DYNAMIC)
$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 $(DEBTEMPDIR)/debian-template/wiringPi/usr/local/include
$Q install -m 0644 $(HEADERS) $(DEBTEMPDIR)/debian-template/wiringPi/usr/local/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 $(DEBTEMPDIR)/debian-template/wiringPi/usr/local/lib
install -m 0755 libwiringPiDev.so.$(VERSION) $(DEBTEMPDIR)/debian-template/wiringPi/usr/local/lib/libwiringPiDev.so.$(VERSION)
cd $(DEBTEMPDIR)/debian-template/wiringPi/usr/local/lib && ln -sf libwiringPiDev.so.$(VERSION) libwiringPiDev.so

.PHONY: uninstall
uninstall:


+ 5
- 4
gpio/Makefile View File

@@ -25,6 +25,7 @@

DESTDIR?=/usr
PREFIX?=/local
DEBTEMPDIR?=~/WiringPi

ifneq ($V,1)
Q ?= @
@@ -83,10 +84,10 @@ endif
.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/usr/share/man/man1
$Q install -m 0644 gpio.1 ~/wiringPi/debian-template/wiringPi/usr/share/man/man1
$Q install -m 0755 -d $(DEBTEMPDIR)/debian-template/wiringPi/usr/local/bin
$Q install -m 0755 gpio $(DEBTEMPDIR)/debian-template/wiringPi/usr/local/bin
$Q install -m 0755 -d $(DEBTEMPDIR)/debian-template/wiringPi/usr/share/man/man1
$Q install -m 0644 gpio.1 $(DEBTEMPDIR)/debian-template/wiringPi/usr/share/man/man1

.PHONY: uninstall
uninstall:


+ 6
- 6
wiringPi/Makefile View File

@@ -24,6 +24,7 @@
VERSION=$(shell cat ../VERSION)
DESTDIR?=/usr
PREFIX?=/local
DEBTEMPDIR?=~/WiringPi

LDCONFIG?=ldconfig

@@ -89,7 +90,6 @@ $(DYNAMIC): $(OBJ)
clean:
$Q echo "[Clean]"
$Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPi.*

.PHONY: tags
tags: $(SRC)
$Q echo [ctags]
@@ -110,12 +110,12 @@ install: $(DYNAMIC)
.PHONY: install-deb
install-deb: $(DYNAMIC)
$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 $(DEBTEMPDIR)/debian-template/wiringPi/usr/local/include
$Q install -m 0644 $(HEADERS) $(DEBTEMPDIR)/debian-template/wiringPi/usr/local/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 $(DEBTEMPDIR)/debian-template/wiringPi/usr/local/lib
install -m 0755 libwiringPi.so.$(VERSION) $(DEBTEMPDIR)/debian-template/wiringPi/usr/local/lib/libwiringPi.so.$(VERSION)
cd $(DEBTEMPDIR)/debian-template/wiringPi/usr/local/lib && ln -sf libwiringPi.so.$(VERSION) libwiringPi.so && cd -

.PHONY: uninstall
uninstall:


Loading…
Cancel
Save