blob: 1d8278c5e714b5c37ae51955867d7e57e2268783 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# Contributor: Nathan Angelacos <nangel@alpinelinux.org>
# Maintainer: Nathan Angelacos <nangel@alpinelinux.org>
# gpsd is commonly used with NTP servers to provide a stable clock,
# please do not move to community.
pkgname=gpsd
pkgver=3.24
pkgrel=0
pkgdesc="GPS daemon"
arch="all"
url="http://catb.org/gpsd/"
license="BSD-2-Clause"
makedepends="scons asciidoctor python3-dev libcap-dev ncurses-dev"
subpackages="
$pkgname-dev
$pkgname-doc
py3-$pkgname:_py:noarch
$pkgname-clients:_clients
$pkgname-openrc"
source="https://download-mirror.savannah.gnu.org/releases/gpsd/gpsd-$pkgver.tar.gz
timepps.h
gpsd.initd
gpsd.confd"
prepare() {
# We copy timepps.h to the local build directory instead of
# creating a pps-tools-dev package for ppstime.h
# (See https://github.com/ago/pps-tools)
mkdir -p "$builddir"/sys
cp "$srcdir"/timepps.h "$builddir"/sys/
# Hack to get scons to respect python
ln -s /usr/bin/python3 python
export PATH="$PATH:."
default_prepare
}
build() {
CPPFLAGS="$CPPFLAGS -I$builddir -DHAVE_SYS_TIMEPPS_H"
scons -j${JOBS:-1} \
prefix=/usr \
target_python=python3 \
python_shebang=/usr/bin/python3 \
dbus_export=no \
systemd=no
}
check() {
scons check
}
package() {
DESTDIR="$pkgdir" scons install
install -m755 -D "$srcdir"/gpsd.initd "$pkgdir"/etc/init.d/gpsd
install -m644 -D "$srcdir"/gpsd.confd "$pkgdir"/etc/conf.d/gpsd
}
_py() {
local _py=${subpkgname##-*}
local _pyver=${_py%py}
pkgdesc="$pkgname library and clients for python $_pyver"
mkdir -p "$subpkgdir"/usr/lib
# As of 3.18.1, gpsd wants to put the python stuff in /usr/local
mv "$pkgdir"/usr/local/lib/python* "$subpkgdir"/usr/lib/
rm -rf "$pkgdir"/usr/local
mkdir -p "$subpkgdir"/usr/bin
for n in gpscat gpsfake gpsprof; do
mv "$pkgdir"/usr/bin/$n "$subpkgdir"/usr/bin/
done
}
_clients() {
pkgdesc="$pkgname clients"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin
}
sha512sums="
250bae709e19ac10421d5a537e68dcdf4c025071c152cf3c84a2f6977615bd7e445a45f3b1e5f3b64123fad3c11e1ec256bae5afc1b869f499b187116f8b028b gpsd-3.24.tar.gz
699b3652e9033d4deb62b61e4aee8845ecbf2fa257cfc6f821783878245fe9303caf657ab979afd2bd5d034de03837349e3f8f4221eb746280faa8060f2c3b7f timepps.h
f88940570cbed761495c3a13949428e873c2c3d112e8ac25d36dd3230ecf2171f67b0f429c37e593bb360dc1e5622fe9066e597880264561c81376ff42d1a818 gpsd.initd
75dbfe39eb900cc9587dd70794ee77ae2230765bbede47760ca227145aa3f2290b6995335ffcfeae6cd86f56b01ca87367548f4fbcf810aff1bc012b7416deef gpsd.confd
"
|