wiringPi: Prepare to distribute as debian package

Signed-off-by: Joshua Yang <joshua.yang@hardkernel.com>
This commit is contained in:
Joshua Yang
2019-07-16 18:08:16 +09:00
parent 8140e5ad84
commit 41a423e5d3
16 changed files with 58 additions and 35 deletions

2
build
View File

@@ -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

View File

@@ -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 <projects@drogon.net>
Maintainer: Joshua Yang <joshua.yang@hardkernel.com>
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

0
debian-template/wiringPi/DEBIAN/postinst Normal file → Executable file
View File

0
debian-template/wiringPi/DEBIAN/postrm Normal file → Executable file
View File

6
debian/changelog vendored
View File

@@ -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 <joshua.yang@hardkernel.com> Tue, 16 Jul 2019 11:13:49 +0900
wiringpi (2.26~iwj) rpi-unstable; urgency=low
* Initial version with real Debian source package build.

2
debian/compat vendored
View File

@@ -1 +1 @@
8
10

28
debian/control vendored
View File

@@ -1,29 +1,29 @@
Source: wiringpi
Source: odroid-wiringpi
Section: electronics
Priority: optional
Maintainer: Ian Jackson <ijackson@chiark.greenend.org.uk>
Maintainer: Joshua Yang <joshua.yang@hardkernel.com>
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.

16
debian/copyright vendored
View File

@@ -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

View File

@@ -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]) ;

12
newVersion Normal file → Executable file
View File

@@ -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 <<EOF
Package: wiringpi
Version: `cat VERSION`
Package: odroid-wiringpi
Version: $(cat VERSION)
Section: libraries
Priority: optional
Architecture: armhf
Architecture: arm64
Depends: libc6
Maintainer: Gordon Henderson <projects@drogon.net>
Maintainer: Joshua Yang <joshua.yang@hardkernel.com>
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

2
update
View File

@@ -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

View File

@@ -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"

View File

@@ -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 ;

View File

@@ -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);