From 41a423e5d310fa8fcef36af09b5e013a3e169b3d Mon Sep 17 00:00:00 2001 From: Joshua Yang Date: Tue, 16 Jul 2019 18:08:16 +0900 Subject: [PATCH] wiringPi: Prepare to distribute as debian package Signed-off-by: Joshua Yang --- build | 2 +- debian-template/wiringPi/DEBIAN/control | 10 +++---- debian-template/wiringPi/DEBIAN/postinst | 0 debian-template/wiringPi/DEBIAN/postrm | 0 debian/changelog | 6 ++++ debian/compat | 2 +- debian/control | 28 +++++++++---------- debian/copyright | 16 +++++++++++ .../{wiringpi.dirs => odroid-wiringpi.dirs} | 0 ...ringpi.install => odroid-wiringpi.install} | 0 gpio/gpio.c | 7 +++-- newVersion | 12 ++++---- update | 2 +- version.h | 4 +-- wiringPi/wiringPi.c | 2 +- wiringPi/wiringPi.h | 2 +- 16 files changed, 58 insertions(+), 35 deletions(-) mode change 100644 => 100755 debian-template/wiringPi/DEBIAN/postinst mode change 100644 => 100755 debian-template/wiringPi/DEBIAN/postrm rename debian/{wiringpi.dirs => odroid-wiringpi.dirs} (100%) rename debian/{wiringpi.install => odroid-wiringpi.install} (100%) mode change 100644 => 100755 newVersion diff --git a/build b/build index 7dc074c..de36f92 100755 --- a/build +++ b/build @@ -91,7 +91,7 @@ if [ x$1 = "xdebian" ]; then 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 + mv wiringPi.deb odroid-wiringpi-`cat $here/VERSION`.deb exit fi diff --git a/debian-template/wiringPi/DEBIAN/control b/debian-template/wiringPi/DEBIAN/control index ad7d0e1..636e4d0 100644 --- a/debian-template/wiringPi/DEBIAN/control +++ b/debian-template/wiringPi/DEBIAN/control @@ -1,10 +1,10 @@ -Package: wiringpi -Version: 2.44 +Package: odroid-wiringpi +Version: 2.44-1 Section: libraries Priority: optional -Architecture: armhf +Architecture: arm64 Depends: libc6 -Maintainer: Gordon Henderson +Maintainer: Joshua Yang Description: The wiringPi libraries, headers and gpio command - Libraries to allow GPIO access on a Raspberry Pi from C and C++ + Libraries to allow GPIO access on a ODROID from C and C++ and BASIC programs as well as from the command-line diff --git a/debian-template/wiringPi/DEBIAN/postinst b/debian-template/wiringPi/DEBIAN/postinst old mode 100644 new mode 100755 diff --git a/debian-template/wiringPi/DEBIAN/postrm b/debian-template/wiringPi/DEBIAN/postrm old mode 100644 new mode 100755 diff --git a/debian/changelog b/debian/changelog index 7f04ad5..2b4dce4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +odroid-wiringpi (2.44-1) odroid-unstable; urgency=low + + * Initial version with real Debian source package build for ODROID boards. + + -- Joshua Yang Tue, 16 Jul 2019 11:13:49 +0900 + wiringpi (2.26~iwj) rpi-unstable; urgency=low * Initial version with real Debian source package build. diff --git a/debian/compat b/debian/compat index 45a4fb7..f599e28 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -8 +10 diff --git a/debian/control b/debian/control index 1d6d228..1f4610e 100644 --- a/debian/control +++ b/debian/control @@ -1,29 +1,29 @@ -Source: wiringpi +Source: odroid-wiringpi Section: electronics Priority: optional -Maintainer: Ian Jackson +Maintainer: Joshua Yang Standards-Version: 3.8.0 -Homepage: http://wiringpi.com/ -Build-Depends: debhelper (>= 8) +Homepage: https://wiki.odroid.com +Build-Depends: debhelper (>= 10) Package: libwiringpi2 Section: libs -Architecture: armhf +Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Description: GPIO librariees for Raspberry Pi (runtime). +Description: GPIO libraries for ODROID (runtime). Runtime for the popular wiringPi library. -Package: wiringpi -Architecture: armhf +Package: odroid-wiringpi +Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Description: gpio utility for Raspberry Pi +Description: gpio utility for ODROID The wiringPi gpio command line utility, for GPIO access on a - Raspberry Pi from the command line. + ODROID from the command line. Package: libwiringpi-dev -Architecture: armhf +Architecture: any Depends: libwiringpi2 (= ${binary:Version}), libc6-dev, ${misc:Depends} -Suggests: wiringpi -Description: GPIO development library for Raspberry Pi - Development libraries to allow GPIO access on a Raspberry Pi from C +Suggests: odroid-wiringpi +Description: GPIO development library for ODROID + Development libraries to allow GPIO access on a ODROID from C and C++ programs. diff --git a/debian/copyright b/debian/copyright index de82701..ba94c2d 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,3 +1,19 @@ +ODROID-WiringPi is Copyright (C) 2019 Joshua Yang. + +ODROID-WiringPi is free software; you can redistribute it and/or modify it +under the terms of the GNU Lesser General Public License, as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +ODROID-WiringPi is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +On all Debian and Raspbian systems, a copy of the GNU Lesser General +Public License version 3 can be found in +`/usr/share/common-licenses/LGPL-3'. + wiringPi is Copyright (C) 2012-2015 Gordon Henderson. wiringPi is free software; you can redistribute it and/or modify it diff --git a/debian/wiringpi.dirs b/debian/odroid-wiringpi.dirs similarity index 100% rename from debian/wiringpi.dirs rename to debian/odroid-wiringpi.dirs diff --git a/debian/wiringpi.install b/debian/odroid-wiringpi.install similarity index 100% rename from debian/wiringpi.install rename to debian/odroid-wiringpi.install diff --git a/gpio/gpio.c b/gpio/gpio.c index 34e7adb..1985a17 100755 --- a/gpio/gpio.c +++ b/gpio/gpio.c @@ -1000,10 +1000,11 @@ static void doVersion (char *argv []) char name [80] ; FILE *fd ; - int vMaj, vMin ; + int vMaj; + char *vMin[32]; - wiringPiVersion (&vMaj, &vMin) ; - printf ("gpio version: %d.%d\n", vMaj, vMin) ; + wiringPiVersion (&vMaj, vMin) ; + printf ("gpio version: %d.%s\n", vMaj, *vMin) ; printf ("Copyright (c) 2012-2017 Gordon Henderson\n") ; printf ("This is free software with ABSOLUTELY NO WARRANTY.\n") ; printf ("For details type: %s -warranty\n", argv [0]) ; diff --git a/newVersion b/newVersion old mode 100644 new mode 100755 index ed4b438..638406c --- a/newVersion +++ b/newVersion @@ -30,18 +30,18 @@ vMaj=`cut -d. -f1 VERSION` vMin=`cut -d. -f2 VERSION` echo "#define VERSION \"`cat VERSION`\"" > version.h echo "#define VERSION_MAJOR $vMaj" >> version.h -echo "#define VERSION_MINOR $vMin" >> version.h +echo "#define VERSION_MINOR \"$vMin\"" >> version.h rm -f debian-template/wiringPi/DEBIAN/control cat > debian-template/wiringPi/DEBIAN/control < +Maintainer: Joshua Yang Description: The wiringPi libraries, headers and gpio command - Libraries to allow GPIO access on a Raspberry Pi from C and C++ + Libraries to allow GPIO access on a ODROID from C and C++ and BASIC programs as well as from the command-line EOF diff --git a/update b/update index 0f72243..458ab36 100755 --- a/update +++ b/update @@ -2,4 +2,4 @@ # update - update source files from master on yakko -rsync -aHx --exclude='*.o' --exclude='*~' -v --delete gordon@yakko:rpi/git/wiringPi/ . +git pull https://github.com/hardkernel/wiringPi HEAD diff --git a/version.h b/version.h index 45b2c50..c21a2f6 100644 --- a/version.h +++ b/version.h @@ -1,3 +1,3 @@ -#define VERSION "2.44" +#define VERSION "2.44-1" #define VERSION_MAJOR 2 -#define VERSION_MINOR 44 +#define VERSION_MINOR "44-1" diff --git a/wiringPi/wiringPi.c b/wiringPi/wiringPi.c index e3cafa9..8f1f6f0 100755 --- a/wiringPi/wiringPi.c +++ b/wiringPi/wiringPi.c @@ -840,7 +840,7 @@ unsigned int micros (void) } /*----------------------------------------------------------------------------*/ -void wiringPiVersion (int *major, int *minor) +void wiringPiVersion (int *major, char **minor) { *major = VERSION_MAJOR ; *minor = VERSION_MINOR ; diff --git a/wiringPi/wiringPi.h b/wiringPi/wiringPi.h index ea42013..ecdf4c2 100755 --- a/wiringPi/wiringPi.h +++ b/wiringPi/wiringPi.h @@ -241,7 +241,7 @@ extern int msg (int type, const char *message, ...); extern int moduleLoaded (char *); // Core WiringPi functions -extern void wiringPiVersion (int *major, int *minor); +extern void wiringPiVersion (int *major, char **minor); extern int wiringPiSetup (void); extern int wiringPiSetupSys (void); extern int wiringPiSetupGpio (void);