Advertisement
jamesan

PKGBUILD for the AUR package, hal

Aug 2nd, 2014
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.51 KB | None | 0 0
  1. # Maintainer:  Rohit Manokaran <rohit000@live.com>
  2. # Contributor: James An <james@jamesan.ca>
  3. # Contributor: Rohit Manokaran <rohitmanokaran@yahoo.com>
  4. # Contributor: Pawel "l0ner" Soltys <pwslts@gmail.com>
  5. # Contributor: Jan de Groot <jgc@archlinux.org>
  6. # Contributor: Link Dupont <link@subpop.net>
  7. # Contributor: Calvin Morisson <mutantturkey@gmail.com>
  8.  
  9. pkgname=hal
  10. pkgver=0.5.14
  11. pkgrel=20
  12. pkgdesc="Hardware Abstraction Layer"
  13. arch=(i686 x86_64)
  14. license=('GPL' 'custom')
  15. url="http://www.freedesktop.org/wiki/Software/hal"
  16. depends=('dbus-glib>=0.82' 'libusb-compat' 'hal-info>=0.20090716' 'dmidecode' 'v4l-utils')
  17. optdepends=('acpid>=2.0' 'pm-utils>=1.2.5')
  18. makedepends=('gperf')
  19. options=('!libtool' '!makeflags')
  20. install=hal.install
  21. source=(http://hal.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz
  22.          hald
  23.          hal.service
  24.          hal.patch
  25.          udev-update.patch
  26.          hal-glib-2.3-compile-fix.patch
  27.          hal-libudev-events.patch
  28.          badvok-compile-fix.patch)
  29.  
  30. md5sums=('e9163df591a6f38f59fdbfe33e73bf20'
  31.          '4cdfc673ad65ddb51919f5a757f62145'
  32.          'ca4a7932fe7e8acbfa17245b62cc3b9b'
  33.          '185dd5d6ffc703ec8395b4eb3a1ae498'
  34.          '68209ba62b2a19537bfa459fdef70ed3'
  35.          'c126a66766118f83a171511832d1b619'
  36.          'd115a2f1793121b08dd58527c1530d0b'
  37.          '7acfdd590c98272930ddfd37f1c7f5a3')
  38.  
  39. build() {
  40.   cd "${srcdir}/${pkgname}-${pkgver}"
  41.   patch -Np1 -d .. -i ../hal.patch
  42.  
  43.   patch -Np1 -i ../hal-libudev-events.patch
  44.   patch -Np1 -i ../hal-glib-2.3-compile-fix.patch
  45.   patch -Np1 -i ../udev-update.patch
  46.   patch -Np1 -i ../badvok-compile-fix.patch
  47.  
  48.   # fix trialing space
  49.   sed -i 's/failed; [\] /failed; \\/' policy/Makefile.am
  50.  
  51.   # fix subdir-objects mess in automake 1.14
  52.   sed -i 's/AM_INIT_AUTOMAKE[(]\[gnu 1.9\][)]/AM_INIT_AUTOMAKE([subdir-objects])/' configure.in
  53.  
  54.   libtoolize --force
  55.   aclocal
  56.   autoupdate   # required to fix obsolete macros
  57.   autoconf
  58.   automake --add-missing --warnings=all
  59.  
  60.   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
  61.       --libexecdir=/usr/lib/hal --with-udev-prefix=/etc \
  62.       --enable-static=no --disable-acpi-ibm \
  63.       --disable-docbook-docs --disable-console-kit \
  64.       --disable-policy-kit --disable-acl-management \
  65.       --enable-umount-helper --disable-smbios \
  66.       --with-hal-user=hal --with-hal-group=hal \
  67.       --with-pid-file=/var/run/hald.pid \
  68.       --sbindir=/usr/bin --disable-gtk-doc
  69.   make
  70.  
  71. }
  72.  
  73. package() {
  74.   cd "${srcdir}/${pkgname}-${pkgver}"
  75.   make DESTDIR="${pkgdir}" install
  76.  
  77.   install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
  78.  
  79.   # These empty directories are required by hal to successfuly create its fdi-cache
  80.   install -m755 -d "${pkgdir}/etc/hal/fdi/"{policy,preprobe,information}
  81.  
  82.   # udev-sockets support has been removed from udev. hal-libudev-events.patch fixes hal to get events from libudev
  83.   rm -r "${pkgdir}/etc/udev"
  84.  
  85.   # move umount.hal from non-standard /sbin to /usr/bin
  86.   if test -e "${pkgdir}/sbin/umount.hal"; then
  87.     install -m755 -d "${pkgdir}/usr/bin"
  88.     mv "${pkgdir}/sbin/umount.hal" "${pkgdir}/usr/bin/umount.hal"
  89.     rmdir "${pkgdir}/sbin"
  90.   fi
  91.  
  92.   # create systemd service files
  93.   install -Dm644 ../hal.service "${pkgdir}/usr/lib/systemd/system/hal.service"
  94.  
  95.   # These dirs dont appear to be used. If they are needed we need to add systemd tmpfile to create them
  96.   rm -r "${pkgdir}/var/run"
  97.  
  98.   # Change ownership from hal:hal to root [namcap error]
  99.   chown root:root "${pkgdir}/var/cache/hald"
  100. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement