46 lines
1.5 KiB
Bash
46 lines
1.5 KiB
Bash
# Template file for 'open-iscsi'
|
|
pkgname=open-iscsi
|
|
version=2.0.875
|
|
revision=1
|
|
conf_files="/etc/iscsi/iscsid.conf /etc/iscsi/initiatorname.iscsi"
|
|
build_style=gnu-configure
|
|
hostmakedepends="automake libtool"
|
|
makedepends="libisns-devel libmount-devel libressl-devel"
|
|
short_desc="Open-iSCSI userland tools"
|
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
license="GPL-2"
|
|
homepage="http://www.open-iscsi.com/"
|
|
distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
|
|
checksum=7b6459dcbd3fc5d6e1500eeeb8a680acc773ffcb5901f268db9d53d2979338bf
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl) CFLAGS+="-D_LINUX_IF_ETHER_H";;
|
|
esac
|
|
post_extract() {
|
|
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
|
|
sed -i 's,<linux/if_ether.h>,<netinet/if_ether.h>,g' usr/iscsi_net_util.c
|
|
sed -i '1i#include <netinet/if_ether.h>' iscsiuio/src/unix/libs/bnx2x.c
|
|
}
|
|
do_configure() {
|
|
( cd iscsiuio && autoreconf -fi && ./configure ${configure_args} )
|
|
}
|
|
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
|
|
}
|