Commit bd9be99e authored by Leonardo Arena's avatar Leonardo Arena

community/py-rtslib: modernize APKBUILD

parent c613c8e3
......@@ -5,56 +5,29 @@ _realname=rtslib-fb
pkgver=2.1_p63
_ver=${pkgver/_rc/rc}
_ver=${_ver/_p/.fb}
pkgrel=0
pkgrel=1
pkgdesc="Python library that provides an object API to RisingTide Systems generic SCSI Target"
url="https://github.com/agrover/rtslib-fb"
url="https://github.com/open-iscsi/rtslib-fb"
arch="noarch"
license="AGPLv3"
depends="python2"
depends_dev=""
makedepends="$depends_dev py-setuptools py-configobj py-ethtool py-ipaddr"
install=""
subpackages=
source="https://github.com/open-iscsi/rtslib-fb/archive/v${_ver}.tar.gz"
_giturl="https://github.com/agrover/rtslib-fb.git"
_gittag=v$_ver
_builddir="$srcdir"/${_realname}-${_ver}
snapshot() {
mkdir -p "$srcdir"
cd "${SRCDEST:-$srcdir}"
if ! [ -d $_realname-fb.git ]; then
git clone --bare $_giturl || return 1
cd $_realname-fb.git
else
cd $_realname-fb.git
git fetch || return 1
fi
git archive --prefix=$_realname/ -o "$SRCDEST"/$_realname-$_ver.tar.gz $_gittag
scp "$SRCDEST"/$_realname-$_ver.tar.gz dev.alpinelinux.org:/archive/$_realname
}
options="!check"
builddir="$srcdir"/${_realname}-${_ver}
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
cd "$builddir"
default_prepare
}
build() {
cd "$_builddir"
cd "$builddir"
return 0
}
package() {
cd "$_builddir"
cd "$builddir"
python2 setup.py install --root="$pkgdir"
# install -D -m644 specs/ib_srpt.spec $pkgdir/var/lib/target/fabric/ib_srpt.spec
# install -D -m644 specs/iscsi.spec $pkgdir/var/lib/target/fabric/iscsi.spec
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment