1 |
|
# Copyright 1999-2019 Gentoo Authors
|
|
1 |
# Copyright 1999-2022 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=6
|
|
4 |
EAPI=8
|
5 |
5 |
|
6 |
6 |
MULTILIB_COMPAT=( abi_x86_{32,64} )
|
7 |
7 |
|
8 |
|
inherit versionator unpacker udev multilib-minimal
|
|
8 |
inherit unpacker udev multilib-minimal systemd
|
9 |
9 |
|
10 |
|
MY_PV_1=$(get_major_version)
|
11 |
|
MY_PV_12=$(get_version_component_range 1-2)
|
|
10 |
MY_PV_1=$(ver_cut 1)
|
|
11 |
MY_PV_12=$(ver_cut 1-2)
|
12 |
12 |
|
13 |
13 |
DESCRIPTION="SDRplay API/HW driver for all RSPs"
|
14 |
14 |
HOMEPAGE="https://www.sdrplay.com"
|
... | ... | |
17 |
17 |
LICENSE="SDRplay"
|
18 |
18 |
SLOT="0"
|
19 |
19 |
KEYWORDS="~amd64 ~x86"
|
20 |
|
IUSE=""
|
|
20 |
IUSE="systemd"
|
21 |
21 |
|
22 |
22 |
DEPEND="virtual/libusb:1
|
23 |
|
virtual/udev"
|
|
23 |
virtual/udev
|
|
24 |
systemd? ( sys-apps/systemd )"
|
|
25 |
|
24 |
26 |
RDEPEND="${DEPEND}"
|
25 |
27 |
|
26 |
28 |
S="${WORKDIR}"
|
27 |
29 |
|
28 |
|
QA_PREBUILT="usr/lib64/libmirsdrapi-rsp.so.${MY_PV_12}
|
29 |
|
usr/lib32/libmirsdrapi-rsp.so.${MY_PV_12}"
|
|
30 |
QA_PREBUILT="usr/lib64/libsdrplay_api.so.${MY_PV_12}
|
|
31 |
usr/lib/libsdrplay_api.so.${MY_PV_12}
|
|
32 |
usr/bin/sdrplay_apiService"
|
30 |
33 |
|
31 |
34 |
multilib_src_install_all() {
|
32 |
|
insinto /usr/include/
|
33 |
|
doins mirsdrapi-rsp.h
|
|
35 |
doheader -r inc/*.h
|
34 |
36 |
|
35 |
37 |
udev_dorules 66-mirics.rules
|
36 |
38 |
udev_reload
|
|
39 |
|
|
40 |
if use systemd; then
|
|
41 |
systemd_newunit scripts/sdrplay.service.usr sdrplay.service
|
|
42 |
fi
|
|
43 |
|
|
44 |
newinitd "${FILESDIR}/${PN}.initd" ${PN}
|
37 |
45 |
}
|
38 |
46 |
|
39 |
47 |
multilib_src_install() {
|
40 |
48 |
if [ "${MULTILIB_ABI_FLAG}" = "abi_x86_32" ]; then
|
41 |
|
dolib "${S}/i686/libmirsdrapi-rsp.so.${MY_PV_12}"
|
|
49 |
dolib.so "${S}/i686/libsdrplay_api.so.${MY_PV_12}"
|
42 |
50 |
fi
|
43 |
51 |
|
44 |
52 |
if [ "${MULTILIB_ABI_FLAG}" = "abi_x86_64" ]; then
|
45 |
|
dolib "${S}/x86_64/libmirsdrapi-rsp.so.${MY_PV_12}"
|
|
53 |
dolib.so "${S}/x86_64/libsdrplay_api.so.${MY_PV_12}"
|
|
54 |
fi
|
|
55 |
|
|
56 |
if multilib_is_native_abi; then
|
|
57 |
if [ "${MULTILIB_ABI_FLAG}" = "abi_x86_32" ]; then
|
|
58 |
dobin "${S}/i686/sdrplay_apiService"
|
|
59 |
elif [ "${MULTILIB_ABI_FLAG}" = "abi_x86_64" ]; then
|
|
60 |
dobin "${S}/x86_64/sdrplay_apiService"
|
|
61 |
fi
|
46 |
62 |
fi
|
47 |
63 |
|
48 |
|
dosym libmirsdrapi-rsp.so.${MY_PV_12} "${EROOT}usr/$(get_libdir)/libmirsdrapi-rsp.so.${MY_PV_1}"
|
49 |
|
dosym libmirsdrapi-rsp.so.${MY_PV_1} "${EROOT}usr/$(get_libdir)/libmirsdrapi-rsp.so"
|
|
64 |
dosym libsdrplay_api.so.${MY_PV_12} "/usr/$(get_libdir)/libsdrplay_api.so.${MY_PV_1}"
|
|
65 |
dosym libsdrplay_api.so.${MY_PV_1} "/usr/$(get_libdir)/libsdrplay_api.so"
|
|
66 |
}
|
|
67 |
|
|
68 |
pkg_postinst() {
|
|
69 |
udev_reload
|
|
70 |
}
|
|
71 |
|
|
72 |
pkg_postrm() {
|
|
73 |
udev_reload
|
50 |
74 |
}
|