From e131099e4573847d287275384d23862b54a6e1c1 Mon Sep 17 00:00:00 2001 From: Leonardo Arena Date: Fri, 8 Jun 2012 07:00:03 +0000 Subject: testing/targetcli: move to main --- main/targetcli/APKBUILD | 66 +++++++++++++++++++++++++++++++++++++++ main/targetcli/targetcli.confd | 1 + main/targetcli/targetcli.initd | 26 +++++++++++++++ testing/targetcli/APKBUILD | 66 --------------------------------------- testing/targetcli/targetcli.confd | 1 - testing/targetcli/targetcli.initd | 26 --------------- 6 files changed, 93 insertions(+), 93 deletions(-) create mode 100644 main/targetcli/APKBUILD create mode 100644 main/targetcli/targetcli.confd create mode 100755 main/targetcli/targetcli.initd delete mode 100644 testing/targetcli/APKBUILD delete mode 100644 testing/targetcli/targetcli.confd delete mode 100755 testing/targetcli/targetcli.initd diff --git a/main/targetcli/APKBUILD b/main/targetcli/APKBUILD new file mode 100644 index 0000000000..efb96a15ac --- /dev/null +++ b/main/targetcli/APKBUILD @@ -0,0 +1,66 @@ +# Contributor: Leonardo Arena +# Maintainer: Natanael Copa +pkgname=targetcli +pkgver=2.0_rc1_p12 +_ver=${pkgver/_rc/rc} +_ver=${_ver/_p/.fb} +pkgrel=1 +pkgdesc="An administration shell for storage targets" +url="https://github.com/agrover/targetcli-fb" +arch="noarch" +license="AGPLv3" +depends="python py-configobj py-configshell py-ethtool py-ipaddr py-rtslib + py-simpleparse" +depends_dev= +makedepends="$depends_dev" +install="" +subpackages="$pkgname-doc" +source="http://dev.alpinelinux.org/archive/targetcli/$pkgname-$_ver.tar.gz" + +_giturl="git://github.com/agrover/targetcli-fb.git" +_gittag=v$_ver + +_builddir="$srcdir"/$pkgname + +snapshot() { + mkdir -p "$srcdir" + cd "${SRCDEST:-$srcdir}" + if ! [ -d targetcli-fb.git ]; then + git clone --bare $_giturl || return 1 + cd targetcli-fb.git + else + cd targetcli-fb.git + git fetch || return 1 + fi + git archive --prefix=$pkgname/ -o "$SRCDEST"/$pkgname-$_ver.tar.gz $_gittag + scp "$SRCDEST"/$pkgname-$_ver.tar.gz dev.alpinelinux.org:/archive/$pkgname/ +} + + +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + python setup.py build + gzip targetcli.8 +} + +package() { + cd "$_builddir" + python setup.py install --root="$pkgdir" + mkdir -p "$pkgdir"/var/lib/target/fabric + mkdir -p "$pkgdir"/etc/target + install -D -m644 $pkgname.8.gz "$pkgdir"/usr/share/man/man8/$pkgname.8.gz + install -D -m755 ../../$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -D -m644 ../../$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname +} + +md5sums="083156445d7ce684828aaddf79e61e92 targetcli-2.0rc1.fb12.tar.gz" diff --git a/main/targetcli/targetcli.confd b/main/targetcli/targetcli.confd new file mode 100644 index 0000000000..4cfd31ba90 --- /dev/null +++ b/main/targetcli/targetcli.confd @@ -0,0 +1 @@ +MODULES="configfs target_core_mod iscsi_target_mod" diff --git a/main/targetcli/targetcli.initd b/main/targetcli/targetcli.initd new file mode 100755 index 0000000000..28f2f9b410 --- /dev/null +++ b/main/targetcli/targetcli.initd @@ -0,0 +1,26 @@ +#!/sbin/runscript + +description="Administration tool for managing RisingTide Systems storage targets" +command="/usr/bin/targetcli" + +depend() { + need net + after firewall +} + +start() { + ebegin "Starting ${RC_SVCNAME}" + for mod in $MODULES; do + modprobe $mod + done + mount -t configfs none /sys/kernel/config + $command restoreconfig clear_existing=true + eend $? +} + +stop() { + ebegin "Stopping ${RC_SVCNAME}" + $command clearconfig confirm=true + umount /sys/kernel/config + eend $? +} diff --git a/testing/targetcli/APKBUILD b/testing/targetcli/APKBUILD deleted file mode 100644 index efb96a15ac..0000000000 --- a/testing/targetcli/APKBUILD +++ /dev/null @@ -1,66 +0,0 @@ -# Contributor: Leonardo Arena -# Maintainer: Natanael Copa -pkgname=targetcli -pkgver=2.0_rc1_p12 -_ver=${pkgver/_rc/rc} -_ver=${_ver/_p/.fb} -pkgrel=1 -pkgdesc="An administration shell for storage targets" -url="https://github.com/agrover/targetcli-fb" -arch="noarch" -license="AGPLv3" -depends="python py-configobj py-configshell py-ethtool py-ipaddr py-rtslib - py-simpleparse" -depends_dev= -makedepends="$depends_dev" -install="" -subpackages="$pkgname-doc" -source="http://dev.alpinelinux.org/archive/targetcli/$pkgname-$_ver.tar.gz" - -_giturl="git://github.com/agrover/targetcli-fb.git" -_gittag=v$_ver - -_builddir="$srcdir"/$pkgname - -snapshot() { - mkdir -p "$srcdir" - cd "${SRCDEST:-$srcdir}" - if ! [ -d targetcli-fb.git ]; then - git clone --bare $_giturl || return 1 - cd targetcli-fb.git - else - cd targetcli-fb.git - git fetch || return 1 - fi - git archive --prefix=$pkgname/ -o "$SRCDEST"/$pkgname-$_ver.tar.gz $_gittag - scp "$SRCDEST"/$pkgname-$_ver.tar.gz dev.alpinelinux.org:/archive/$pkgname/ -} - - -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} - -build() { - cd "$_builddir" - python setup.py build - gzip targetcli.8 -} - -package() { - cd "$_builddir" - python setup.py install --root="$pkgdir" - mkdir -p "$pkgdir"/var/lib/target/fabric - mkdir -p "$pkgdir"/etc/target - install -D -m644 $pkgname.8.gz "$pkgdir"/usr/share/man/man8/$pkgname.8.gz - install -D -m755 ../../$pkgname.initd "$pkgdir"/etc/init.d/$pkgname - install -D -m644 ../../$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname -} - -md5sums="083156445d7ce684828aaddf79e61e92 targetcli-2.0rc1.fb12.tar.gz" diff --git a/testing/targetcli/targetcli.confd b/testing/targetcli/targetcli.confd deleted file mode 100644 index 4cfd31ba90..0000000000 --- a/testing/targetcli/targetcli.confd +++ /dev/null @@ -1 +0,0 @@ -MODULES="configfs target_core_mod iscsi_target_mod" diff --git a/testing/targetcli/targetcli.initd b/testing/targetcli/targetcli.initd deleted file mode 100755 index 28f2f9b410..0000000000 --- a/testing/targetcli/targetcli.initd +++ /dev/null @@ -1,26 +0,0 @@ -#!/sbin/runscript - -description="Administration tool for managing RisingTide Systems storage targets" -command="/usr/bin/targetcli" - -depend() { - need net - after firewall -} - -start() { - ebegin "Starting ${RC_SVCNAME}" - for mod in $MODULES; do - modprobe $mod - done - mount -t configfs none /sys/kernel/config - $command restoreconfig clear_existing=true - eend $? -} - -stop() { - ebegin "Stopping ${RC_SVCNAME}" - $command clearconfig confirm=true - umount /sys/kernel/config - eend $? -} -- cgit v1.2.3