aboutsummaryrefslogtreecommitdiffstats
path: root/testing/devicemaster-linux
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-10-23 08:05:55 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-10-23 08:07:15 +0000
commit8bedd034a2560e3090de51dc2b25031cd5d5e52d (patch)
treec0d02d1e12a82eae0a29f4dec3aef7b9e83071b7 /testing/devicemaster-linux
parentb9b02aa6b337214e5aadcfb6dbf1d51804fbd950 (diff)
downloadaports-8bedd034a2560e3090de51dc2b25031cd5d5e52d.tar.bz2
aports-8bedd034a2560e3090de51dc2b25031cd5d5e52d.tar.xz
testing/devicemaster-linux: new aport
Userspace tools for NS-Link Device Drivers http://www.comtrol.com/resources/product-resources-white-papers/ns-link-device-drivers ref #761
Diffstat (limited to 'testing/devicemaster-linux')
-rw-r--r--testing/devicemaster-linux/APKBUILD59
-rw-r--r--testing/devicemaster-linux/makefile.patch19
-rw-r--r--testing/devicemaster-linux/nslink.initd16
3 files changed, 94 insertions, 0 deletions
diff --git a/testing/devicemaster-linux/APKBUILD b/testing/devicemaster-linux/APKBUILD
new file mode 100644
index 0000000000..09f9530e69
--- /dev/null
+++ b/testing/devicemaster-linux/APKBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=devicemaster-linux
+pkgver=7.06
+pkgrel=0
+pkgdesc="Userspace tools for NS-Link Device Drivers"
+url="http://www.comtrol.com/resources/product-resources-white-papers/ns-link-device-drivers"
+arch="all"
+license="GPL"
+depends=""
+makedepends=""
+install=
+subpackages="$pkgname-doc"
+source="ftp://ftp.comtrol.com/dev_mstr/rts/drivers/linux/devicemaster-linux-$pkgver.tar.gz
+ makefile.patch
+ nslink.initd
+ "
+_builddir="$srcdir"/devicemaster-linux-$pkgver
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch|*.diff)
+ msg "Applying $i"
+ patch -p1 -i "$srcdir"/$i || return 1
+ ;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make nslinkd nslinkadmin nslinkrelease || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -d \
+ "$pkgdir"/etc/init.d \
+ "$pkgdir"/sbin \
+ "$pkgdir"/usr/share/man/man5 \
+ "$pkgdir"/usr/share/man/man8 \
+ || reutrn 1
+ install -m700 nslinkadmin nslinktool nslinkrelease "$pkgdir"/sbin/ \
+ || return 1
+ install -m755 "$srcdir"/nslink.initd "$pkgdir"/etc/init.d/nslink
+
+ install -m644 *.8 "$pkgdir"/usr/share/man/man8 || return 1
+ install -m644 *.5 "$pkgdir"/usr/share/man/man5 || return 1
+}
+
+md5sums="deded30023c8135c9beb06696e8c578f devicemaster-linux-7.06.tar.gz
+5be3c1860d3377f792a05cd15ae2c88e makefile.patch
+64634a815c270604033c5ec072aed8be nslink.initd"
+sha256sums="6b11295952d1d74a6102a295a6ed5651ec040a0d8c30838cd23a1f3f7c95a4e7 devicemaster-linux-7.06.tar.gz
+36b5a4eab09929805e146445cb704e6be6ba8d15704846330c4dd39229a1b80b makefile.patch
+8da3614cff29acb9691ef6f49f79c40f6356c75f03c21d98a60eba2a11a5fb21 nslink.initd"
+sha512sums="496144ee40464c96442ce655424db886cb5b4df1701e30cc8d059fc918e8916cb6c3b0b57cead2d0e9d50e4618ee13efa5f3630765545ea45e29f8080101800b devicemaster-linux-7.06.tar.gz
+aeafcaa2b15f1ebb4b5dc1eed87bd528cb5fa0be0d82177e9e70a85b7f74c5000af05d82f4927b25a8cbf2254e4fae7f89cb7d3b18bef2be45feb80c409c9ea4 makefile.patch
+1634eeae3269a38003deb46564e222b86fec7635b8fb3a282bc48c2d34766d27a778a651577ce1c34bb33376c2b2624a5b5ca0b3d974293e0a84c2e7c5ad3c06 nslink.initd"
diff --git a/testing/devicemaster-linux/makefile.patch b/testing/devicemaster-linux/makefile.patch
new file mode 100644
index 0000000000..da50b9e85a
--- /dev/null
+++ b/testing/devicemaster-linux/makefile.patch
@@ -0,0 +1,19 @@
+--- ./Makefile.orig
++++ ./Makefile
+@@ -52,13 +52,13 @@
+ nslink.o: nslink.o nslink.c nslink_int.h nslink.h version.h
+
+ nslinkd: nslinkd.c parse.c nslink.h nslinkd.h version.h
+- gcc -Wall -o nslinkd nslinkd.c parse.c
++ $(CC) $(CFLAGS) -Wall $(LDFLAGS) -o nslinkd nslinkd.c parse.c
+
+ nslinkadmin: nslinkadmin.c
+- gcc -Wall -o nslinkadmin nslinkadmin.c
++ $(CC) $(CFLAGS) -Wall $(LDFLAGS) -o nslinkadmin nslinkadmin.c
+
+ nslinkrelease: nslinkrelease.c
+- $(CC) -Wall -o nslinkrelease nslinkrelease.c
++ $(CC) $(CFLAGS) -Wall $(LDFLAGS) -o nslinkrelease nslinkrelease.c
+
+ modules: nslink.o mod_nslink.o
+
diff --git a/testing/devicemaster-linux/nslink.initd b/testing/devicemaster-linux/nslink.initd
new file mode 100644
index 0000000000..5e4b869050
--- /dev/null
+++ b/testing/devicemaster-linux/nslink.initd
@@ -0,0 +1,16 @@
+#!/sbin/runscript
+
+program=/sbin/nslink
+pidfile=/var/run/nslink.pid
+
+start_pre() {
+ if ! [ -f /etc/nslink.conf ]; then
+ eerror "Configuration file /etc/nslink.conf not found"
+ return 1
+ fi
+
+ if ! grep -q -w nslink /proc/modules; then
+ modprobe nslink
+ fi
+}
+