diff options
author | Márcio Alexandre Silva Delgado <coadde@lavabit.com> | 2013-05-27 04:13:28 -0300 |
---|---|---|
committer | Márcio Alexandre Silva Delgado <coadde@lavabit.com> | 2013-05-27 04:13:28 -0300 |
commit | 94a71cc3e01869f3236825118a53055abbdfede0 (patch) | |
tree | 553e98aff37e533210c8143dd79412fb37c22ec0 /pcr/openhpi/PKGBUILD | |
parent | 7c22bc7867bc4315e2fa35dada87d21b8c126afa (diff) | |
download | abslibre-94a71cc3e01869f3236825118a53055abbdfede0.tar.gz abslibre-94a71cc3e01869f3236825118a53055abbdfede0.tar.bz2 abslibre-94a71cc3e01869f3236825118a53055abbdfede0.zip |
openhpi: add pkg to pcr repo
Diffstat (limited to 'pcr/openhpi/PKGBUILD')
-rw-r--r-- | pcr/openhpi/PKGBUILD | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/pcr/openhpi/PKGBUILD b/pcr/openhpi/PKGBUILD new file mode 100644 index 000000000..284034782 --- /dev/null +++ b/pcr/openhpi/PKGBUILD @@ -0,0 +1,83 @@ +# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com> + +pkgname=openhpi +pkgver=3.2.0 +pkgrel=1 +pkgdesc='Abstracted interface for managing computer hardware, typically chassis and rack based servers' +arch=( + i686 + x86_64 + mips64el +) +url=http://www.$pkgname.org/ +license=custom +depends=( + libxml2 + net-snmp +) +source=http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz +sha512sums=5a54ccc2279b3a608e2842dd3b4f01d7d483182ecd33d1d33186247cea15b62f1e0aea4eea1294cd6c3959a25424dc322cca73e516f4c8fd9d3a41a949d087ab + +prepare() { + cd $srcdir/$pkgname-$pkgver + sed -i 's|bin/sh|usr/bin/bash|; + ' $(grep -rl bin/sh .) + sed -i 's|usr/sbin|usr/bin|; + ' $(grep -rl usr/bin .) + sed -i 's| /bin| /usr/bin|; + ' $(grep -rl ' /bin' .) + sed -i 's| /sbin| /usr/bin|; + ' $(grep -rl ' /sbin' .) + sed -i 's|var/lock|run/lock|; + ' $(grep -rl var/lock .) + sed -i 's|var/run|run|; + ' $(grep -rl var/run .) + sed -i '/Like Linux/ s|Linux|GNU/Linux|; + /Linux and Compaq Tru64 Unix/ s|Linux|GNU/Linux|; + /Linux distribution/ s|Linux|GNU/Linux|; + /Linux software/ s|Linux|GNU/Linux|; + ' $(grep -rl Linux .) +} + +build() { + cd $srcdir/$pkgname-$pkgver + setarch $CARCH ./configure --prefix=/usr\ + --enable-clients\ + --enable-dynamic_simulator\ + --enable-ilo2_ribcl\ + --enable-ipmidirect\ + --enable-man\ + --enable-oa_soap\ + --enable-simulator\ + --enable-slave\ + --enable-snmp_bc\ + --enable-sysfs\ + --enable-test_agent\ + --enable-watchdog\ + --localstatedir=/var\ + --sbindir=/usr/bin\ + --sysconfdir=/etc + setarch $CARCH make +} + +package() { + cd $srcdir/$pkgname-$pkgver + setarch $CARCH make DESTDIR=$pkgdir install + + rm $pkgdir/etc/init.d/openhpid + rmdir $pkgdir/etc/init.d + + install -d $pkgdir/usr/lib/systemd/system + echo '[Unit]' > $pkgdir/usr/lib/systemd/system/openhpi.service + echo 'Description=Enable OpenHPI service which is provided by openhpid' >> $pkgdir/usr/lib/systemd/system/openhpi.service + echo 'After=network.target remote-fs.target' >> $pkgdir/usr/lib/systemd/system/openhpi.service + echo '' >> $pkgdir/usr/lib/systemd/system/openhpi.service + echo '[Service]' >> $pkgdir/usr/lib/systemd/system/openhpi.service + echo 'Type=forking' >> $pkgdir/usr/lib/systemd/system/openhpi.service + echo 'ExecStart=/usr/bin/openhpid -c /etc/openhpi/openhpi.conf' >> $pkgdir/usr/lib/systemd/system/openhpi.service + echo '' >> $pkgdir/usr/lib/systemd/system/openhpi.service + echo '[Install]' >> $pkgdir/usr/lib/systemd/system/openhpi.service + echo 'WantedBy=multi-user.target' >> $pkgdir/usr/lib/systemd/system/openhpi.service +} + +# vim:set ts=2 sw=2 et: |