blob: eaa65d54e3e465f704c5671b3c279f82682207ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=targetcli
pkgver=2.1_p37
_ver=${pkgver/_rc/rc}
_ver=${_ver/_p/.fb}
pkgrel=0
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 py-setuptools"
install=""
subpackages="$pkgname-doc"
source="$pkgname-$_ver.tar.gz::https://github.com/agrover/targetcli-fb/archive/v${_ver}.tar.gz
targetcli.initd
targetcli.confd
"
_giturl="git://github.com/agrover/targetcli-fb.git"
_gittag=v$_ver
_builddir="$srcdir"/${pkgname}-fb-${_ver}
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 || return 1
gzip targetcli.8
}
package() {
cd "$_builddir"
python setup.py install --root="$pkgdir" || return 1
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 || return 1
install -D -m755 "$srcdir"/$pkgname.initd \
"$pkgdir"/etc/init.d/$pkgname || return 1
install -D -m644 "$srcdir"/$pkgname.confd \
"$pkgdir"/etc/conf.d/$pkgname || return 1
}
md5sums="c9e856d0b434650aa82f0271f1e21f6c targetcli-2.1.fb37.tar.gz
fda390dd78ea5721544effaf35f970be targetcli.initd
94292da9b892e3dec427e3267aabd0dc targetcli.confd"
sha256sums="e7d11fa0a01cde443a1689966a62cab3e8a15ea500d03b0f9564b7ac44fa5a65 targetcli-2.1.fb37.tar.gz
aba530edfbaa5e205cb2fa9b26afc08f8cfc9643cb04a183fabc3588f9d443fb targetcli.initd
5a4b8f10660a124db63e18696769367162a62b53e3decdb3cc5e02c979ca186d targetcli.confd"
sha512sums="e1dd8ba97bab1ac029ab1aa73549242c3f5d0657f87e898a0dfbf06577484cc37d6d52abafe12edf9c75c1ed112a00d0551757b0e6eaacabb8b7e0a434172ccc targetcli-2.1.fb37.tar.gz
2d786340c53e78c7a07d09568faf6d700c7d8be52b0aa54d8d6f0404faf5893e4d9b12d6a776534492479d1b4b29d6c3af8bf87478e564028470318a743f7e5c targetcli.initd
b0cedfb351dabcd6febe660dd95b5f2bab89f38849d346e46f57c32a4057f6bd2347e9a93a9e9010f4c7ff91f16c0fd33f02ad0cacf9fb801de76da4d25ad9e3 targetcli.confd"
|