summaryrefslogtreecommitdiff
path: root/core/hdparm/PKGBUILD
blob: 095ba8c8c7e317bc13d2511c8e200fe97ffc9e36 (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
# $Id: PKGBUILD 186146 2013-05-21 09:12:32Z tpowa $
# Maintainer: Paul Mattal <paul@archlinux.org>

pkgname=hdparm
pkgver=9.43
pkgrel=2
pkgdesc="A shell utility for manipulating Linux IDE drive/driver parameters"
arch=(i686 x86_64)
depends=('glibc')
optdepends=('sh: required by idectl and ultrabayd')
source=(http://downloads.sourceforge.net/sourceforge/hdparm/${pkgname}-${pkgver}.tar.gz
        wiper.sh.2_6.max-ranges.patch)
license=('BSD')
url="http://sourceforge.net/projects/hdparm/"
optdepends=('bash: for wiper.sh script')
options=('emptydirs')
md5sums=('f73233be118d86c779a8463d8b6a3cdb'
         '74e368f384166a7710b447573cda120a')

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}
  # Fix Range input/output error when wiping Intel G2 and OCZ drives
  patch -Np1 -i $srcdir/wiper.sh.2_6.max-ranges.patch
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  # install
  mkdir -p ${pkgdir}/usr/bin
  make DESTDIR=${pkgdir} sbindir=/usr/bin install
  install -m755 contrib/idectl ${pkgdir}/usr/bin
  install -m755 contrib/ultrabayd ${pkgdir}/usr/bin

  install -D -m 0644 $srcdir/$pkgname-$pkgver/wiper/README.txt $pkgdir/usr/share/doc/wiper/README.txt
  install -D -m 0755 $srcdir/$pkgname-$pkgver/wiper/wiper.sh $pkgdir/usr/bin/wiper.sh

  #install license file
  install -D -m 644 LICENSE.TXT $pkgdir/usr/share/licenses/hdparm/LICENSE.TXT
}