Skip to content

Commit

Permalink
Merge pull request WiringPi#196 from WiringPi/revision
Browse files Browse the repository at this point in the history
Revision 3.1
  • Loading branch information
mwallner authored Mar 10, 2024
2 parents 0bd1a30 + 07cd89b commit 7451054
Show file tree
Hide file tree
Showing 12 changed files with 277 additions and 212 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0
3.1
7 changes: 5 additions & 2 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# build
# Simple wiringPi build and install script
#
# Copyright (c) 2012-2015 Gordon Henderson
# Copyright (c) 2012-2024 Gordon Henderson and contributors
#################################################################################
# This file is part of wiringPi:
# A "wiring" library for the Raspberry Pi
Expand Down Expand Up @@ -83,11 +83,14 @@ fi
# Only if you know what you're doing!

if [ x$1 = "xdebian" ]; then
vMaj=`cut -d. -f1 VERSION`
vMin=`cut -d. -f2 VERSION`
here=`pwd`
deb_destdir=${here}/debian-template/wiringPi
cd debian-template/wiringPi
export VERSION=$vMaj.$vMin
export ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)
echo architecture $ARCH
echo version:$VERSION architecture:$ARCH
envsubst < control_template > DEBIAN/control
rm -rf usr
cd $here/wiringPi
Expand Down
3 changes: 2 additions & 1 deletion debian-template/wiringPi/control_template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: wiringpi
Version: 3.0
Version: $VERSION
Section: libraries
Priority: optional
Architecture: $ARCH
Expand All @@ -11,3 +11,4 @@ Description: The wiringPi libraries, headers and gpio command
programs as well as from the command-line
Homepage: https://github.com/WiringPi/WiringPi
Bugs: https://github.com/WiringPi/WiringPi/issues

2 changes: 1 addition & 1 deletion gpio/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ static void doUnLoad (int argc, char *argv [])

static void doI2Cdetect (UNU int argc, char *argv [])
{
int port = piGpioLayout () == 1 ? 0 : 1 ;
int port = piGpioLayout () == GPIO_LAYOUT_PI1_REV1 ? 0 : 1 ;
char *c, *command ;

if ((c = findExecutable (I2CDETECT)) == NULL)
Expand Down
16 changes: 0 additions & 16 deletions newVersion
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,3 @@ echo "#define VERSION \"`cat VERSION`\"" > version.h
echo "#define VERSION_MAJOR $vMaj" >> 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`
Section: libraries
Priority: optional
Architecture: armhf
Depends: libc6
Maintainer: Grazer Computer Club - GC2 <[email protected]>
Uploaders: Grazer Computer Club - GC2 <[email protected]>
Description: The wiringPi libraries, headers and gpio command
Libraries to allow GPIO access on a Raspberry Pi from C and C++
and BASIC programs as well as from the command-line
Homepage: https://github.com/WiringPi/WiringPi/
Bugs: https://github.com/WiringPi/WiringPi/
EOF
11 changes: 11 additions & 0 deletions reinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
vMaj=`cut -d. -f1 VERSION`
vMin=`cut -d. -f2 VERSION`
DEBVERSION=$vMaj.$vMin
sudo apt -y remove wiringpi
./build clean
./build debian
mv debian-template/wiringpi_${DEBVERSION}_armhf.deb .
sudo apt install ./wiringpi_${DEBVERSION}_armhf.deb


4 changes: 2 additions & 2 deletions version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#define VERSION "3.0"
#define VERSION "3.1"
#define VERSION_MAJOR 3
#define VERSION_MINOR 0
#define VERSION_MINOR 1
3 changes: 2 additions & 1 deletion wiringPi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ SRC = wiringPi.c \
bmp180.c htu21d.c ds18b20.c rht03.c \
drcSerial.c drcNet.c \
pseudoPins.c \
wpiExtensions.c
wpiExtensions.c \
wiringPiLegacy.c

HEADERS = $(shell ls *.h)

Expand Down
Loading

0 comments on commit 7451054

Please sign in to comment.