Skip to content

Commit

Permalink
Rework to build by autoconf/automake and new Debian scripts
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tobetter committed Jan 20, 2022
1 parent f78d982 commit f316f52
Show file tree
Hide file tree
Showing 45 changed files with 492 additions and 1,387 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,14 @@ gpio/gpio

libs/
obj/

*.lo
*.la
*.in
*.pdf

.deps/
.libs/
.debhelper/
m4/
autom4te.cache/
29 changes: 29 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}

pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libwiringpi2.pc

SUBDIRS = wiringPi wiringPiD devLib gpio

wiringpi_includedir = ${includedir}/wiringpi2
wiringpi_include_HEADERS = \
devLib/ds1302.h \
devLib/font.h \
devLib/gertboard.h \
devLib/lcd.h \
devLib/lcd128x64.h \
devLib/maxdetect.h \
devLib/piFace.h \
devLib/piGlow.h \
devLib/piNes.h \
devLib/scrollPhat.h \
devLib/scrollPhatFont.h \
wiringPi/drcSerial.h \
wiringPi/max31855.h \
wiringPi/mcp23017.h \
wiringPi/pcf8591.h \
wiringPi/sn3218.h \
wiringPi/softPwm.h \
wiringPi/softTone.h \
wiringPi/wiringPi.h \
wiringPi/wiringSerial.h
3 changes: 3 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

autoreconf -v --install || exit 1
208 changes: 0 additions & 208 deletions build

This file was deleted.

61 changes: 61 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
AC_PREREQ([2.69])
AC_INIT([odroid-wiringpi], [3.0], [[email protected]])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])

CURRENT=2
REVISION=0
AGE=0
AC_SUBST([LIBWIRINGPI_VERSION], [$CURRENT:$REVISION:$AGE])

AC_SUBST([EXTRA_CFLAGS], "-Wformat=2 -Wall -Wextra -Winline -Wno-format-truncation -pipe -fPIC")

pkgconfigdir=${libdir}/pkgconfig
AC_SUBST(pkgconfigdir)

# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB

# Checks for libraries.
PKG_CHECK_MODULES([LIBCRYPT], [libcrypt])

# Checks for header files.
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])

AM_INIT_AUTOMAKE([foreign])
#AM_MAINTAINER_MODE

AC_CONFIG_MACRO_DIRS([m4])
AC_PROG_LIBTOOL

# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT16_T
AC_TYPE_INT8_T
AC_TYPE_PID_T
AC_TYPE_UID_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T

# Checks for library functions.
AC_FUNC_CHOWN
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_CHECK_FUNCS([clock_gettime floor ftruncate gettimeofday memset pow rint socket strcasecmp strchr strerror strstr strtol strtoul uname])

AC_CONFIG_FILES([
Makefile
devLib/Makefile
gpio/Makefile
libwiringpi2.pc
pins/Makefile
wiringPi/Makefile
wiringPiD/Makefile])
AC_OUTPUT
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
odroid-wiringpi (3.12) stable; urgency=medium

* Rework Debian package scripts

-- Dongjin Kim <[email protected]> Wed, 19 Jan 2022 08:57:34 +0000

odroid-wiringpi (9:3.9) stable; urgency=medium

* WiringPi: Android: Add odroidhc4.c to compile on the android platform
Expand Down
2 changes: 1 addition & 1 deletion debian/compat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10
13
40 changes: 28 additions & 12 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,41 @@ Priority: optional
Maintainer: Deokgyu Yang <[email protected]>, Steve Jeong <[email protected]>
Standards-Version: 3.8.0
Homepage: https://wiki.odroid.com
Build-Depends: debhelper (>= 10)
Build-Depends: debhelper (>= 10),
libc6-dev,
libcrypt-dev,
libgpiod-dev,
texlive-latex-base,
texlive-fonts-recommended

Package: odroid-wiringpi
Architecture: any
Depends: ${misc:Depends}, libwiringpi2 (= ${binary:Version})
Description: gpio utility for ODROID
The wiringPi gpio command line utility, for GPIO access on a
ODROID from the command line.

Package: libwiringpi2
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libgpiod-dev
Description: GPIO libraries for ODROID (runtime).
Runtime for the popular wiringPi library.

Package: odroid-wiringpi
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libwiringpi2 (= ${binary:Version})
Description: gpio utility for ODROID
The wiringPi gpio command line utility, for GPIO access on a
ODROID from the command line.
Runtime for the popular wiringPi library.

Package: libwiringpi-dev
Architecture: any
Depends: libc6-dev, ${misc:Depends}, libwiringpi2 (= ${binary:Version}), odroid-wiringpi (= ${binary:Version}),
Depends: ${misc:Depends},
libc6-dev,
libgpiod-dev,
libwiringpi2 (= ${binary:Version}),
odroid-wiringpi (= ${binary:Version})
Description: GPIO development library for ODROID
Development libraries to allow GPIO access on a ODROID from C
and C++ programs.
Development libraries to allow GPIO access on a ODROID from C
and C++ programs.

Package: wiringpi-examples
Architecture: any
Depends: libwiringpi-dev
Description: GPIO development library examples for ODROID
Development libraries to allow GPIO access on a ODROID from C
and C++ programs.
Loading

0 comments on commit f316f52

Please sign in to comment.