Skip to content

Commit 26c7fe3

Browse files
committed
Updated from git.drogon.net
1 parent ddf1b3f commit 26c7fe3

File tree

151 files changed

+17263
-1260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+17263
-1260
lines changed

INSTALL

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,6 @@ To un-install wiringPi:
3030

3131
./build uninstall
3232

33-
34-
I2C:
35-
36-
If your system has the correct i2c-dev libraries and headers installed,
37-
then the I2C helpers will be compiled into wiringPi. If you want to
38-
use the I2C helpers and don't have them installed, then under Raspbian,
39-
issue the command:
40-
41-
sudo apt-get install libi2c-dev
42-
43-
Consult the documentation for your system if you are not running Raspbian.
44-
4533
Gordon Henderson
4634

4735

People

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ CHARLES Thibaut:
2525

2626
Xian Stannard
2727
Fixing some typos in the man page!
28+
29+
Andre Crone
30+
Suggested the __WIRING_PI.H__ round wiringPi.h
31+
32+
Rik Teerling
33+
Pointing out some silly mistooks in the I2C code...

README.TXT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ accepted to Github....
1616

1717
Please see
1818

19-
https://projects.drogon.net/raspberry-pi/wiringpi/
19+
http://wiringpi.com/
2020

2121
for the official documentation, etc. and the best way to submit bug reports, etc.
2222
is by sending an email to [email protected]

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.31

build

Lines changed: 130 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,37 @@
1-
#!/bin/bash
1+
#!/bin/sh -e
22

