aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-iscsi/APKBUILD
blob: 82edc91ea71564c3ad457e07fb3ce4f46521bc5a (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
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=open-iscsi
pkgver=2.0.874
pkgrel=2
pkgdesc="High performance, transport independent, multi-platform iSCSI initiator"
url="https://www.open-iscsi.com"
arch="all"
license="GPL-2.0"
makedepends="autoconf automake libtool linux-headers open-isns-dev
	util-linux-dev"
options="!check"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/open-iscsi/open-iscsi/archive/$pkgver.tar.gz
	iscsid.initd
	iscsid.confd
	iscsid.conf
	musl-fixes.patch
	ldflags.patch
	static-inline.patch
	"
builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	default_prepare
	# include iscsistart in the package
	sed -i -e '/^PROGRAMS = /s/$/ usr\/iscsistart/' Makefile
}

build() {
	cd "$builddir"
	make user
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install_user
	mkdir -p $pkgdir/usr/bin
	mkdir -p $pkgdir/usr/sbin
	mv $pkgdir/sbin/iscsi-iname $pkgdir/usr/bin
	mv $pkgdir/sbin/iscsi_discovery $pkgdir/usr/bin
	mv $pkgdir/sbin/iscsiadm $pkgdir/usr/bin
	mv $pkgdir/sbin/iscsid $pkgdir/usr/sbin
	install -Dm755 "$srcdir"/iscsid.initd "$pkgdir"/etc/init.d/iscsid
	install -Dm644 "$srcdir"/iscsid.confd "$pkgdir"/etc/conf.d/iscsid
	install -Dm644 "$srcdir"/iscsid.conf "$pkgdir"/etc/iscsi/iscsid.conf
}

sha512sums="66d8a52b6401229d51873f1ee0f4e7259a8ed584800403a41741c7eeedc0ec21a2b116671cb7259f60918d083ffb46d76860236a1b10fbb94a4c1d61bddae1ae  open-iscsi-2.0.874.tar.gz
49ac7e1c9cd6aa444edcfc4d5dea1330a93cee286d69d82521cc1afecc66296027c359f2314e418671813f049c9ff18ba4bdd0f90922423fac94b6529c887cf5  iscsid.initd
075bb9cb783be7ccbc799947e0e042b85310d40b3045141dc1be40ca84ed1cc0e1e54559df501c512c179e28375314b27a03c15d9a6d4b1cabd428b2279985d3  iscsid.confd
3686d31c5642e611c0c0c61f0f42a33030a74b518a2a108f004b9bd34b2b98d8e29ee2416a5b9cc447ab0449bdc94158b2323d977e7b7d2930dd4dcf0866da68  iscsid.conf
9120d8e0a594f7337eb748ef655ebe915356fc4519b2cb58d9a6a5a2002059c0e9eb31e33e3e8b2242ae2fb9538a5233d17cdf0afd50c56aef3922335ebcd7d3  musl-fixes.patch
9b2edc90c397fc86a91ac124308561b376adeb10ee794b40faa43b5ec34a672004f4881e03689632e8c05c587ee311918fa58d25e2a0442cf05359dd4659f712  ldflags.patch
4ea344f018107450e288ae87cd12ff31cc69fb38127aa090b89226b1d622f7a9bd6f7ed13dabecc72af311a98eff5eb05973162d0b4bedd6d357399fca421b7b  static-inline.patch"