diff options
author | root <root@rshg054.dnsready.net> | 2011-08-20 23:14:32 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-08-20 23:14:32 +0000 |
commit | 839141249778baa4dba0f0511c52b5eded3cd934 (patch) | |
tree | 6c3df2941048911b4126ea70a46816110bddf514 /testing/gpsd/PKGBUILD | |
parent | c6a4d3790fc33558d9af322dac15d2bd6d34ac0b (diff) |
Sat Aug 20 23:14:32 UTC 2011
Diffstat (limited to 'testing/gpsd/PKGBUILD')
-rw-r--r-- | testing/gpsd/PKGBUILD | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/testing/gpsd/PKGBUILD b/testing/gpsd/PKGBUILD new file mode 100644 index 000000000..d4c1119cd --- /dev/null +++ b/testing/gpsd/PKGBUILD @@ -0,0 +1,78 @@ +# $Id: PKGBUILD 135847 2011-08-19 16:38:40Z 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=3.0 +pkgrel=1 +pkgdesc="GPS daemon and library to support USB/serial GPS devices" +arch=('i686' 'x86_64') +url="http://gpsd.berlios.de" +license=('BSD') +depends=('python2' 'libusb' 'bluez' 'desktop-file-utils') +optdepends=('php: generate a PHP status page for your GPS' + 'php-gd: image support for the PHP status page') +makedepends=('scons' 'docbook-xsl' 'chrpath') +backup=('etc/conf.d/gpsd' 'lib/udev/rules.d/99-gpsd-usb.rules') +options=('!libtool' '!buildflags') +install="${pkgname}.install" +source=("http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.gz" + 'gpsd') +md5sums=('c63d41a26868e9bdd48d9e311a9cc42c' + 'e287d4b34a4eb1da27f12533ae9b6dd5') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # fix python 2.7 path + sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ + -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + $(find . -name '*.py') + sed -i 's|/usr/bin/env python|/usr/bin/env python2|' gegps gpscat gpsfake \ + gpsprof xgps xgpsspeed + + scons prefix=/usr \ + systemd=yes \ + libQgpsmm=no \ + PYTHONPATH=/usr/bin/python2 + scons build +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + export DESTDIR="${pkgdir}" + scons 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/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" + + 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 + install -D -m755 gpsd.hotplug "${pkgdir}/lib/udev/gpsd.hotplug" + + # GPSD needs RPATH + chrpath -r /usr/lib/ "${pkgdir}"/usr/lib/libgps{,d}.so.20.0.0 + chrpath -r /usr/lib/ "${pkgdir}"/usr/bin/{gpsdecode,gpsctl,gpspipe,gpxlogger,lcdgps} + chrpath -r /usr/lib/ "${pkgdir}"/usr/sbin/{gpsd,gpsdctl} + + 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 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} +md5sums=('c63d41a26868e9bdd48d9e311a9cc42c' + '0d5879df32833ca67a5491ce1ff98dcc') |