diff options
author | Christian Hesse | 2015-06-29 13:21:21 +0200 |
---|---|---|
committer | Christian Hesse | 2015-06-29 13:21:21 +0200 |
commit | d144b2b85663dcb49d077c0fba805001a0cafb9b (patch) | |
tree | 758469c4be694a12e606ef185578bb4bbb013eb9 | |
download | aur-d144b2b85663dcb49d077c0fba805001a0cafb9b.tar.gz |
initial import of open-iscsi-git 2.0.873.r128.g8da14e6-1
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 61 | ||||
-rw-r--r-- | open-iscsi.install | 12 |
3 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0480aed00e48 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = open-iscsi-git + pkgdesc = iSCSI userland tools - git checkout + pkgver = 2.0.873.r128.g8da14e6 + pkgrel = 1 + url = http://www.open-iscsi.org/ + install = open-iscsi.install + arch = i686 + arch = x86_64 + license = GPL + provides = open-iscsi + conflicts = open-iscsi + options = docs + backup = etc/iscsi/iscsid.conf + backup = etc/iscsi/initiatorname.iscsi + source = git://github.com/mikechristie/open-iscsi.git + sha256sums = SKIP + +pkgname = open-iscsi-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e8d6fba6546e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,61 @@ +# Maintainer: Christian Hesse <mail@eworm.de> +# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Stefan Kirrmann <stefan.kirrmann at gmail dot com> + +pkgname=open-iscsi-git +pkgver=2.0.873.r128.g8da14e6 +pkgrel=1 +pkgdesc='iSCSI userland tools - git checkout' +arch=('i686' 'x86_64') +url='http://www.open-iscsi.org/' +license=('GPL') +install=open-iscsi.install +provides=('open-iscsi') +conflicts=('open-iscsi') +backup=('etc/iscsi/iscsid.conf' + 'etc/iscsi/initiatorname.iscsi') +source=('git://github.com/mikechristie/open-iscsi.git') +options=('docs') +sha256sums=('SKIP') + +pkgver() { + cd "${srcdir}/open-iscsi/" + + if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then + echo "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG}).r$(git rev-list --count ${GITTAG}..).g$(git log -1 --format="%h")" + else + echo "0.r$(git rev-list --count master).g$(git log -1 --format="%h")" + fi +} + +build() { + cd "${srcdir}/open-iscsi/" + + # include iscsistart in the package + sed -i -e '/^PROGRAMS = /s/$/ usr\/iscsistart/' Makefile + + # build breaks if the openslp package is installed + sed -i -e 's/\(\.\/configure\)/ \1 --without-slp/g' Makefile + + make user +} + +package() { + cd "${srcdir}/open-iscsi/" + + make DESTDIR="${pkgdir}" install_user + + install -D -m0644 etc/systemd/iscsid.service "${pkgdir}/usr/lib/systemd/system/iscsid.service" + install -D -m0644 etc/systemd/iscsid.socket "${pkgdir}/usr/lib/systemd/system/iscsid.socket" + + # do not set initiatorname, install script does that + rm "${pkgdir}/etc/iscsi/initiatorname.iscsi" + touch "${pkgdir}/etc/iscsi/initiatorname.iscsi" + + # copy docs + install -D -m0644 Changelog "${pkgdir}/usr/share/doc/open-iscsi/Changelog" + install -D -m0644 README "${pkgdir}/usr/share/doc/open-iscsi/README" + + # fix install path for binaries + mv "${pkgdir}/sbin" "${pkgdir}/usr/bin" +} diff --git a/open-iscsi.install b/open-iscsi.install new file mode 100644 index 000000000000..d5363b8b04c6 --- /dev/null +++ b/open-iscsi.install @@ -0,0 +1,12 @@ +## arg 1: the new package version +post_install() { + if [ -z $(</etc/iscsi/initiatorname.iscsi) ]; then + name=$(iscsi-iname) + echo ">>> Setting Initiatorname '$name'" + echo "InitiatorName=$name" > /etc/iscsi/initiatorname.iscsi + fi +} + +post_upgrade() { + post_install +} |