blob: 6389ff39cd13ada381d421aa197f6695008ef3bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# Maintainer: 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:
|