aboutsummaryrefslogtreecommitdiffstats
path: root/main/scstadmin
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2011-03-24 13:58:29 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2011-03-24 13:58:29 +0000
commit7743b2793cae68e3ef70e64b67e85c7166e5aac6 (patch)
tree240708727c71e5993948231714ce6e0a5426eca9 /main/scstadmin
parent7b7af3b42a8304c2c4a6bd851dc29209e03b52e6 (diff)
downloadaports-7743b2793cae68e3ef70e64b67e85c7166e5aac6.tar.bz2
aports-7743b2793cae68e3ef70e64b67e85c7166e5aac6.tar.xz
main/{linux-scst|scstadmin}: move from testing to main
Diffstat (limited to 'main/scstadmin')
-rw-r--r--main/scstadmin/APKBUILD38
-rw-r--r--main/scstadmin/scst-init-ash-comapt.patch35
2 files changed, 73 insertions, 0 deletions
diff --git a/main/scstadmin/APKBUILD b/main/scstadmin/APKBUILD
new file mode 100644
index 0000000000..6a694e27b7
--- /dev/null
+++ b/main/scstadmin/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: Carlo Landmeter
+# Maintainer:
+pkgname=scstadmin
+pkgver=2.0.0
+pkgrel=2
+pkgdesc="SCST administration tool written in perl"
+url="http://scst.sourceforge.net"
+arch="x86_64"
+license="GPL-2"
+depends="perl"
+makedepends="perl-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/scst/$pkgname-$pkgver.tar.gz
+ scst-init-ash-comapt.patch
+ "
+
+_builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ cd "$_builddir"/scstadmin.sysfs/scst-0.9.00
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ cd "$_builddir"
+ patch -p1 < "$srcdir"/scst-init-ash-comapt.patch
+}
+
+package() {
+ cd "$_builddir"/scstadmin.sysfs/scst-0.9.00
+ make DESTDIR="$pkgdir" install || return 1
+
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/var/lib/scst/pr
+ install -Dm755 scstadmin.sysfs/scstadmin "$pkgdir"/usr/sbin/scstadmin || return 1
+ install -Dm755 init.d/scst.gentoo "$pkgdir"/etc/init.d/scstadmin || return 1
+}
+
+md5sums="ae94761148cc4eaade2973ba84387825 scstadmin-2.0.0.tar.gz
+061580b8ec84b5f7da0b1332601f505a scst-init-ash-comapt.patch"
diff --git a/main/scstadmin/scst-init-ash-comapt.patch b/main/scstadmin/scst-init-ash-comapt.patch
new file mode 100644
index 0000000000..67cd7adf17
--- /dev/null
+++ b/main/scstadmin/scst-init-ash-comapt.patch
@@ -0,0 +1,35 @@
+--- scstadmin/init.d/scst.gentoo
++++ scstadmin/init.d/scst.gentoo
+@@ -12,13 +12,11 @@
+ # Note: on most Linux distributions /bin/sh is a soft link to /bin/bash, while
+ # on a default Ubuntu setup /bin/sh is a soft link to /bin/dash !
+
+-opts="${opts} try-restart reload force-reload"
++opts="${opts} try_restart reload force_reload"
+ depend() {
+ use logger
+ }
+
+-PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin
+-
+ DEFAULTFILE="/etc/conf.d/scst"
+ SCST_CFG=/etc/scst.conf
+ MODPROBE="/sbin/modprobe"
+@@ -121,7 +119,7 @@
+ start
+ }
+
+-try-restart() {
++try_restart() {
+ ## Restart the service if the service is already running.
+ status >/dev/null 2>&1 && restart
+ }
+@@ -140,7 +138,7 @@
+ fi
+ }
+
+-force-reload() {
++force_reload() {
+ ## Cause the configuration to be reloaded if the service supports this,
+ ## otherwise restart the service if it is running.
+ einfo "Reloading SCST configuration"