blob: d338f4fd7b7d2ce74e56aba2e9d6ea26a7bf5470 (
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
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lm_sensors
pkgver=3.2.0
pkgrel=0
pkgdesc="Collection of user space tools for general SMBus access and hardware monitoring."
url="http://www.lm-sensors.org/"
license="GPL"
depends="sysfsutils rrdtool"
makedepends="perl rrdtool-dev bison flex"
subpackages="$pkgname-dev $pkgname-doc $pkgname-detect"
#install=sensors.install
source="http://dl.lm-sensors.org/lm-sensors/releases/$pkgname-$pkgver.tar.bz2
lm_sensors-3.1.0-sensors-detect-alpine.patch
fancontrol.initd
lm_sensors.initd
sensord.confd
sensord.initd
"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
cd "$_builddir"
sed -i -e 's:^# \(PROG_EXTRA\):\1:' Makefile
# Respect LDFLAGS
sed -i -e 's/\$(LIBDIR)$/\$(LIBDIR) \$(LDFLAGS)/g' Makefile
sed -i -e 's/\$(LIBSHSONAME) -o/$(LIBSHSONAME) \$(LDFLAGS) -o/g' \
lib/Module.mk
# do not check for libiconv in ldconfig cache
sed -i -e 's/^LIBICONV.*/LIBICONV ?=/' prog/sensors/Module.mk || return 1
for i in ../*.patch; do
msg "Applying $i"
patch -p1 < $i || return 1
done
}
build() {
cd "$_builddir"
export CFLAGS="$CFLAGS -fno-stack-protector"
make PREFIX=/usr user || return 1
}
package() {
cd "$_builddir"
make user_install \
PREFIX=/usr \
MANDIR=/usr/share/man \
DESTDIR="$pkgdir" || return 1
cd "$srcdir"
install -Dm755 fancontrol.initd "$pkgdir"/etc/init.d/fancontrol
install -Dm755 lm_sensors.initd "$pkgdir"/etc/init.d/lm_sensors
install -Dm755 sensord.initd "$pkgdir"/etc/init.d/sensord
install -Dm755 sensord.confd "$pkgdir"/etc/conf.d/sensord
}
detect() {
depends="perl"
pkgdesc="Detection/migration scripts for lm_sensors"
mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/sbin
cd "$pkgdir"
mv usr/bin/sensors-conf-convert "$subpkgdir"/usr/bin/
mv usr/sbin/sensors-detect "$subpkgdir"/usr/bin/
}
md5sums="829d88fb09d67723fbf42853eb84d1fd lm_sensors-3.2.0.tar.bz2
b6e7de1a1768f7a6ea2e00c226331877 lm_sensors-3.1.0-sensors-detect-alpine.patch
58f4c9193a903711ace7fa0754693bd2 fancontrol.initd
2c7e97203da2c39bc9fbfc2a4849cfd4 lm_sensors.initd
82e075236a61334abb3adf46280380d3 sensord.confd
6f3a880988e7cdbcb20870e3c6d1e554 sensord.initd"
|