diff options
Diffstat (limited to 'extra/gpsd/PKGBUILD')
-rw-r--r-- | extra/gpsd/PKGBUILD | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/extra/gpsd/PKGBUILD b/extra/gpsd/PKGBUILD new file mode 100644 index 000000000..26a2a8b0d --- /dev/null +++ b/extra/gpsd/PKGBUILD @@ -0,0 +1,77 @@ +# $Id: PKGBUILD 116032 2011-03-22 16:23:53Z andrea $ +# Maintainer: Andrea Scarpino <andrea@archlinux.org> +# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org +# Contributor: Giacomo Rizzo <alt@free-os.it> + +pkgname=gpsd +pkgver=2.96 +pkgrel=1 +pkgdesc="GPS daemon and library to support USB/serial GPS devices" +arch=('i686' 'x86_64' 'mips64el') +url="http://gpsd.berlios.de" +license=('BSD') +depends=('lesstif' 'libxaw' 'python2' 'pth' 'libusb' 'desktop-file-utils') +optdepends=('php: generate a PHP status page for your GPS' + 'php-gd: image support for the PHP status page') +makedepends=('docbook-xsl') +backup=('etc/conf.d/gpsd' 'lib/udev/rules.d/99-gpsd-usb.rules') +options=('!libtool') +install="${pkgname}.install" +source=("http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.gz" + 'gpsd' 'LICENSE') +md5sums=('26a7a04d4298bc3a3a5d89fef4582b64' + 'f929322fc4670543fcb36dafc7bb9e03' + 'd217a23f408e91c94359447735bc1800') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # install python to the same DESTDIR given make + sed -i 's|--prefix=${prefix} # --root=$(DESTDIR)|--prefix=${prefix} --root=$(DESTDIR)|' Makefile.am Makefile.in + + # fix python 2.7 path + sed -i 's|/usr/bin/python|/usr/bin/python2|' gpsd.hotplug{,.wrapper} + sed -i 's|/usr/bin/python2.6|/usr/bin/python2|' valgrind-audit + sed -i 's|/usr/bin/env python|/usr/bin/env python2|' gpscat \ + gpsfake gpsprof xgps xgpsspeed gps/gps.py + + PYTHON=/usr/bin/python2 ./configure --prefix=/usr \ + --disable-libQgpsmm \ + --disable-static + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # Fix man pages path (FS#21715) + sed -i 's|.so gps.1|.so man1/gps.1|' cgps.1 lcdgps.1 xgps.1 xgpsspeed.1 + + make DESTDIR="${pkgdir}" install + + # Our own udev-install since the Makefile uses absolute paths + # Original file names are [mostly] unmodified: useful to match process name in case of error + # Following the switch from hotplug to udev helper scripts now live in /lib/udev/ instead of /etc/hotplug/ + sed -i 's|GPSD_OPTIONS=""|GPSD_OPTIONS="-P /var/run/gpsd.pid"|' packaging/deb/etc_default_gpsd + sed -i 's|"/var/run/gpsd.sock"|"/var/run/gpsd/gpsd.sock"|' packaging/deb/etc_default_gpsd + install -D -m644 "packaging/deb/etc_default_gpsd" "${pkgdir}/etc/conf.d/gpsd" + + sed -i 's|Id: gpsd.rules|Id: 99-gpsd-usb.rules|' gpsd.rules + install -D -m644 "gpsd.rules" "${pkgdir}/lib/udev/rules.d/99-gpsd-usb.rules" + + sed -i 's|/etc/default/gpsd|/etc/conf.d/gpsd|' gpsd.hotplug.wrapper + install -D -m755 gpsd.hotplug.wrapper "${pkgdir}/lib/udev/gpsd.hotplug.wrapper" + + # Patch a path bug. Check to see if fixed in ensuing releases + sed -i 's|gpsdcmd = "gpsd %s|gpsdcmd = "/usr/sbin/gpsd %s|' gpsd.hotplug + install -D -m755 gpsd.hotplug "${pkgdir}/lib/udev/gpsd.hotplug" + + install -D -m644 packaging/X11/xgps.desktop ${pkgdir}/usr/share/applications/xgps.desktop + install -D -m644 packaging/X11/xgpsspeed.desktop ${pkgdir}/usr/share/applications/xgpsspeed.desktop + install -D -m644 packaging/X11/gpsd-logo.png ${pkgdir}/usr/share/gpsd/gpsd-logo.png + + install -D -m755 "${srcdir}/gpsd" "${pkgdir}/etc/rc.d/gpsd" + + install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} |