Browse Source

initial version

Script is working
master
Franz Levin 1 year ago
committed by frazz
commit
6780a58a5c
7 changed files with 88 additions and 0 deletions
  1. +4
    -0
      .gitignore
  2. +15
    -0
      Makefile
  3. +6
    -0
      debian/changelog
  4. +1
    -0
      debian/compat
  5. +8
    -0
      debian/control
  6. +5
    -0
      debian/rules
  7. +49
    -0
      patches/makefile.patch

+ 4
- 0
.gitignore View File

@ -0,0 +1,4 @@
ArduiPi_OLED
debian/arduipi-oled*
debian/.debhelper
debian/files

+ 15
- 0
Makefile View File

@ -0,0 +1,15 @@
all: ArduiPi_OLED
git --work-tree=ArduiPi_OLED --git-dir=ArduiPi_OLED/.git checkout Makefile
git --work-tree=ArduiPi_OLED --git-dir=ArduiPi_OLED/.git pull -r
cd ArduiPi_OLED && git apply -p0 ../patches/makefile.patch
make -j4 -C ArduiPi_OLED PREFIX=/usr
ArduiPi_OLED:
git clone https://github.com/hallard/ArduiPi_OLED.git
install:
make -C ArduiPi_OLED install PREFIX=/usr
clean:
rm -rf ArduiPi_OLED

+ 6
- 0
debian/changelog View File

@ -0,0 +1,6 @@
arduipi-oled (0.0.1) buster; urgency=medium
* Initial version
-- Franz Levin <frazz@kryo.se> Sat, 28 Dec 2019 14:32:27 +0000

+ 1
- 0
debian/compat View File

@ -0,0 +1 @@
9

+ 8
- 0
debian/control View File

@ -0,0 +1,8 @@
Source: arduipi-oled
Section: main
Priority: extra
Maintainer: Franz Levin <frazz@kryo.se>
Package: arduipi-oled
Architecture: any
Description: ArduiPi_OLED

+ 5
- 0
debian/rules View File

@ -0,0 +1,5 @@
#!/usr/bin/make -f
%:
dh $@

+ 49
- 0
patches/makefile.patch View File

@ -0,0 +1,49 @@
diff --git Makefile Makefile
index f974fa7..7fc3c49 100644
--- Makefile
+++ Makefile
@@ -31,7 +31,7 @@ else # fallback to raspberry
endif
# Where you want it installed when you do 'make install'
-PREFIX=/usr/local
+PREFIX?=/usr/local
# Library parameters
# where to put the lib
@@ -47,7 +47,7 @@ CFLAGS=$(CCFLAGS)
# make all
# reinstall the library after each recompilation
-all: ArduiPi_OLED install
+all: ArduiPi_OLED
# Make the library
ArduiPi_OLED: ArduiPi_OLED.o Adafruit_GFX.o bcm2835.o Wrapper.o
@@ -69,18 +69,16 @@ Wrapper.o: Wrapper.cpp
# Install the library to LIBPATH
install:
@echo "[Install Library]"
- @if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
- @install -m 0755 ${LIBNAME} ${LIBDIR}
- @ln -sf ${LIBDIR}/${LIBNAME} ${LIBDIR}/${LIB}.so.1
- @ln -sf ${LIBDIR}/${LIBNAME} ${LIBDIR}/${LIB}.so
- @ldconfig
- @rm -rf ${LIB}.*
+ @if ( test ! -d ${DESTDIR}/$(PREFIX)/lib ) ; then mkdir -p ${DESTDIR}/$(PREFIX)/lib ; fi
+ @install -m 0755 ${LIBNAME} ${DESTDIR}/${LIBDIR}
+ @ln -sf ${LIBDIR}/${LIBNAME} ${DESTDIR}/${LIBDIR}/${LIB}.so.1
+ @ln -sf ${LIBDIR}/${LIBNAME} ${DESTDIR}/${LIBDIR}/${LIB}.so
@echo "[Install Headers]"
- @if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
- @cp -f Adafruit_*.h $(PREFIX)/include
- @cp -f ArduiPi_*.h $(PREFIX)/include
- @cp -f bcm2835.h $(PREFIX)/include
+ @if ( test ! -d ${DESTDIR}/$(PREFIX)/include ) ; then mkdir -p ${DESTDIR}/$(PREFIX)/include ; fi
+ @install -m 0644 Adafruit_*.h ${DESTDIR}/$(PREFIX)/include
+ @install -m 0644 ArduiPi_*.h ${DESTDIR}/$(PREFIX)/include
+ @install -m 0644 bcm2835.h ${DESTDIR}/$(PREFIX)/include
# Uninstall the library

Loading…
Cancel
Save