archrelease: copy trunk to community-any
[ArchLinux/community.git] / gpsd / repos / community-x86_64 / PKGBUILD
blob79062cc221308c1c84e8236285b3ec6369bff387
1 # Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
2 # Contributor: Tom Gundersen <teg@jklm.no>
3 # Contributor: Andrea Scarpino <andrea@archlinux.org>
4 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
5 # Contributor: Giacomo Rizzo <alt@free-os.it>
7 pkgname=gpsd
8 pkgver=3.25
9 pkgrel=2
10 pkgdesc="GPS daemon and library to support USB/serial GPS devices"
11 arch=('x86_64')
12 url="http://catb.org/gpsd/"
13 license=('BSD')
14 depends=('python' 'libusb' 'bluez-libs' 'pps-tools')
15 optdepends=('gtk3: GUI frontends'
16             'php: generate a PHP status page for your GPS'
17             'php-gd: image support for the PHP status page'
18             'python-cairo: GUI frontends'
19             'python-gobject: GUI frontends'
20             'python-pyserial: GUI frontends'
21             'qt5-base: for Qgpsmm')
22 makedepends=('scons' 'docbook-xsl' 'qt5-base' 'python-gobject' 'python-cairo' 'python-pyserial' 'gtk3')
23 backup=('etc/default/gpsd')
24 source=(https://download-mirror.savannah.gnu.org/releases/$pkgname/$pkgname-$pkgver.tar.gz{,.sig}
25         $pkgname.conf)
26 sha256sums=('b368b6a305e3f7a6382d23a0cbfc1d78923060b6b7f54cf7987a73c7b4a9afc2'
27             'SKIP'
28             'dcfa71c4c730b486269995468bdcfa8e96bf3c282db1dadea9384d32015d277f')
29 validpgpkeys=('EED4A0893DCC705DB309E202CCF29C7238522905'  # Gary E. Miller <gem@rellim.com>
30               'DB239ACA177A35AFBC13F819DD3DD9BBA8F257E8') # Eric S. Raymond
32 build() {
33   cd $pkgname-$pkgver
35   export LINKFLAGS="${LDFLAGS}"
36   _pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"`
37   scons prefix=/usr \
38         systemd=yes \
39         gpsd_group=uucp \
40         python_libdir=$_pythonpath \
41         sbindir=/usr/bin \
42         qt_versioned=5
43   scons build
46 package() {
47   cd $pkgname-$pkgver
49   export DESTDIR="${pkgdir}"
50   scons install
51   install -Dm755 gpsinit -t "${pkgdir}"/usr/bin
53   install -Dm644 "$srcdir/gpsd.conf" "${pkgdir}"/etc/default/gpsd
55   install -Dm644 gpsd-$pkgver/gpsd.rules "${pkgdir}"/usr/lib/udev/rules.d/25-gpsd-usb.rules
57   install -Dm755 gpsd.hotplug -t "${pkgdir}"/usr/lib/udev/
59   sed -e 's|/local||' -i packaging/X11/*.desktop
60   install -Dm644 packaging/X11/*.desktop -t "${pkgdir}"/usr/share/applications/
62   install -Dm644 gpsd-$pkgver/systemd/{gpsd.service,gpsd.socket,gpsdctl@.service} -t "${pkgdir}"/usr/lib/systemd/system/
64   install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE