summaryrefslogtreecommitdiff
path: root/dev-libs/pigpio/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-24 10:19:03 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-03-24 10:19:03 +0000
commitb279bbe94522565b8feb19b8e5f377d3ea76f157 (patch)
treee4790abc54cd850232f7d7de49e371fdfe8976c7 /dev-libs/pigpio/files
parentc5283d322accc6097afec74eab24550829788bab (diff)
gentoo resync : 24.03.2018
Diffstat (limited to 'dev-libs/pigpio/files')
-rw-r--r--dev-libs/pigpio/files/pigpio-67-makefile.patch64
-rw-r--r--dev-libs/pigpio/files/pigpiod.confd4
-rw-r--r--dev-libs/pigpio/files/pigpiod.initd7
-rw-r--r--dev-libs/pigpio/files/pigpiod.systemd9
4 files changed, 84 insertions, 0 deletions
diff --git a/dev-libs/pigpio/files/pigpio-67-makefile.patch b/dev-libs/pigpio/files/pigpio-67-makefile.patch
new file mode 100644
index 000000000000..1df4475eb0ae
--- /dev/null
+++ b/dev-libs/pigpio/files/pigpio-67-makefile.patch
@@ -0,0 +1,64 @@
+--- a/Makefile 2018-03-21 19:51:11.711880972 +0100
++++ b/Makefile 2018-03-21 20:51:46.341684595 +0100
+@@ -9,6 +9,9 @@
+ STRIP = $(CROSS_PREFIX)strip
+ SHLIB = $(CC) -shared
+ STRIPLIB = $(STRIP) --strip-unneeded
++LDCONFIG = ldconfig
++PYTHON2 = $(shell type -P python2 || echo ':' 2> /dev/null)
++PYTHON3 = $(shell type -P python3 || echo ':' 2> /dev/null)
+
+ CFLAGS += -O3 -Wall -pthread
+
+@@ -23,7 +26,7 @@
+
+ LIB = $(LIB1) $(LIB2) $(LIB3)
+
+-ALL = $(LIB) x_pigpio x_pigpiod_if x_pigpiod_if2 pig2vcd pigpiod pigs
++ALL = $(LIB) pig2vcd pigpiod pigs
+
+ LL1 = -L. -lpigpio -pthread -lrt
+
+@@ -64,22 +67,21 @@
+ $(CC) -o x_pigpiod_if2 x_pigpiod_if2.o $(LL3)
+
+ pigpiod: pigpiod.o $(LIB1)
+- $(CC) -o pigpiod pigpiod.o $(LL1)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o pigpiod pigpiod.o $(LL1)
+ $(STRIP) pigpiod
+
+ pigs: pigs.o command.o
+- $(CC) -o pigs pigs.o command.o
++ $(CC) $(CFLAGS) $(LDFLAGS) -o pigs pigs.o command.o
+ $(STRIP) pigs
+
+ pig2vcd: pig2vcd.o
+- $(CC) -o pig2vcd pig2vcd.o
++ $(CC) $(CFLAGS) $(LDFLAGS) -o pig2vcd pig2vcd.o
+ $(STRIP) pig2vcd
+
+ clean:
+ rm -f *.o *.i *.s *~ $(ALL)
+
+ install: $(ALL)
+- install -m 0755 -d $(DESTDIR)/opt/pigpio/cgi
+ install -m 0755 -d $(DESTDIR)$(includedir)
+ install -m 0644 pigpio.h $(DESTDIR)$(includedir)
+ install -m 0644 pigpiod_if.h $(DESTDIR)$(includedir)
+@@ -92,13 +94,13 @@
+ install -m 0755 pig2vcd $(DESTDIR)$(bindir)
+ install -m 0755 pigpiod $(DESTDIR)$(bindir)
+ install -m 0755 pigs $(DESTDIR)$(bindir)
+- if which python2; then python2 setup.py install; fi
+- if which python3; then python3 setup.py install; fi
++ $(PYTHON2) setup.py install
++ $(PYTHON3) setup.py install
+ install -m 0755 -d $(DESTDIR)$(mandir)/man1
+ install -m 0644 *.1 $(DESTDIR)$(mandir)/man1
+ install -m 0755 -d $(DESTDIR)$(mandir)/man3
+ install -m 0644 *.3 $(DESTDIR)$(mandir)/man3
+- ldconfig
++ $(LDCONFIG)
+
+ uninstall:
+ rm -f $(DESTDIR)$(includedir)/pigpio.h
diff --git a/dev-libs/pigpio/files/pigpiod.confd b/dev-libs/pigpio/files/pigpiod.confd
new file mode 100644
index 000000000000..dbcf8a4c3efc
--- /dev/null
+++ b/dev-libs/pigpio/files/pigpiod.confd
@@ -0,0 +1,4 @@
+# Only listen on local interface by default
+# use evironment variables PIGPIO_PORT="8888" and PIGPIO_ADDR="::1" for pigs with local interface
+# PIGPIOD_OPTS="-l -p 8888"
+PIGPIOD_OPTS="-l"
diff --git a/dev-libs/pigpio/files/pigpiod.initd b/dev-libs/pigpio/files/pigpiod.initd
new file mode 100644
index 000000000000..2b3f339dbdcc
--- /dev/null
+++ b/dev-libs/pigpio/files/pigpiod.initd
@@ -0,0 +1,7 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/var/run/pigpio.pid"
+command="/usr/bin/pigpiod"
+command_args="${PIGPIOD_OPTS}"
diff --git a/dev-libs/pigpio/files/pigpiod.systemd b/dev-libs/pigpio/files/pigpiod.systemd
new file mode 100644
index 000000000000..b1d28a66f826
--- /dev/null
+++ b/dev-libs/pigpio/files/pigpiod.systemd
@@ -0,0 +1,9 @@
+[Unit]
+Description=Pigpio daemon
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/pigpiod
+
+[Install]
+WantedBy=multi-user.target