void-packages/srcpkgs/open-iscsi/template
Christian Neukirchen ff182ebed5 open-iscsi: update to 2.0.873.
Upstream moved.
Fix PIE.
2016-05-23 16:34:44 +02:00

36 lines
1.1 KiB
Bash

# Template file for 'open-iscsi'
pkgname=open-iscsi
version=2.0.873
revision=4
conf_files="/etc/iscsi/iscsid.conf /etc/iscsi/initiatorname.iscsi"
short_desc="Open-iSCSI userland tools"
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
license="GPL-2"
homepage="http://www.open-iscsi.com/"
distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
checksum=c51f6fad45afb7c059f10776de721c6d5fd0336ff927daacea6a7e0a3ad02f18
nocross=yes
post_extract() {
sed -i '1i#include <sys/time.h>' utils/open-isns/isns.h
sed -i '1i#include <fcntl.h>' usr/idbm.c
sed -i 's/(__compar_fn_t)//' utils/fwparam_ibft/fwparam_ppc.c
sed -i '/CC.*-o/s/$/ $(LDFLAGS)/' utils/Makefile usr/Makefile
}
do_build() {
make ${makejobs} CC="$CC" OPTFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
}
do_install() {
make install exec_prefix=/usr sbindir=/usr/bin DESTDIR="$DESTDIR"
vbin usr/iscsistart
for m in doc/*.8; do
vman $m
done
true >${DESTDIR}/etc/iscsi/initiatorname.iscsi
vsconf ${DESTDIR}/etc/iscsi/ifaces/iface.example
rm ${DESTDIR}/etc/iscsi/ifaces/iface.example
sed -i 's,/sbin/iscsid,/usr/bin/iscsid,' ${DESTDIR}/etc/iscsi/iscsid.conf
}