Skip to content

Commit f316f52

Browse files
committed
Rework to build by autoconf/automake and new Debian scripts
Building in local machine: $ sh autogen.sh $ ./configure $ make $ sudo make install Building Debian package: $ debuild -uc -us -b Signed-off-by: Dongjin Kim <[email protected]> Change-Id: I76faa07c1586658d053a3e260ea231a19392f792
1 parent f78d982 commit f316f52

Some content is hidden

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

45 files changed

+492
-1387
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,14 @@ gpio/gpio
1313

1414
libs/
1515
obj/
16+
17+
*.lo
18+
*.la
19+
*.in
20+
*.pdf
21+
22+
.deps/
23+
.libs/
24+
.debhelper/
25+
m4/
26+
autom4te.cache/

Makefile.am

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
2+
3+
pkgconfigdir = @pkgconfigdir@
4+
pkgconfig_DATA = libwiringpi2.pc
5+
6+
SUBDIRS = wiringPi wiringPiD devLib gpio
7+
8+
wiringpi_includedir = ${includedir}/wiringpi2
9+
wiringpi_include_HEADERS = \
10+
devLib/ds1302.h \
11+
devLib/font.h \
12+
devLib/gertboard.h \
13+
devLib/lcd.h \
14+
devLib/lcd128x64.h \
15+
devLib/maxdetect.h \
16+
devLib/piFace.h \
17+
devLib/piGlow.h \
18+
devLib/piNes.h \
19+
devLib/scrollPhat.h \
20+
devLib/scrollPhatFont.h \
21+
wiringPi/drcSerial.h \
22+
wiringPi/max31855.h \
23+
wiringPi/mcp23017.h \
24+
wiringPi/pcf8591.h \
25+
wiringPi/sn3218.h \
26+
wiringPi/softPwm.h \
27+
wiringPi/softTone.h \
28+
wiringPi/wiringPi.h \
29+
wiringPi/wiringSerial.h

autogen.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
autoreconf -v --install || exit 1

build

Lines changed: 0 additions & 208 deletions
This file was deleted.

configure.ac

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
AC_PREREQ([2.69])
2+
AC_INIT([odroid-wiringpi], [3.0], [[email protected]])
3+
AC_CONFIG_SRCDIR([Makefile.am])
4+
AC_CONFIG_HEADERS([config.h])
5+
6+
CURRENT=2
7+
REVISION=0
8+
AGE=0
9+
AC_SUBST([LIBWIRINGPI_VERSION], [$CURRENT:$REVISION:$AGE])
10+
11+
AC_SUBST([EXTRA_CFLAGS], "-Wformat=2 -Wall -Wextra -Winline -Wno-format-truncation -pipe -fPIC")
12+
13+
pkgconfigdir=${libdir}/pkgconfig
14+
AC_SUBST(pkgconfigdir)
15+
16+
# Checks for programs.
17+
AC_PROG_CC
18+
AC_PROG_INSTALL
19+
AC_PROG_LN_S
20+
AC_PROG_RANLIB
21+
22+
# Checks for libraries.
23+
PKG_CHECK_MODULES([LIBCRYPT], [libcrypt])
24+
25+
# Checks for header files.
26+
AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h syslog.h termios.h unistd.h])
27+
28+
AM_INIT_AUTOMAKE([foreign])
29+
#AM_MAINTAINER_MODE
30+
31+
AC_CONFIG_MACRO_DIRS([m4])
32+
AC_PROG_LIBTOOL
33+
34+
# Checks for typedefs, structures, and compiler characteristics.
35+
AC_CHECK_HEADER_STDBOOL
36+
AC_C_INLINE
37+
AC_TYPE_INT16_T
38+
AC_TYPE_INT8_T
39+
AC_TYPE_PID_T
40+
AC_TYPE_UID_T
41+
AC_TYPE_UINT16_T
42+
AC_TYPE_UINT32_T
43+
AC_TYPE_UINT64_T
44+
AC_TYPE_UINT8_T
45+
46+
# Checks for library functions.
47+
AC_FUNC_CHOWN
48+
AC_FUNC_FORK
49+
AC_FUNC_MALLOC
50+
AC_FUNC_MMAP
51+
AC_CHECK_FUNCS([clock_gettime floor ftruncate gettimeofday memset pow rint socket strcasecmp strchr strerror strstr strtol strtoul uname])
52+
53+
AC_CONFIG_FILES([
54+
Makefile
55+
devLib/Makefile
56+
gpio/Makefile
57+
libwiringpi2.pc
58+
pins/Makefile
59+
wiringPi/Makefile
60+
wiringPiD/Makefile])
61+
AC_OUTPUT

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
odroid-wiringpi (3.12) stable; urgency=medium
2+
3+
* Rework Debian package scripts
4+
5+
-- Dongjin Kim <[email protected]> Wed, 19 Jan 2022 08:57:34 +0000
6+
17
odroid-wiringpi (9:3.9) stable; urgency=medium
28

39
* WiringPi: Android: Add odroidhc4.c to compile on the android platform

debian/compat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10
1+
13

debian/control

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,41 @@ Priority: optional
44
Maintainer: Deokgyu Yang <[email protected]>, Steve Jeong <[email protected]>
55
Standards-Version: 3.8.0
66
Homepage: https://wiki.odroid.com
7-
Build-Depends: debhelper (>= 10)
7+
Build-Depends: debhelper (>= 10),
8+
libc6-dev,
9+
libcrypt-dev,
10+
libgpiod-dev,
11+
texlive-latex-base,
12+
texlive-fonts-recommended
13+
14+
Package: odroid-wiringpi
15+
Architecture: any
16+
Depends: ${misc:Depends}, libwiringpi2 (= ${binary:Version})
17+
Description: gpio utility for ODROID
18+
The wiringPi gpio command line utility, for GPIO access on a
19+
ODROID from the command line.
820

921
Package: libwiringpi2
1022
Section: libs
1123
Architecture: any
1224
Depends: ${shlibs:Depends}, ${misc:Depends}, libgpiod-dev
1325
Description: GPIO libraries for ODROID (runtime).
14-
Runtime for the popular wiringPi library.
15-
16-
Package: odroid-wiringpi
17-
Architecture: any
18-
Depends: ${shlibs:Depends}, ${misc:Depends}, libwiringpi2 (= ${binary:Version})
19-
Description: gpio utility for ODROID
20-
The wiringPi gpio command line utility, for GPIO access on a
21-
ODROID from the command line.
26+
Runtime for the popular wiringPi library.
2227

2328
Package: libwiringpi-dev
2429
Architecture: any
25-
Depends: libc6-dev, ${misc:Depends}, libwiringpi2 (= ${binary:Version}), odroid-wiringpi (= ${binary:Version}),
30+
Depends: ${misc:Depends},
31+
libc6-dev,
32+
libgpiod-dev,
33+
libwiringpi2 (= ${binary:Version}),
34+
odroid-wiringpi (= ${binary:Version})
2635
Description: GPIO development library for ODROID
27-
Development libraries to allow GPIO access on a ODROID from C
28-
and C++ programs.
36+
Development libraries to allow GPIO access on a ODROID from C
37+
and C++ programs.
38+
39+
Package: wiringpi-examples
40+
Architecture: any
41+
Depends: libwiringpi-dev
42+
Description: GPIO development library examples for ODROID
43+
Development libraries to allow GPIO access on a ODROID from C
44+
and C++ programs.

0 commit comments

Comments
 (0)