diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2011-10-07 09:01:48 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2011-10-07 09:01:48 +0000 |
commit | c4b7915ecb32f8340ac999f31033288d74186a1c (patch) | |
tree | 58eb6dca4622fcbb583b69b62f9c82f6099235d7 /testing | |
parent | 5078eab5bdabc158c46bbc24f30884d475c01dfa (diff) | |
download | aports-c4b7915ecb32f8340ac999f31033288d74186a1c.tar.bz2 aports-c4b7915ecb32f8340ac999f31033288d74186a1c.tar.xz |
testing/core-iscsi-tools: new aport
linux iscsi initiator userland utils
Diffstat (limited to 'testing')
-rw-r--r-- | testing/core-iscsi-tools/APKBUILD | 33 | ||||
-rw-r--r-- | testing/core-iscsi-tools/Makefile-fix-DESTDIR.patch | 279 |
2 files changed, 312 insertions, 0 deletions
diff --git a/testing/core-iscsi-tools/APKBUILD b/testing/core-iscsi-tools/APKBUILD new file mode 100644 index 0000000000..8fcee250d3 --- /dev/null +++ b/testing/core-iscsi-tools/APKBUILD @@ -0,0 +1,33 @@ +# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> +pkgname=core-iscsi-tools +pkgver=3.5 +pkgrel=0 +pkgdesc="High-Performance iSCSI Initiator" +url="http://www.linux-iscsi.org/wiki/Core-iSCSI" +arch="all" +license="GPL" +depends= +depends_dev= +makedepends="$depends_dev" +install= +subpackages="$pkgname-doc" +#kernel.org is not yet fully operational +#source="http://www.kernel.org/pub/linux/utils/storage/iscsi/$pkgname-v$pkgver.tar.bz2 +source="http://bo.mirror.garr.it/mirrors/kernel.org/linux/utils/storage/iscsi/${pkgname}-v${pkgver}.tar.gz + Makefile-fix-DESTDIR.patch" + +_builddir="$srcdir"/$pkgname-v${pkgver} + +prepare() { + cd "$_builddir" + patch -p1 < ../Makefile-fix-DESTDIR.patch +} + +package() { + cd "$_builddir" + echo creating pkgdir/sbin + make DESTDIR="$pkgdir" install +} + +md5sums="88fbcc7e24d77aafb68c4ab1f51996ff core-iscsi-tools-v3.5.tar.gz +1ab0237213bac4bcbbe20ae99dcfdf44 Makefile-fix-DESTDIR.patch" diff --git a/testing/core-iscsi-tools/Makefile-fix-DESTDIR.patch b/testing/core-iscsi-tools/Makefile-fix-DESTDIR.patch new file mode 100644 index 0000000000..2d2ce29112 --- /dev/null +++ b/testing/core-iscsi-tools/Makefile-fix-DESTDIR.patch @@ -0,0 +1,279 @@ +--- a/core-iscsi/Makefile ++++ b/core-iscsi/Makefile +@@ -10,6 +10,7 @@ + MKNOD = mknod + RM = rm + LN = ln ++MKDIR = mkdir + + OS:=$(shell uname) + ARCH:=$(shell uname -m) +@@ -73,139 +74,154 @@ + $(MKNOD) $(DESTDIR)/dev/iscsi1 c 10 203 + + install: check-dest all devpts ++ $(MKDIR) -p $(DESTDIR)$(sbindir) ++ $(MKDIR) -p $(DESTDIR)$(mandir) + $(RM) -f $(DESTDIR)$(sbindir)/$(EXECUTABLES) + + localinstall: all +- $(RM) -f /sbin/initiator-authd +- install initiator_authd /sbin/initiator-authd +- $(RM) -f /sbin/initiator-ctl +- install initiator_ctl /sbin/initiator-ctl ++ $(MKDIR) -p $(DESTDIR)$(sbindir) ++ $(MKDIR) -p $(DESTDIR)$(mandir) ++ $(RM) -f $(DESTDIR)/sbin/initiator-authd ++ install initiator_authd $(DESTDIR)/sbin/initiator-authd ++ $(RM) -f $(DESTDIR)/sbin/initiator-ctl ++ install initiator_ctl $(DESTDIR)/sbin/initiator-ctl + + initiator_install: all +- $(RM) -f /sbin/initiator-authd +- install initiator_authd /sbin/initiator-authd +- $(RM) -f /sbin/initiator-ctl +- install initiator_ctl /sbin/initiator-ctl +- install initiator_iname /sbin/initiator-iname +- install man/initiator-ctl.1 /usr/share/man/man1 +- install man/initiator.5 /usr/share/man/man5 +- install man/initiator_auth.5 /usr/share/man/man5 +- install man/iscsi_device_maps.5 /usr/share/man/man5 ++ $(MKDIR) -p $(DESTDIR)$(sbindir) ++ $(MKDIR) -p $(DESTDIR)$(mandir) ++ $(RM) -f $(DESTDIR)/sbin/initiator-authd ++ install initiator_authd $(DESTDIR)/sbin/initiator-authd ++ $(RM) -f $(DESTDIR)/sbin/initiator-ctl ++ install initiator_ctl $(DESTDIR)/sbin/initiator-ctl ++ install initiator_iname $(DESTDIR)/sbin/initiator-iname ++ install man/initiator-ctl.1 $(DESTDIR)/usr/share/man/man1 ++ install man/initiator.5 $(DESTDIR)/usr/share/man/man5 ++ install man/initiator_auth.5 $(DESTDIR)/usr/share/man/man5 ++ install man/iscsi_device_maps.5 $(DESTDIR)/usr/share/man/man5 + +- if [ ! -d /etc/iscsi ]; then \ +- mkdir -p /etc/iscsi; \ ++ if [ ! -d $(DESTDIR)/etc/iscsi ]; then \ ++ mkdir -p $(DESTDIR)/etc/iscsi; \ + fi +- if [ ! -d /etc/sysconfig ]; then \ +- mkdir -p /etc/sysconfig; \ ++ if [ ! -d $(DESTDIR)/etc/sysconfig ]; then \ ++ mkdir -p $(DESTDIR)/etc/sysconfig; \ + fi +- if [ ! -d /etc/rc.d/init.d ]; then \ +- mkdir -p /etc/rc.d/init.d; \ ++ if [ ! -d $(DESTDIR)/etc/rc.d/init.d ]; then \ ++ mkdir -p $(DESTDIR)/etc/rc.d/init.d; \ + fi + +- install -c -m 755 scripts/install.channel /etc/iscsi/install.channel +- if [ ! -f /etc/sysconfig/initiator ]; then \ +- install -c -m 644 conf/initiator-sysconfig /etc/sysconfig/initiator; \ ++ install -c -m 755 scripts/install.channel $(DESTDIR)/etc/iscsi/install.channel ++ if [ ! -f $(DESTDIR)/etc/sysconfig/initiator ]; then \ ++ install -c -m 644 conf/initiator-sysconfig $(DESTDIR)/etc/sysconfig/initiator; \ + fi +- if [ ! -f /etc/sysconfig/iscsi_device_maps ]; then \ +- install -c -m 644 conf/devicemaps-sysconfig /etc/sysconfig/iscsi_device_maps; \ ++ if [ ! -f $(DESTDIR)/etc/sysconfig/iscsi_device_maps ]; then \ ++ install -c -m 644 conf/devicemaps-sysconfig $(DESTDIR)/etc/sysconfig/iscsi_device_maps; \ + fi +- if [ ! -f /etc/sysconfig/initiator_auth ]; then \ +- install -c -m 600 conf/initiator_auth-sysconfig /etc/sysconfig/initiator_auth; \ ++ if [ ! -f $(DESTDIR)/etc/sysconfig/initiator_auth ]; then \ ++ install -c -m 600 conf/initiator_auth-sysconfig $(DESTDIR)/etc/sysconfig/initiator_auth; \ + fi + +- install -c -m 755 scripts/rc.initiator /etc/rc.d/init.d/initiator +- install -c -m 755 scripts/proc.iscsi-map-channel /sbin/proc.iscsi-map-channel +- install -c -m 755 scripts/sysfs.iscsi-map-channel /sbin/sysfs.iscsi-map-channel +- install -c -m 755 scripts/iscsi-map-channel /sbin/iscsi-map-channel +- install -c -m 755 scripts/proc.iscsi-unmap-channel /sbin/proc.iscsi-unmap-channel +- install -c -m 755 scripts/sysfs.iscsi-unmap-channel /sbin/sysfs.iscsi-unmap-channel +- install -c -m 755 scripts/iscsi-unmap-channel /sbin/iscsi-unmap-channel +- install -c -m 755 scripts/iscsi-remap-channel /sbin/iscsi-remap-channel +- install -c -m 755 scripts/iscsi-mount /sbin/iscsi-mount +- install -c -m 755 scripts/iscsi-umount /sbin/iscsi-umount ++ install -c -m 755 scripts/rc.initiator $(DESTDIR)/etc/rc.d/init.d/initiator ++ install -c -m 755 scripts/proc.iscsi-map-channel $(DESTDIR)/sbin/proc.iscsi-map-channel ++ install -c -m 755 scripts/sysfs.iscsi-map-channel $(DESTDIR)/sbin/sysfs.iscsi-map-channel ++ install -c -m 755 scripts/iscsi-map-channel $(DESTDIR)/sbin/iscsi-map-channel ++ install -c -m 755 scripts/proc.iscsi-unmap-channel $(DESTDIR)/sbin/proc.iscsi-unmap-channel ++ install -c -m 755 scripts/sysfs.iscsi-unmap-channel $(DESTDIR)/sbin/sysfs.iscsi-unmap-channel ++ install -c -m 755 scripts/iscsi-unmap-channel $(DESTDIR)/sbin/iscsi-unmap-channel ++ install -c -m 755 scripts/iscsi-remap-channel $(DESTDIR)/sbin/iscsi-remap-channel ++ install -c -m 755 scripts/iscsi-mount $(DESTDIR)/sbin/iscsi-mount ++ install -c -m 755 scripts/iscsi-umount $(DESTDIR)/sbin/iscsi-umount + + uninstall: +- rm -rf /sbin/initiator-authd +- rm -rf /sbin/initiator-ctl +- rm -rf /usr/share/man/man1/initiator-ctl.1 +- rm -rf /usr/share/man/man5/initiator.5 +- rm -rf /usr/share/man/man5/initiator_auth.5 +- rm -rf /usr/share/man/man5/iscsi_device_maps.5 +- rm -rf /etc/rc.d/init.d/initiator +- rm -rf /sbin/proc.iscsi-map-channel +- rm -rf /sbin/sysfs.iscsi-map-channel +- rm -rf /sbin/iscsi-map-channel +- rm -rf /sbin/proc.iscsi-unmap-channel +- rm -rf /sbin/sysfs.iscsi-unmap-channel +- rm -rf /sbin/iscsi-unmap-channel +- rm -rf /sbin/iscsi-remap-channel +- rm -rf /sbin/iscsi-mount +- rm -rf /sbin/iscsi-umount ++ rm -rf $(DESTDIR)/sbin/initiator-authd ++ rm -rf $(DESTDIR)/sbin/initiator-ctl ++ rm -rf $(DESTDIR)/usr/share/man/man1/initiator-ctl.1 ++ rm -rf $(DESTDIR)/usr/share/man/man5/initiator.5 ++ rm -rf $(DESTDIR)/usr/share/man/man5/initiator_auth.5 ++ rm -rf $(DESTDIR)/usr/share/man/man5/iscsi_device_maps.5 ++ rm -rf $(DESTDIR)/etc/rc.d/init.d/initiator ++ rm -rf $(DESTDIR)/sbin/proc.iscsi-map-channel ++ rm -rf $(DESTDIR)/sbin/sysfs.iscsi-map-channel ++ rm -rf $(DESTDIR)/sbin/iscsi-map-channel ++ rm -rf $(DESTDIR)/sbin/proc.iscsi-unmap-channel ++ rm -rf $(DESTDIR)/sbin/sysfs.iscsi-unmap-channel ++ rm -rf $(DESTDIR)/sbin/iscsi-unmap-channel ++ rm -rf $(DESTDIR)/sbin/iscsi-remap-channel ++ rm -rf $(DESTDIR)/sbin/iscsi-mount ++ rm -rf $(DESTDIR)/sbin/iscsi-umount + + initiator_install_config: all +- $(RM) -f /sbin/initiator-authd +- install initiator_authd /sbin/initiator-authd +- $(RM) -f /sbin/initiator-ctl +- install initiator_ctl /sbin/initiator-ctl +- install initiator_iname /sbin/initiator-iname +- install man/initiator-ctl.1 /usr/share/man/man1 ++ $(RM) -f $(DESTDIR)/sbin/initiator-authd ++ install initiator_authd $(DESTDIR)/sbin/initiator-authd ++ $(RM) -f $(DESTDIR)/sbin/initiator-ctl ++ install initiator_ctl $(DESTDIR)/sbin/initiator-ctl ++ install initiator_iname $(DESTDIR)/sbin/initiator-iname ++ install man/initiator-ctl.1 $(DESTDIR)/usr/share/man/man1 + +- if [ ! -d /etc/iscsi ]; then \ +- mkdir -p /etc/iscsi; \ ++ if [ ! -d $(DESTDIR)/etc/iscsi ]; then \ ++ mkdir -p $(DESTDIR)/etc/iscsi; \ + fi +- if [ ! -d /etc/sysconfig ]; then \ +- mkdir -p /etc/sysconfig; \ ++ if [ ! -d $(DESTDIR)/etc/sysconfig ]; then \ ++ mkdir -p $(DESTDIR)/etc/sysconfig; \ + fi +- if [ ! -d /etc/rc.d/init.d ]; then \ +- mkdir -p /etc/rc.d/init.d; \ ++ if [ ! -d $(DESTDIR)/etc/rc.d/init.d ]; then \ ++ mkdir -p $(DESTDIR)/etc/rc.d/init.d; \ + fi + +- install -c -m 755 scripts/install.channel /etc/iscsi/install.channel +- if [ -f /etc/sysconfig/initiator ]; then \ +- cp /etc/sysconfig/initiator /etc/sysconfig/initiator.old; \ ++ install -c -m 755 scripts/install.channel $(DESTDIR)/etc/iscsi/install.channel ++ if [ -f $(DESTDIR)/etc/sysconfig/initiator ]; then \ ++ cp /etc/sysconfig/initiator $(DESTDIR)/etc/sysconfig/initiator.old; \ + fi +- install -c -m 644 conf/initiator-sysconfig /etc/sysconfig/initiator; +- if [ -f /etc/sysconfig/iscsi_device_maps ]; then \ +- cp /etc/sysconfig/iscsi_device_maps /etc/sysconfig/iscsi_device_maps.old; \ ++ install -c -m 644 conf/initiator-sysconfig $(DESTDIR)/etc/sysconfig/initiator; ++ if [ -f $(DESTDIR)/etc/sysconfig/iscsi_device_maps ]; then \ ++ cp $(DESTDIR)/etc/sysconfig/iscsi_device_maps \ ++ $(DESTDIR)/etc/sysconfig/iscsi_device_maps.old; \ + fi +- install -c -m 644 conf/devicemaps-sysconfig /etc/sysconfig/iscsi_device_maps; +- if [ -f /etc/sysconfig/initiator_auth ]; then \ +- cp /etc/sysconfig/initiator_auth /etc/sysconfig/initiator_auth.old; \ ++ install -c -m 644 conf/devicemaps-sysconfig $(DESTDIR)/etc/sysconfig/iscsi_device_maps; ++ if [ -f $(DESTDIR)/etc/sysconfig/initiator_auth ]; then \ ++ cp $(DESTDIR)/etc/sysconfig/initiator_auth \ ++ $(DESTDIR)/etc/sysconfig/initiator_auth.old; \ + fi +- install -c -m 600 conf/initiator_auth-sysconfig /etc/sysconfig/initiator_auth; ++ install -c -m 600 conf/initiator_auth-sysconfig $(DESTDIR)/etc/sysconfig/initiator_auth; + +- install -c -m 755 scripts/rc.initiator /etc/rc.d/init.d/initiator +- install -c -m 755 scripts/proc.iscsi-map-channel /sbin/proc.iscsi-map-channel +- install -c -m 755 scripts/sysfs.iscsi-map-channel /sbin/sysfs.iscsi-map-channel +- install -c -m 755 scripts/iscsi-map-channel /sbin/iscsi-map-channel +- install -c -m 755 scripts/proc.iscsi-unmap-channel /sbin/proc.iscsi-unmap-channel +- install -c -m 755 scripts/sysfs.iscsi-unmap-channel /sbin/sysfs.iscsi-unmap-channel +- install -c -m 755 scripts/iscsi-unmap-channel /sbin/iscsi-unmap-channel +- install -c -m 755 scripts/iscsi-mount /sbin/iscsi-mount +- install -c -m 755 scripts/iscsi-umount /sbin/iscsi-umount ++ install -c -m 755 scripts/rc.initiator $(DESTDIR)/etc/rc.d/init.d/initiator ++ install -c -m 755 scripts/proc.iscsi-map-channel $(DESTDIR)/sbin/proc.iscsi-map-channel ++ install -c -m 755 scripts/sysfs.iscsi-map-channel $(DESTDIR)/sbin/sysfs.iscsi-map-channel ++ install -c -m 755 scripts/iscsi-map-channel $(DESTDIR)/sbin/iscsi-map-channel ++ install -c -m 755 scripts/proc.iscsi-unmap-channel $(DESTDIR)/sbin/proc.iscsi-unmap-channel ++ install -c -m 755 scripts/sysfs.iscsi-unmap-channel $(DESTDIR)/sbin/sysfs.iscsi-unmap-channel ++ install -c -m 755 scripts/iscsi-unmap-channel $(DESTDIR)/sbin/iscsi-unmap-channel ++ install -c -m 755 scripts/iscsi-mount $(DESTDIR)/sbin/iscsi-mount ++ install -c -m 755 scripts/iscsi-umount $(DESTDIR)/sbin/iscsi-umount + + add_initd: +- if [ -d /etc/rc.d/rc0.d ]; then \ +- ln -s /etc/rc.d/init.d/initiator /etc/rc.d/rc0.d/K02initiator; \ ++ if [ -d $(DESTDIR)/etc/rc.d/rc0.d ]; then \ ++ ln -s $(DESTDIR)/etc/rc.d/init.d/initiator \ ++ $(DESTDIR)/etc/rc.d/rc0.d/K02initiator; \ + fi +- if [ -d /etc/rc.d/rc1.d ]; then \ +- ln -s /etc/rc.d/init.d/initiator /etc/rc.d/rc1.d/K02initiator; \ ++ if [ -d $(DESTDIR)/etc/rc.d/rc1.d ]; then \ ++ ln -s $(DESTDIR)/etc/rc.d/init.d/initiator \ ++ $(DESTDIR)/etc/rc.d/rc1.d/K02initiator; \ + fi + +- if [ -d /etc/rc.d/rc2.d ]; then \ +- ln -s /etc/rc.d/init.d/initiator /etc/rc.d/rc2.d/K02initiator; \ ++ if [ -d $(DESTDIR)/etc/rc.d/rc2.d ]; then \ ++ ln -s $(DESTDIR)/etc/rc.d/init.d/initiator \ ++ $(DESTDIR)/etc/rc.d/rc2.d/K02initiator; \ + fi +- if [ -d /etc/rc.d/rc3.d ]; then \ +- ln -s /etc/rc.d/init.d/initiator /etc/rc.d/rc3.d/K02initiator; \ ++ if [ -d $(DESTDIR)/etc/rc.d/rc3.d ]; then \ ++ ln -s $(DESTDIR)/etc/rc.d/init.d/initiator \ ++ $(DESTDIR)/etc/rc.d/rc3.d/K02initiator; \ + fi +- if [ -d /etc/rc.d/rc4.d ]; then \ +- ln -s /etc/rc.d/init.d/initiator /etc/rc.d/rc4.d/K02initiator; \ ++ if [ -d $(DESTDIR)/etc/rc.d/rc4.d ]; then \ ++ ln -s $(DESTDIR)/etc/rc.d/init.d/initiator \ ++ $(DESTDIR)/etc/rc.d/rc4.d/K02initiator; \ + fi +- if [ -d /etc/rc.d/rc5.d ]; then \ +- ln -s /etc/rc.d/init.d/initiator /etc/rc.d/rc5.d/K02initiator; \ ++ if [ -d $(DESTDIR)/etc/rc.d/rc5.d ]; then \ ++ ln -s $(DESTDIR)/etc/rc.d/init.d/initiator \ ++ $(DESTDIR)/etc/rc.d/rc5.d/K02initiator; \ + fi +- if [ -d /etc/rc.d/rc6.d ]; then \ +- ln -s /etc/rc.d/init.d/initiator /etc/rc.d/rc6.d/K02initiator; \ ++ if [ -d $(DESTDIR)/etc/rc.d/rc6.d ]; then \ ++ ln -s $(DESTDIR)/etc/rc.d/init.d/initiator \ ++ $(DESTDIR)/etc/rc.d/rc6.d/K02initiator; \ + fi + + clean: +--- a/isnsclient-v1.8/Makefile ++++ b/isnsclient-v1.8/Makefile +@@ -90,10 +90,10 @@ + $(CC) -I$(INCDIR) $(CFLAGS) -lpthread -o isnsc $(SRCS) + + install: all +- /bin/cp isnsc /sbin/ +- /bin/cp scripts/* /sbin/ +- if [ ! -f /var/spool/isns ]; then \ +- mkdir -p /var/spool/isns; \ ++ /bin/cp isnsc $(DESTDIR)/sbin/ ++ /bin/cp scripts/* $(DESTDIR)/sbin/ ++ if [ ! -f $(DESTDIR)/var/spool/isns ]; then \ ++ mkdir -p $(DESTDIR)/var/spool/isns; \ + fi + + tarball : |