void-packages/srcpkgs/gpsd/template

112 lines
2.9 KiB
Bash

# Template file for 'gpsd'
pkgname=gpsd
version=3.24
revision=3
build_style=scons
make_build_args="dbus_export=0 gpsd_user=gpsd gpsd_group=gpsd
sbindir=/usr/bin CC=${CC} qt_versioned=5"
make_install_args="$make_build_args"
hostmakedepends="pkg-config bc python3-pyserial python3-setuptools libxslt
xmlto asciidoc"
makedepends="eudev-libudev-devel ntp libusb-devel ncurses-devel gtk+3-devel
pps-tools-devel libcap-devel libbluetooth-devel qt5-devel"
short_desc="GPS/AIS receiver monitoring daemon"
maintainer="uriahheep <uriahheep@gmail.com>"
license="BSD-3-Clause"
homepage="https://gpsd.gitlab.io/gpsd/"
changelog="https://gpsd.gitlab.io/gpsd/NEWS"
distfiles="https://download-mirror.savannah.gnu.org/releases/gpsd/gpsd-${version}.tar.xz"
checksum=dab45874c6da0ac604e3553b79fc228c25d6e71a32310a3467fb3bd9974e3755
python_version=3 # Must be same version as scons
system_accounts="gpsd"
subpackages="gpsd-devel gpsd-qt gpsd-qt-devel"
if [ -z "$CROSS_BUILD" ]; then
subpackages+=" gpsd-python gpsd-xgps"
makedepends+=" python3-devel python3-gobject-devel"
else
# xxx scons uses its environment to build python stuff; so arch
# and python version must match. This should be fixed.
make_build_args+=" python=0"
fi
pre_build() {
unset LD
}
pre_install() {
unset LD
makejobs="-j1"
}
post_install() {
vsv gpsd
vlicense COPYING
vlicense AUTHORS
vbin gpsinit
if [ -z "$CROSS_BUILD" ]; then
mv ${DESTDIR}/usr/local/lib/python* "${DESTDIR}/usr/lib"
fi
}
gpsd-python_package() {
short_desc+=" - Python tools/bindings"
depends="python3 python3-pyserial gnuplot ${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove "usr/lib/python*"
vmove usr/bin/gegps
vmove usr/bin/gpscat
vmove usr/bin/gpsfake
vmove usr/bin/gpsprof
vmove usr/bin/ubxtool
vmove usr/bin/zerk
vmove usr/share/man/man1/gegps.1
vmove usr/share/man/man1/gpscat.1
vmove usr/share/man/man1/gpsfake.1
vmove usr/share/man/man1/gpsprof.1
vmove usr/share/man/man1/ubxtool.1
vmove usr/share/man/man1/zerk.1
}
}
gpsd-xgps_package() {
short_desc+=" - PyGI based clients"
depends="${sourcepkg}-python>=${version}_${revision} gtk+3 python3-gobject"
pkg_install() {
vmove usr/bin/xgps
vmove usr/bin/xgpsspeed
vmove "usr/share/man/man1/xgps*"
}
}
gpsd-qt_package() {
short_desc+=" - Qt5 bindings"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove "usr/lib/libQgpsmm.so.*"
}
}
gpsd-qt-devel_package() {
short_desc+=" - Qt5 development files"
depends="qt5-devel ${sourcepkg}-devel>=${version}_${revision}"
pkg_install() {
vmove usr/lib/libQgpsmm.so
vmove usr/lib/pkgconfig/Qgpsmm.pc
vmove usr/lib/libQgpsmm.prl
vmove usr/share/man/man3/libQgpsmm.3
}
}
gpsd-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/pkgconfig/libgps*.pc"
vmove usr/lib/libgps.so
vmove usr/lib/libgpsdpacket.so
vmove "usr/share/man/man3/libgps*"
}
}