46 lines
1.6 KiB
Bash
46 lines
1.6 KiB
Bash
# Template file for 'open-iscsi'
|
|
pkgname=open-iscsi
|
|
version=2.1.5
|
|
revision=1
|
|
conf_files="/etc/iscsi/iscsid.conf /etc/iscsi/initiatorname.iscsi"
|
|
build_style=gnu-configure
|
|
hostmakedepends="automake libtool pkg-config"
|
|
makedepends="libisns-devel libkmod-devel libmount-devel openssl-devel"
|
|
short_desc="Open-iSCSI userland tools"
|
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="http://www.open-iscsi.com/"
|
|
distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
|
|
checksum=d8a06c1ea86d2a312d598f52c151b210a34d82445a6f522f7c2bd6581b3a99af
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl) CFLAGS+=" -D_LINUX_IF_ETHER_H -Wno-error=format -Wno-error=cpp";;
|
|
esac
|
|
post_extract() {
|
|
vsed -i -e '/CC.*-o/s/$/ $(LDFLAGS)/' utils/Makefile usr/Makefile
|
|
vsed -i -e 's/lib64/lib/g' libopeniscsiusr/Makefile
|
|
vsed -i -e 's,<linux/if_ether.h>,<netinet/if_ether.h>,g' usr/iscsi_net_util.c
|
|
vsed -i -e '1i#include <netinet/if_ether.h>' iscsiuio/src/unix/libs/bnx2x.c libopeniscsiusr/misc.c
|
|
vsed -i -e 's:ISCSI_MAX_IFACE_LEN):ISCSI_MAX_IFACE_LEN-1):' libopeniscsiusr/idbm.c
|
|
}
|
|
do_configure() {
|
|
( cd iscsiuio && autoreconf -fi && ./configure ${configure_args} CFLAGS="-DNO_SYSTEMD" )
|
|
}
|
|
do_build() {
|
|
make ${makejobs} CC="$CC" \
|
|
OPTFLAGS="$CFLAGS $(pkg-config --cflags libkmod) -DNO_SYSTEMD" \
|
|
LDFLAGS="$LDFLAGS $(pkg-config --libs libkmod)" NO_SYSTEMD=1
|
|
}
|
|
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
|
|
}
|