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

_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="213efdbe7471fad3408198918e164354  hdparm-9.48.tar.gz"
sha256sums="ce97b4a71cb04146f54cf6f69787e7f97ddfda9836dc803b459d3b3df3a4fbee  hdparm-9.48.tar.gz"
sha512sums="5b8908a762d892c403406da4798202bed95f035396e3c49f04da910fa53a6b442a7d7c9cb1e5d786d7c8c5a1b681c8d1db10f1bd8dad09600a6f3811fbf8afb7  hdparm-9.48.tar.gz"