aboutsummaryrefslogtreecommitdiffstats
path: root/main/gpsd/APKBUILD
blob: 1e64db08322b40ff7fc3aef90d586a0305dccb4a (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
# Contributor: Nathan Angelacos <nangel@alpinelinux.org>
# Maintainer: Nathan Angelacos <nangel@alpinelinux.org>
pkgname=gpsd
pkgver=3.13
pkgrel=1
pkgdesc="A GPS daemon"
arch=all
url="http://catb.org/gpsd/"
license="BSD"
depends=""
makedepends="scons python-dev libcap-dev ncurses-dev"
install=
# subpackages="$pkgname-doc $pkgname-dev"
source="http://download-mirror.savannah.gnu.org/releases/gpsd/$pkgname-$pkgver.tar.gz
	timepps.h
	gpsd-use-local-timepps-header.patch
	ttydefaults.patch
	gpsd.initd
	gpsd.confd"

_builddir="$srcdir"/$pkgname-$pkgver


prepare() {
	local i

    # 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 timepps.h "$_builddir"/sys/


	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done

}

build() {
	cd "$_builddir"
        CPPFLAGS="-I."
	scons -j1 \
		prefix=/usr \
		|| return 1
}

package() {
    cd "$_builddir"

    mkdir -p "$pkgdir"/usr/lib
    cp -a "$_builddir"/libgps*.so* "$pkgdir"/usr/lib/

    mkdir -p "$pkgdir"/usr/sbin
    for a in gpsdecode gpsd gpsctl gpsdctl gpspipe; do
     install -m755 -D "$_builddir/"$a "$pkgdir"/usr/sbin/
    done 
    
    install -m755 -D "$srcdir"/gpsd.initd "$pkgdir"/etc/init.d/gpsd
    install -m644 -D "$srcdir"/gpsd.confd "$pkgdir"/etc/conf.d/gpsd
}

md5sums="558dce98edaaccc8d41043adb52fbe68  gpsd-3.13.tar.gz
28f6835098a216f4a620f9218d15b5b8  timepps.h
cda9687cebd7129d516133f737034af9  gpsd-use-local-timepps-header.patch
2dec132fa33b247b05831311b6576ce1  ttydefaults.patch
f71757d6ebaeb20d9d0d02df7b0a3387  gpsd.initd
453f3d1d75d2b048f0987cfb9cf250fd  gpsd.confd"
sha256sums="d30bbe31ef9f89d2c281197c64204bcff255883462318250f913444ae00874c1  gpsd-3.13.tar.gz
ab4f459ee9d1037d7fa962a66ea652b08935539a4f443dc216e82b5717d8bb22  timepps.h
235a341f611a0021f97c6e0afbd18be80e9413c386febc8b55c3e70683456be4  gpsd-use-local-timepps-header.patch
3cf69b07b9c4d6e2fccfbcdf2510729dd0882767e091b7ad05f901aef2e49ede  ttydefaults.patch
b51ce133b58dfdab5f81ea1681c6d314d9c4b365b9bf05bd92be404a54c7c2f3  gpsd.initd
218a7f044f902070922c45f3b543c9ff6af25be5305648899565c1fbdc0d5da9  gpsd.confd"
sha512sums="339e752ae6a06272082e8a4f97915001aeee4deecd956ace1be862f9e3734b7663407c4a6a41ac00e7de195771da55fb26b93ec152abd8251a0d7a13cb8ad51e  gpsd-3.13.tar.gz
eb11fc19243d1789016d88eb7645bfe67c46304547781489bf36eb1dd4c252d523681ff835a6488fa0ef62b6b9e2f781c672279f4439f5d5640a3f214a113048  timepps.h
bbe89344821fd86c87372acbb96f872571ce51087fa2cc3f388177ac2e64b3e8597c680c3a087728c5bf9e5052ec821b5500698aadab046e4ec3b36ebc7756de  gpsd-use-local-timepps-header.patch
f73eb65bb053ac3a84f9bc0aafafb472a98ae5ff5d706c61fd82e95f15eb04fd842f5feb10e66d3ba8b3fe6c5baedc98779ed20719cb5e414be303ad71b79ca3  ttydefaults.patch
114133e9ed5ad937a8ec916c2f9c842bb1e2161c9351b415a4decdb18785736cddce97a70603ab9402d28065612fffd0b8b4ecb90e8e1660661dc1d2bcb213bf  gpsd.initd
55d4a51f82d445d3ac93b2855132ef4380908ed045feba6298ed1d0b607cd9054b5325c024dc52b370983ebd5d9b377537aee7d7128c97aa22e3075f4134d404  gpsd.confd"