# $Id: PKGBUILD 12652 2010-03-10 16:07:46Z spupykin $ # Maintainer: dibblethewrecker dibblethewrecker.at.jiwe.dot.org # Contributor: Giacomo Rizzo pkgname=gpsd pkgver=2.92 pkgrel=2 pkgdesc="GPS daemon and library to support USB/serial GPS devices" arch=('i686' 'x86_64') url="http://gpsd.berlios.de" license=('GPL') depends=('lesstif' 'libxaw' 'python>=2.6' 'pth') # already in core: ('ncurses') makedepends=() optdepends=('php: generate a PHP status page for your GPS' 'php-gd: image support for the PHP status page') backup=('etc/conf.d/gpsd' 'etc/udev/rules.d/99-gpsd-usb.rules') options=('!libtool') install="gpsd.install" source=(http://download.berlios.de/$pkgname/$pkgname-$pkgver.tar.gz gpsd) md5sums=('50b60d9f6dd51e001f4dfbaeb825c988' '94b71be141da7b2825da57735e2dbe79') 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 ./configure --prefix=/usr make || return 1 make DESTDIR="$pkgdir" install || return 1 # 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/etc_default_gpsd sed -i 's|"/var/run/gpsd.sock"|"/var/run/gpsd/gpsd.sock"|' packaging/etc_default_gpsd install -D -m644 "packaging/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/etc/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|' install -D -m755 gpsd.hotplug "$pkgdir/lib/udev/gpsd.hotplug" install -D -m755 "$srcdir/gpsd" "$pkgdir/etc/rc.d/gpsd" || return 1 mkdir -p "$pkgdir/var/run/gpsd" }