summaryrefslogtreecommitdiff
path: root/extra/gpsd/PKGBUILD
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/gpsd/PKGBUILD
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/gpsd/PKGBUILD')
-rw-r--r--extra/gpsd/PKGBUILD77
1 files changed, 77 insertions, 0 deletions
diff --git a/extra/gpsd/PKGBUILD b/extra/gpsd/PKGBUILD
new file mode 100644
index 000000000..674351838
--- /dev/null
+++ b/extra/gpsd/PKGBUILD
@@ -0,0 +1,77 @@
+# $Id: PKGBUILD 116080 2011-03-22 18:18:49Z 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.95
+pkgrel=8
+pkgdesc="GPS daemon and library to support USB/serial GPS devices"
+arch=('i686' 'x86_64')
+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=('12535a9ed9fecf9ea2c5bdc9840da5ae'
+ '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"
+}