aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2015-05-21 16:18:20 +0000
committerTharre <tharre3@gmail.com>2015-05-21 16:18:20 +0000
commitc6bbc6d4ca942d3cf6a6045966e66c1b59a4a271 (patch)
tree556ad0c6c6e5a8fa55d8c148a897f52cb47d8ade
downloadpkgbuilds-c6bbc6d4ca942d3cf6a6045966e66c1b59a4a271.tar.gz
pkgbuilds-c6bbc6d4ca942d3cf6a6045966e66c1b59a4a271.tar.xz
pkgbuilds-c6bbc6d4ca942d3cf6a6045966e66c1b59a4a271.zip
Initial code import.
-rw-r--r--PKGBUILD63
-rw-r--r--eibd.conf2
-rw-r--r--eibd.patch25
-rw-r--r--eibd.service12
-rw-r--r--eibd.socket8
5 files changed, 110 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..9c8faa6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,63 @@
+# Maintainer: Sven Fischer <sven (at) leiderfischer.de>
+# Contributor: Thijs Vermeir <thijsvermeir@gmail.com>
+
+pkgbase=('bcusdk')
+pkgname=('eibd')
+pkgver=0.0.5
+pkgrel=6
+pkgdesc="A free development environment for BCU1 and BCU2"
+arch=('i686' 'x86_64' 'arm' 'armv7h')
+url="http://www.auto.tuwien.ac.at/~mkoegler/index.php/bcusdk"
+license=('GPL')
+depends=('pthsem>=2.0.8' 'gcc-libs-multilib')
+options=('!libtool')
+source=(http://www.auto.tuwien.ac.at/~mkoegler/eib/bcusdk_${pkgver}.tar.gz
+ eibd.patch eibd.socket eibd.service eibd.conf)
+md5sums=('5f81bc4e6bb53564573d573e795a9a5f'
+ 'b9e50d68138fb74a4d0f6370a720d8fe'
+ '82e079c823fa226146ba49b47c76bab7'
+ '9919fe034fb3f3b1ad8c45a9daef0dde'
+ '815323eebff8bc442c1e653a34e6b0b4')
+
+prepare() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ patch -p1 -i ${srcdir}/eibd.patch
+}
+
+build() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ ./configure \
+ --prefix=/usr \
+ --enable-onlyeibd \
+ --enable-usb \
+ --enable-ft12 \
+ --enable-eibnetip \
+ --enable-eibnetipserver \
+ --enable-eibnetiptunnel
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/common"
+ make
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/eibd"
+ make
+}
+
+package_eibd() {
+ pkgdesc="Daemon as interface to the EIB / KNX bus"
+
+ install -Dm644 "${srcdir}/eibd.socket" $pkgdir/usr/lib/systemd/system/eibd.socket
+ install -Dm644 "${srcdir}/eibd.service" $pkgdir/usr/lib/systemd/system/eibd.service
+ install -Dm644 "${srcdir}/eibd.conf" $pkgdir/etc/conf.d/eibd.conf
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/eibd"
+ make DESTDIR="${pkgdir}" install
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/common"
+ make DESTDIR="${pkgdir}" install
+
+ #cd ${pkgdir}
+ #rm -rf usr/share
+ #cd usr/bin
+ #rm -rf `ls | grep -v eib`
+}
diff --git a/eibd.conf b/eibd.conf
new file mode 100644
index 0000000..82d7147
--- /dev/null
+++ b/eibd.conf
@@ -0,0 +1,2 @@
+# Option file for eibd
+EIBD_OPTS="-D -T -S -i "
diff --git a/eibd.patch b/eibd.patch
new file mode 100644
index 0000000..daa9eb7
--- /dev/null
+++ b/eibd.patch
@@ -0,0 +1,25 @@
+diff -rupN bcusdk-0.0.5.orig/eibd/server/eibd.cpp bcusdk-0.0.5/eibd/server/eibd.cpp
+--- bcusdk-0.0.5.orig/eibd/server/eibd.cpp 2011-02-27 19:57:20.000000000 +0100
++++ bcusdk-0.0.5/eibd/server/eibd.cpp 2014-02-25 18:21:56.199884864 +0100
+@@ -358,7 +358,7 @@ main (int ac, char *ag[])
+ }
+
+ l2 = Create (ag[index], arg.backendflags, &t);
+- if (!l2->init ())
++ if (!l2 || !l2->init ())
+ die ("initialisation of the backend failed");
+ l3 = new Layer3 (l2, &t);
+ if (arg.port)
+diff -rupN bcusdk-0.0.5.orig/eibd/usb/linux_usbfs.c bcusdk-0.0.5/eibd/usb/linux_usbfs.c
+--- bcusdk-0.0.5.orig/eibd/usb/linux_usbfs.c 2011-01-26 11:50:08.000000000 +0100
++++ bcusdk-0.0.5/eibd/usb/linux_usbfs.c 2014-02-25 18:23:21.549887409 +0100
+@@ -52,7 +52,8 @@ int pthread_mutex_trylock(pthread_mutex_
+ return 0;
+ }
+
+-int clock_gettime(clockid_t clk_id, struct timespec *tp)
++#define clock_gettime(A,B) xclock_gettime(A, B)
++int xclock_gettime(clockid_t clk_id, struct timespec *tp)
+ {
+ pth_int_time (tp);
+ return 0;
diff --git a/eibd.service b/eibd.service
new file mode 100644
index 0000000..2ebff51
--- /dev/null
+++ b/eibd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=EIB Daemon
+After=network.target
+
+[Service]
+EnvironmentFile=/etc/conf.d/eibd.conf
+ExecStart=/usr/bin/eibd -d -p /run/eibd.pid $EIBD_OPTS
+Type=forking
+PIDFile=/run/eibd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/eibd.socket b/eibd.socket
new file mode 100644
index 0000000..22831fe
--- /dev/null
+++ b/eibd.socket
@@ -0,0 +1,8 @@
+[Unit]
+Conflicts=eibd.service
+
+[Socket]
+ListenDatagram=6720
+
+[Install]
+WantedBy=sockets.target