Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD_hd-idle_pkgrel=3

By: wombalton on Jun 11th, 2013  |  syntax: Bash  |  size: 1.27 KB  |  views: 98  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Kyle Keen <keenerd@gmail.com>
  2. # Contributor: Tilman Blumenbach <tilman@ax86.net>
  3.  
  4. pkgname=hd-idle
  5. pkgver=1.04
  6. pkgrel=3
  7. pkgdesc='Utility program for spinning-down external disks after a period of idle time.'
  8. arch=(i686 x86_64)
  9. backup=(etc/conf.d/hd-idle)
  10. url="http://hd-idle.sourceforge.net/"
  11. license=('GPL')
  12. install="hd-idle.install"
  13. source=("http://downloads.sf.net/$pkgname/$pkgname-$pkgver.tgz"
  14.         "hd-idle.init"
  15.         "hd-idle.service")
  16. md5sums=('41e52e669fc59fa82ee0c2bcce1336d3'
  17.          '19c07682085d7fa99527c0f35073d331'
  18.          '82cd5beede4cd11f94e61f6c8332d07c')
  19.  
  20. build() {
  21.     cd "$srcdir/$pkgname"
  22.     make
  23. }
  24.  
  25. package() {
  26.     cd "$srcdir/$pkgname"
  27.  
  28.     # Install binary
  29.     make TARGET_DIR="$pkgdir/usr" install
  30.     mkdir $pkgdir/usr/bin/
  31.     mv $pkgdir/usr/sbin/hd-idle $pkgdir/usr/bin/
  32.     rmdir $pkgdir/usr/sbin
  33.  
  34.     # Install custom init script and stock defaults file:
  35.     install -Do 0 -g 0 "$srcdir/hd-idle.init" "$pkgdir/etc/rc.d/hd-idle"
  36.     install -Dpm 644 -o 0 -g 0 debian/hd-idle.default "$pkgdir/etc/conf.d/hd-idle"
  37.     install -Dm 644 "$srcdir/hd-idle.service" "$pkgdir/usr/lib/systemd/system/hd-idle.service"
  38.  
  39.     # Install README:
  40.     install -Dm 644 -o 0 -g 0 README "$pkgdir/usr/share/doc/$pkgname/README"
  41. }