summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 73e9beda3abaf93b16837134af17a3b6b3e9d37a (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
# Maintainer: Florian Dejonckheere <florian at floriandejonckheere dot be>
# Contributor: Limao Luo <luolimao+AUR@gmail.com>
# Contributor: Asparagus Maximus <asparagus.maximus@gmail.com>

pkgname=hdapsicon-git
pkgver=2eec2c7
pkgrel=1
pkgdesc="A standalone GTK applet for HDAPS disk protection status - formerly known as ThinkHDAPS"
arch=('any')
url="https://github.com/thpani/thinkhdaps"
license=("GPL")
depends=(pygtk gnome-python tp_smapi hdapsd)
source=("${pkgname}::git+https://github.com/thpani/thinkhdaps")
md5sums=('SKIP')

pkgver()
{
	cd "${srcdir}/${pkgname}"
	# Use the tag of the last commit
	git describe --long --always | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
}

prepare()
{
	cd "${srcdir}/${pkgname}"
	./autogen.sh
	./configure --prefix=/usr --enable-desktop
}

build()
{
	cd "${srcdir}/${pkgname}"
	make
}

package()
{
	make -C "${pkgname}" DESTDIR="${pkgdir}" install
	sed -i 's:^#!/usr/bin/python$:&2:' "${pkgdir}/usr/bin/${pkgname%%-git}"
}