summaryrefslogtreecommitdiff
path: root/extra/hddtemp/PKGBUILD
blob: e2ca08aac8a4eeab513c5e3b9921869da9eaf0a6 (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
# $Id: PKGBUILD 163630 2012-07-17 14:24:03Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Roman Kyrylych <roman@archlinux.org>
# Contributor: Damir Perisa <damir@archlinux.org>

pkgname=hddtemp
_origver=0.3-beta15
_patchver=${_origver}-52
pkgver=${_patchver//-/.}
pkgrel=1
pkgdesc="Gives you the temperature of your hard drive by reading S.M.A.R.T. information"
url='https://savannah.nongnu.org/projects/hddtemp/'
license=('GPL')
arch=('i686' 'x86_64' 'mips64el')
backup=('etc/conf.d/hddtemp')
source=("http://download.savannah.gnu.org/releases/${pkgname}/${pkgname}-${_origver}.tar.bz2"
        "http://ftp.debian.org/debian/pool/main/h/${pkgname}/${pkgname}_${_patchver}.diff.gz"
        'rc.d'
        'conf.d'
        'service')
sha1sums=('65393b0a4d9862c030c81702d95c1acd00da275b'
          'b9bcdd0537c1540e55e5056445b571ea61d5a4a3'
          '71159486b1505ec6acfb7585e0d8fbe78afe54ec'
          'd45e3022f614dbf8904ecb1a3e702bb71fcaa808'
          '501fcf4faf8b2689d010f9cbbf39f917211f611f')

options=('!libtool')

build() {
	cd "${srcdir}/${pkgname}-${_origver}"

	patch -p1 -i "../${pkgname}_${_patchver}.diff"

	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--with-db-path="/usr/share/${pkgname}/hddtemp.db"

	make
}

package() {
	cd "${srcdir}/${pkgname}-${_origver}"

	make DESTDIR="${pkgdir}" install

	install -Dm644 "../${pkgname}-${_origver}/debian/hddtemp.db" "${pkgdir}/usr/share/${pkgname}/hddtemp.db"
	install -Dm644 '../service' "${pkgdir}/usr/lib/systemd/system/hddtemp.service"
	install -Dm644 '../conf.d' "${pkgdir}/etc/conf.d/hddtemp"
	install -Dm755 '../rc.d' "${pkgdir}/etc/rc.d/hddtemp"
}