3-
check-make-ok()
4-
{
3+
# build
4+
# Simple wiringPi build and install script
5+
#
6+
# Copyright (c) 2012-2015 Gordon Henderson
7+
#################################################################################
8+
# This file is part of wiringPi:
9+
# Wiring Compatable library for the Raspberry Pi
10+
#
11+
# wiringPi is free software: you can redistribute it and/or modify
12+
# it under the terms of the GNU Lesser General Public License as published by
13+
# the Free Software Foundation, either version 3 of the License, or
14+
# (at your option) any later version.
15+
#
16+
# wiringPi is distributed in the hope that it will be useful,
17+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
# GNU Lesser General Public License for more details.
20+
#
21+
# You should have received a copy of the GNU Lesser General Public License
22+
# along with wiringPi. If not, see <http://www.gnu.org/licenses/>.
23+
#################################################################################
24+
#
25+
# wiringPi is designed to run on a Raspberry Pi only.
26+
# However if you're clever enough to actually look at this script to
27+
# see why it's not building for you, then good luck.
28+
#
29+
# To everyone else: Stop using cheap alternatives. Support the
30+
# Raspberry Pi Foundation as they're the only ones putting money
31+
# back into education!
32+
#################################################################################
33+
34+
check_make_ok() {
535
if [ $? != 0 ]; then
636
echo ""
737
echo "Make Failed..."
@@ -13,67 +43,120 @@ check-make-ok()
1343
fi
1444
}
1545

46+
sudo=${WIRINGPI_SUDO-sudo}
47+
1648
if [ x$1 = "xclean" ]; then
17-
echo Cleaning
18-
echo
1949
cd wiringPi
20-
make clean
50+
echo -n "wiringPi: " ; make clean
51+
cd ../devLib
52+
echo -n "DevLib: " ; make clean
2153
cd ../gpio
22-
make clean
54+
echo -n "gpio: " ; make clean
2355
cd ../examples
24-
make clean
56+
echo -n "Examples: " ; make clean
57+
cd Gertboard
58+
echo -n "Gertboard: " ; make clean
59+
cd ../PiFace
60+
echo -n "PiFace: " ; make clean
61+
cd ../q2w
62+
echo -n "Quick2Wire: " ; make clean
63+
cd ../PiGlow
64+
echo -n "PiGlow: " ; make clean
2565
exit
2666
fi
2767

2868
if [ x$1 = "xuninstall" ]; then
29-
echo Uninstalling
30-
echo
31-
echo "WiringPi library"
3269
cd wiringPi
33-
sudo make uninstall
34-
echo
35-
echo "GPIO Utility"
70+
echo -n "wiringPi: " ; $sudo make uninstall
71+
cd ../devLib
72+
echo -n "DevLib: " ; $sudo make uninstall
3673
cd ../gpio
37-
sudo make uninstall
38-
cd ..
74+
echo -n "gpio: " ; $sudo make uninstall
75+
exit
76+
fi
77+
78+
# Only if you know what you're doing!
79+
80+
if [ x$1 = "xdebian" ]; then
81+
here=`pwd`
82+
cd debian-template/wiringPi
83+
rm -rf usr
84+
cd $here/wiringPi
85+
make install-deb
86+
cd $here/devLib
87+
make install-deb INCLUDE='-I. -I../wiringPi'
88+
cd $here/gpio
89+
make install-deb INCLUDE='-I../wiringPi -I../devLib' LDFLAGS=-L../debian-template/wiringPi/usr/lib
90+
cd $here/debian-template
91+
fakeroot dpkg-deb --build wiringPi
92+
mv wiringPi.deb wiringpi-`cat $here/VERSION`-1.deb
3993
exit
4094
fi
4195

96+
if [ x$1 != "x" ]; then
97+
echo "Usage: $0 [clean | uninstall]"
98+
exit 1
99+
fi
42100

43101
echo "wiringPi Build script"
44102
echo "====================="
45103
echo
46104

47-
# Check for I2C being installed...
48-
# ... and if-so, then automatically make the I2C helpers
49-
50-
if [ -f /usr/include/linux/i2c-dev.h ]; then
51-
grep -q i2c_smbus_read_byte /usr/include/linux/i2c-dev.h
52-
if [ $? = 0 ]; then
53-
target=i2c
54-
echo "Building wiringPi with the I2C helper libraries."
55-
else
56-
target=all
57-
echo "The wiringPi I2C helper libraries will not be built."
58-
fi
59-
fi
105+
hardware=`fgrep Hardware /proc/cpuinfo | head -1 | awk '{ print $3 }'`
106+
107+
# if [ x$hardware != "xBCM2708" ]; then
108+
# echo ""
109+
# echo " +------------------------------------------------------------+"
110+
# echo " | wiringPi is designed to run on the Raspberry Pi only. |"
111+
# echo " | This processor does not appear to be a Raspberry Pi. |"
112+
# echo " +------------------------------------------------------------+"
113+
# echo " | In the unlikely event that you think it is a Raspberry Pi, |"
114+
# echo " | then please accept my apologies and email the contents of |"
115+
# echo " | /proc/cpuinfo to [email protected]. |"
116+
# echo " | - Thanks, Gordon |"
117+
# echo " +------------------------------------------------------------+"
118+
# echo ""
119+
# exit 1
120+
# fi
121+
60122

61123
echo
62-
echo "WiringPi library"
124+
echo "WiringPi Library"
63125
cd wiringPi
64-
sudo make uninstall
65-
make $target
66-
check-make-ok
67-
sudo make install
68-
check-make-ok
126+
$sudo make uninstall
127+
if [ x$1 = "xstatic" ]; then
128+
make -j5 static
129+
check_make_ok
130+
$sudo make install-static
131+
else
132+
make -j5
133+
check_make_ok
134+
$sudo make install
135+
fi
136+
check_make_ok
137+
138+
echo
139+
echo "WiringPi Devices Library"
140+
cd ../devLib
141+
$sudo make uninstall
142+
if [ x$1 = "xstatic" ]; then
143+
make -j5 static
144+
check_make_ok
145+
$sudo make install-static
146+
else
147+
make -j5
148+
check_make_ok
149+
$sudo make install
150+
fi
151+
check_make_ok
69152

70153
echo
71154
echo "GPIO Utility"
72155
cd ../gpio
73-
make
74-
check-make-ok
75-
sudo make install
76-
check-make-ok
156+
make -j5
157+
check_make_ok
158+
$sudo make install
159+
check_make_ok
77160

78161
# echo
79162
# echo "Examples"
@@ -83,3 +166,11 @@ fi
83166

84167
echo
85168
echo All Done.
169+
echo ""
170+
echo "NOTE: To compile programs with wiringPi, you need to add:"
171+
echo " -lwiringPi"
172+
echo " to your compile line(s) To use the Gertboard, MaxDetect, etc."
173+
echo " code (the devLib), you need to also add:"
174+
echo " -lwiringPiDev"
175+
echo " to your compile line(s)."
176+
echo ""
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Package: wiringpi
2+
Version: 2.31
3+
Section: libraries
4+
Priority: optional
5+
Architecture: armhf
6+
Depends: libc6
7+
Maintainer: Gordon Henderson <[email protected]>
8+
Description: The wiringPi libraries, headers and gpio command
9+
Libraries to allow GPIO access on a Raspberry Pi from C and C++
10+
programs as well as from the command-line
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
set -e
3+
/bin/chown root.root /usr/bin/gpio
4+
/bin/chmod 4755 /usr/bin/gpio
5+
/sbin/ldconfig
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
/sbin/ldconfig

debian/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.debhelper.log
2+
*.substvars
3+
tmp
4+
wiringpi
5+
libwiringpi2
6+
libwiringpi-dev
7+
files
8+
*.postinst.debhelper
9+
*.postrm.debhelper

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
wiringpi (2.26~iwj) rpi-unstable; urgency=low
2+
3+
* Initial version with real Debian source package build.
4+
5+
-- Ian Jackson <[email protected]> Sat, 12 Sep 2015 18:31:35 +0100
6+

0 commit comments

Comments
 (0)