summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Harvey2015-08-04 01:00:23 +0000
committerJames Harvey2015-08-04 01:00:23 +0000
commit51106278bdf7242c87ae514f5f2511d274a41996 (patch)
treea68e0f56339e6aa368f9165cb5b2bbad45668b8a
parentd83a44533878d633b15d5c992089b6df26f90762 (diff)
downloadaur-51106278bdf7242c87ae514f5f2511d274a41996.tar.gz
Moved systemd .service file from /etc to /usr. Although they both work, it's the proper location for a package to install in. Also removed pkgdir/etc/ if it's empty, which it should be, since pkgdir/etc/init.d/ was removed.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD9
2 files changed, 8 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4e1cd441301..62fe5af91fd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = opensm
pkgdesc = OpenFabrics Alliance InfiniBand Subnet Manager and Administrator
pkgver = 3.3.19
- pkgrel = 2
+ pkgrel = 3
url = https://www.openfabrics.org/index.php/overview.html
arch = x86_64
arch = i686
diff --git a/PKGBUILD b/PKGBUILD
index 56b06c56c7a..c138dbcffcf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=opensm
pkgver=3.3.19
-pkgrel=2
+pkgrel=3
pkgdesc='OpenFabrics Alliance InfiniBand Subnet Manager and Administrator'
arch=('x86_64' 'i686')
url=('https://www.openfabrics.org/index.php/overview.html')
@@ -36,6 +36,11 @@ package() {
# Convert from init.d to systemd
rm -rf ${pkgdir}/etc/init.d
- install -Dm644 "${srcdir}/opensm.service" "${pkgdir}/etc/systemd/system/opensm.service"
+ # If ${pkgdir}/etc is empty (it should be, since /etc/init.d/ was removed) remove it
+ if ! [ "$(ls -A ${pkgdir}/etc)" ]; then
+ rm -rf ${pkgdir}/etc/
+ fi
+
+ install -Dm644 "${srcdir}/opensm.service" "${pkgdir}/usr/lib/systemd/system/opensm.service"
install -Dm755 "${srcdir}/opensm.launch" "${pkgdir}/usr/bin/opensm.launch"
}