blob: b61294afb21785c70cf71a63d5b95d382967152f (
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit tmpfiles toolchain-funcs
DESCRIPTION="Simple Mode S decoder for RTLSDR devices"
HOMEPAGE="https://github.com/flightaware/dump1090"
if [[ ${PV} == *9999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/flightaware/${PN}.git"
else
KEYWORDS="~amd64 ~x86"
SRC_URI="https://github.com/flightaware/dump1090/archive/v${PV}.tar.gz -> ${P}.tar.gz"
fi
LICENSE="BSD GPL-2+"
SLOT="0"
IUSE="bladerf hackrf minimal +rtlsdr"
DEPEND="
sys-libs/ncurses:=[tinfo]
bladerf? (
net-wireless/bladerf:=
virtual/libusb:1
)
hackrf? (
net-libs/libhackrf:=
virtual/libusb:1
)
rtlsdr? (
net-wireless/rtl-sdr:=
virtual/libusb:1
)
"
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${PN}-6.1-libdir.patch
"${FILESDIR}"/${PN}-9.0-gcc14.patch
)
src_prepare() {
default
sed \
-e '/CFLAGS/s# -O3 -g -Wall -Wmissing-declarations -Werror -W # #' \
-e "/LIBS_CURSES/s#-lncurses#$($(tc-getPKG_CONFIG) --libs ncurses)#" \
-i Makefile || die
}
src_compile() {
myemakeargs=(
BLADERF="$(usex bladerf)"
CC="$(tc-getCC)"
CPUFEATURES="yes"
HACKRF="$(usex hackrf)"
LIMESDR="no"
RTLSDR="$(usex rtlsdr)"
)
emake "${myemakeargs[@]}"
}
src_install() {
dobin dump1090 view1090
# DSP config files for bladeRF
if use bladerf; then
insinto usr/share/dump1090/bladerf
doins bladerf/*
fi
newtmpfiles "${FILESDIR}"/tmpfilesd-dump1090-5.0.conf dump1090.conf
newconfd "${FILESDIR}"/dump1090-5.0.confd dump1090
newinitd "${FILESDIR}"/dump1090-5.0.initd dump1090
einstalldocs
if use !minimal; then
# Install tools
insinto /usr/share/dump1090
doins -r tools
# Install lighthttps example files
insinto /usr/share/dump1090/lighttpd
doins debian/lighttpd/{88-dump1090-fa-statcache.conf,89-skyaware.conf}
# Some tooling expects the -fa variant directory to contain the files
dosym ../../usr/share/dump1090 /usr/share/dump1090-fa
# Install html docs
docinto html
doins -r public_html/*
# See README.md for how to use custom wisdom files
exeinto /usr/share/dump1090/wisdom
doexe debian/generate-wisdom
insinto /usr/share/dump1090/wisdom
doins wisdom.*
doins wisdom/wisdom.*
# For /etc/dump1090-fa/wisdom.local
keepdir /etc/dump1090-fa/
# Tooling to generate custom wisdom:
exeinto /usr/libexec/dump1090
doexe starch-benchmark
fi
}
pkg_postinst() {
tmpfiles_process dump1090.conf
}
|