Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated debian configuration for package #69

Open
wants to merge 15 commits into
base: next
Choose a base branch
from
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
lib*.so.*
*~
debian-template/wiringPi
debian-template/wiringpi-*.deb
debian-template/wiringpi-opi-*.deb
gpio/gpio
examples/speed
examples/blink
24 changes: 24 additions & 0 deletions Packaging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Instructions

## Build binary

`bzr builddeb -- -us -uc`

## Cleanup

`rm *.deb *.ddeb *.buildinfo *.changes *.dsc *.tar.gz *.upload`

## Rename all files

```
pwsh
gci -Recurse *wiringpi* | Rename-Item -NewName {$_.Name.Replace("wiringpi","wiringpi-opi")}
```

## Build from Source

```
bzr builddeb -S
dput <ppa> wiringpi-opi_2.27~iwj_source.changes
```

4 changes: 2 additions & 2 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if [ x$1 = "xclean" ]; then
cd ../scrollPhat
echo -n "scrollPhat: " ; make clean
cd ../..
echo -n "Deb: " ; rm -f debian-template/wiringpi*.deb
echo -n "Deb: " ; rm -f debian-template/wiringpi-opi*.deb
echo
exit
fi
Expand Down Expand Up @@ -99,7 +99,7 @@ if [ x$1 = "xdebian" ]; then
echo "Building deb package"
cd $here/debian-template
fakeroot dpkg-deb --build wiringPi
mv wiringPi.deb wiringpi-`cat $here/VERSION`-1.deb
mv wiringPi.deb wiringpi-opi-`cat $here/VERSION`-1.deb
exit
fi

Expand Down
6 changes: 3 additions & 3 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
*.debhelper.log
*.substvars
tmp
wiringpi
libwiringpi2
libwiringpi-dev
wiringpi-opi
libwiringpi-opi2
libwiringpi-opi-dev
files
*.postinst.debhelper
*.postrm.debhelper
11 changes: 8 additions & 3 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
wiringpi (2.26~iwj) rpi-unstable; urgency=low
wiringpi-opi (2.27~iwj) jammy; urgency=low

* Initial version with real Debian source package build.
* Reworked package with official changes from Orange Pi

-- Erik P <[email protected]> Sat, 18 Feb 2023 18:31:35 +0100

wiringpi-opi (2.26~iwj) rpi-unstable; urgency=low

-- Ian Jackson <[email protected]> Sat, 12 Sep 2015 18:31:35 +0100
* Initial version with real Debian source package build.

-- Ian Jackson <[email protected]> Sat, 12 Sep 2015 18:31:35 +0100
2 changes: 1 addition & 1 deletion debian/compat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8
10
12 changes: 6 additions & 6 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
Source: wiringpi
Source: wiringpi-opi
Section: electronics
Priority: optional
Maintainer: Ian Jackson <[email protected]>
Standards-Version: 3.8.0
Homepage: http://wiringpi.com/
Build-Depends: debhelper (>= 8)

Package: libwiringpi2
Package: libwiringpi-opi2
ErikApption marked this conversation as resolved.
Show resolved Hide resolved
Section: libs
Architecture: arm64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: GPIO librariees for Raspberry Pi (runtime).
Runtime for the popular wiringPi library.

Package: wiringpi
Package: wiringpi-opi
Architecture: arm64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: gpio utility for Raspberry Pi
The wiringPi gpio command line utility, for GPIO access on a
Raspberry Pi from the command line.

