summaryrefslogtreecommitdiff
path: root/extra/hddtemp/PKGBUILD
blob: 9b13f06b9bea9b24320d8d261096558e8c9c09da (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
# $Id: PKGBUILD 186029 2013-05-20 14:50:15Z 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=2
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')
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"
        'service')
sha1sums=('65393b0a4d9862c030c81702d95c1acd00da275b'
          'b9bcdd0537c1540e55e5056445b571ea61d5a4a3'
          '9b02e5bed22f81ceab2b69bae788a9a3aa5c2147')

options=('!libtool')

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

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

	./configure \
		--prefix=/usr \
		--sbindir=/usr/bin \
		--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"
}