diff options
Diffstat (limited to 'gpsd/Pkgfile')
-rw-r--r-- | gpsd/Pkgfile | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/gpsd/Pkgfile b/gpsd/Pkgfile new file mode 100644 index 000000000..3e3e1589e --- /dev/null +++ b/gpsd/Pkgfile @@ -0,0 +1,50 @@ +# Description: Démon et bibliothèque de gestion de GPS +# URL: http://catb.org/gpsd/ +# Packager: piernov <piernov@piernov.org> +# Maintainer: NuTyX Core Team +# Depends on: scons, chrpath, libusb, bluez, desktop-file-utils, pygtk +# Run on: libusb,bluez,desktop-file-utils,pygtk + +name=gpsd +version=3.3 +release=1 +source=(http://download-mirror.savannah.gnu.org/releases/$name/$name-$version.tar.gz + gpsd.conf + gpsd.rc) + +build() { + cd $name-$version + # Correction de chemins pour Python2.7 + 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 + + python2 /usr/bin/scons prefix=/usr \ + systemd=yes \ + libQgpsmm=no \ + PYTHONPATH=/usr/bin/python2 + python2 /usr/bin/scons build + + # Correction du chemin des pages man + sed -i 's|.so gps.1|.so man1/gps.1|' cgps.1 lcdgps.1 xgps.1 xgpsspeed.1 + + export DESTDIR=$PKG + python2 /usr/bin/scons install + + install -D -m644 ../gpsd.conf $PKG/etc/sysconfig/gpsd + install -D -m644 gpsd.rules $PKG/lib/udev/rules.d/99-gpsd-usb.rules + + sed -i 's|/etc/default/gpsd|/etc/sysconfig/gpsd|' gpsd.hotplug + install -D -m755 gpsd.hotplug $PKG/lib/udev/gpsd.hotplug + + # GPSD needs RPATH + chrpath -r /usr/lib/ $PKG/usr/lib/libgps{,d}.so.20.0.0 + chrpath -r /usr/lib/ $PKG/usr/bin/{gpsdecode,gpsctl,gpspipe,gpxlogger,lcdgps} + chrpath -r /usr/lib/ $PKG/usr/sbin/{gpsd,gpsdctl} + chrpath -r /usr/lib/ $PKG/usr/lib/python2.7/site-packages/gps/{clienthelpers,packet}.so + + install -D -m644 packaging/X11/xgps.desktop $PKG/usr/share/applications/xgps.desktop + install -D -m644 packaging/X11/xgpsspeed.desktop $PKG/usr/share/applications/xgpsspeed.desktop + install -D -m644 packaging/X11/gpsd-logo.png $PKG/usr/share/gpsd/gpsd-logo.png + + install -D -m755 ../gpsd.rc $PKG/etc/rc.d/init.d/gpsd +} |