Package: libwiringpi-dev
Package: libwiringpi-opi-dev
Architecture: arm64
Depends: libwiringpi2 (= ${binary:Version}), libc6-dev, ${misc:Depends}
Suggests: wiringpi
Depends: libwiringpi-opi2 (= ${binary:Version}), libc6-dev, ${misc:Depends}
Suggests: wiringpi-opi
Description: GPIO development library for Raspberry Pi
Development libraries to allow GPIO access on a Raspberry Pi from C
and C++ programs.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
debian/tmp/usr/include
debian/tmp/usr/lib/*.so
examples usr/share/doc/libwiringpi-dev
examples usr/share/doc/libwiringpi-opi-dev
File renamed without changes.
2 changes: 2 additions & 0 deletions debian/libwiringpi-opi2.shlibs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
libwiringPi 2 libwiringpi-opi2
libwiringPiDev 2 libwiringpi-opi2
2 changes: 0 additions & 2 deletions debian/libwiringpi2.shlibs

This file was deleted.

4 changes: 2 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ override_dh_auto_install:
dh_install
set -ex; for l in libwiringPi libwiringPiDev; do \
ln -sf $$l.so.$${VERSION} \
debian/libwiringpi$$soname/usr/lib/$$l.so.$$soname; \
debian/libwiringpi-opi$$soname/usr/lib/$$l.so.$$soname; \
ln -sf $$l.so.$${VERSION} \
debian/libwiringpi-dev/usr/lib/$$l.so; \
debian/libwiringpi-opi-dev/usr/lib/$$l.so; \
done

%:
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions debian/wiringpi-opi.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
debian/tmp/usr/bin
debian/tmp/usr/share/man usr/share
README.md usr/share/doc/wiringpi-opi
People usr/share/doc/wiringpi-opi
4 changes: 0 additions & 4 deletions debian/wiringpi.install

This file was deleted.

2 changes: 1 addition & 1 deletion devLib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ DYNAMIC=libwiringPiDev.so.$(VERSION)
#DEBUG = -g -O0
DEBUG = -O2
CC = gcc
INCLUDE = -I.
INCLUDE = -I$(DESTDIR)$(PREFIX)/include
DEFS = -D_GNU_SOURCE
CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC

Expand Down
2 changes: 2 additions & 0 deletions devLib/gertboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@


#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdarg.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/spi/spidev.h>
Expand Down
3 changes: 2 additions & 1 deletion devLib/piFace.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@


#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

#include <stdarg.h>
#include <wiringPi.h>
#include <mcp23s17.h>

Expand Down
2 changes: 1 addition & 1 deletion newVersion
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ echo "#define VERSION_MINOR $vMin" >> version.h

rm -f debian-template/wiringPi/DEBIAN/control
cat > debian-template/wiringPi/DEBIAN/control <<EOF
Package: wiringpi
Package: wiringpi-opi
Version: `cat VERSION`
Section: libraries
Priority: optional
Expand Down
20 changes: 10 additions & 10 deletions wiringPiD/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ LIBS = -lwiringPi -lwiringPiDev -lpthread -lrt -lm -lcrypt
# May not need to alter anything below this line
###############################################################################

SRC = wiringpid.c network.c runRemote.c daemonise.c
SRC = wiringpi-opid.c network.c runRemote.c daemonise.c

OBJ = $(SRC:.c=.o)

all: wiringpid
all: wiringpi-opid
ErikApption marked this conversation as resolved.
Show resolved Hide resolved

wiringpid: $(OBJ)
wiringpi-opid: $(OBJ)
$Q echo [Link]
$Q $(CC) -o $@ $(OBJ) $(LDFLAGS) $(LIBS)

Expand All @@ -58,19 +58,19 @@ wiringpid: $(OBJ)
.PHONY: clean
clean:
$Q echo "[Clean]"
$Q rm -f $(OBJ) wiringpid *~ core tags *.bak
$Q rm -f $(OBJ) wiringpi-opid *~ core tags *.bak

.PHONY: tags
tags: $(SRC)
$Q echo [ctags]
$Q ctags $(SRC)

.PHONY: install
install: wiringpid
install: wiringpi-opid
$Q echo "[Install]"
$Q mkdir -p $(DESTDIR)$(PREFIX)/sbin
$Q cp wiringpid $(DESTDIR)$(PREFIX)/sbin/
$Q chown root.root $(DESTDIR)$(PREFIX)/sbin/wiringpid
$Q cp wiringpi-opid $(DESTDIR)$(PREFIX)/sbin/
$Q chown root.root $(DESTDIR)$(PREFIX)/sbin/wiringpi-opid

# $Q mkdir -p $(DESTDIR)$(PREFIX)/man/man8
# $Q cp gpio.1 $(DESTDIR)$(PREFIX)/man/man8/
Expand All @@ -86,15 +86,15 @@ install-deb: gpio
.PHONY: uninstall
uninstall:
$Q echo "[UnInstall]"
$Q rm -f $(DESTDIR)$(PREFIX)/sbin/wiringpid
$Q rm -f $(DESTDIR)$(PREFIX)/man/man8/wiringpid.8
$Q rm -f $(DESTDIR)$(PREFIX)/sbin/wiringpi-opid
$Q rm -f $(DESTDIR)$(PREFIX)/man/man8/wiringpi-opid.8

.PHONY: depend
depend:
makedepend -Y $(SRC)
# DO NOT DELETE

wiringpid.o: drcNetCmd.h network.h runRemote.h daemonise.h
wiringpi-opid.o: drcNetCmd.h network.h runRemote.h daemonise.h
network.o: network.h
runRemote.o: drcNetCmd.h network.h runRemote.h
daemonise.o: daemonise.h