aboutsummaryrefslogtreecommitdiffstats
path: root/main/hdparm/APKBUILD
blob: 242ce66d93359919d8eec2be836809d026b68762 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=hdparm
pkgver=9.43
pkgrel=2
pkgdesc="A shell utility for manipulating Linux IDE drive/driver parameters"
url="http://sourceforge.net/projects/hdparm/"
arch="all"
license="BSD"
depends=""
makedepends=""
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
	fix-includes.patch
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() { 
	cd "$_builddir"
	export CFLAGS="$CFLAGS -D_GNU_SOURCE"
	make || return 1
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/usr "$pkgdir"/sbin
	make DESTDIR="$pkgdir" install || return 1
	install -m755 contrib/idectl "$pkgdir"/sbin || return 1
	install -m755 contrib/ultrabayd "$pkgdir"/sbin || return 1
	install -D -m 644 LICENSE.TXT $pkgdir/usr/share/licenses/hdparm/LICENSE.TXT || return 1
}

md5sums="f73233be118d86c779a8463d8b6a3cdb  hdparm-9.43.tar.gz
13a99ab348839153ffd0f309981f892b  fix-includes.patch"
sha256sums="2bbe92274971182192901ab220e94bd2e4896f924fa6b225d0cffd7d8c16b52a  hdparm-9.43.tar.gz
8234bdc6cda1a81ba404ac2666ba7c0b2c047f13c3face83ee95a5eaa72abe28  fix-includes.patch"
sha512sums="24cf10290d11c611951064ae2f4fc0c06d2aa764eb2801126c0cda272944adc1c07bc905c6c11dd964dd966e213aed1cde06afc7f24c565cfa709ba9134842df  hdparm-9.43.tar.gz
8d6268d3183375f5984f9c958f7911dbc501de589a035a6252cfbb5595e5049b567ceaa064ea4644a0d3f9a3381370e1c416c151e34fa19d3df8a09ec12613c0  fix-includes.patch"