diff options
Diffstat (limited to 'media-radio')
-rw-r--r-- | media-radio/direwolf/Manifest | 1 | ||||
-rw-r--r-- | media-radio/direwolf/direwolf-1.6.ebuild | 67 | ||||
-rw-r--r-- | media-radio/direwolf/files/direwolf-1.6-use-standard-doc-dir.patch | 50 |
3 files changed, 118 insertions, 0 deletions
diff --git a/media-radio/direwolf/Manifest b/media-radio/direwolf/Manifest index 20566d786ae1..2fd9f36b0d21 100644 --- a/media-radio/direwolf/Manifest +++ b/media-radio/direwolf/Manifest @@ -1 +1,2 @@ DIST direwolf-1.5.tar.gz 17996557 BLAKE2B 6860075b764248f1e0ff06e2a533e2e31f65851ea45d74fb0aca11827940c6df0a8bab4b6b78aa98847ee54b2b344d3c5fc8da6947f9113d2fac6d3ea427d68b SHA512 c23e2ccebd47235f76a9583e14cf8e8df299b8f7456a6388534536e7b1114b3d9b9efee43da2c1708e01a0b9534db0ed93314368e20e9002bfcd5b3a2855d8a5 +DIST direwolf-1.6.tar.gz 22298168 BLAKE2B d0bffe78ecfdd7b41e4e2d458416e30e9151870d6890c3e4f65e44472699f0c1e1016fcbab5c30209978594ccaf567a8d53ae62194649e9df5cca4d4ea4689af SHA512 f29805dfea01ed5a81b133ac0a98455c2edfb6d18e0764db23c398475b11cc0e57c1c7c35c44cdaa5cf73129e8c18b836ad17dd3e9811e84277db0ef7b10bcd5 diff --git a/media-radio/direwolf/direwolf-1.6.ebuild b/media-radio/direwolf/direwolf-1.6.ebuild new file mode 100644 index 000000000000..7058a03085ab --- /dev/null +++ b/media-radio/direwolf/direwolf-1.6.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake systemd udev toolchain-funcs + +DESCRIPTION="Decoded Information from Radio Emissions for Windows Or Linux Fans" +HOMEPAGE="https://github.com/wb2osz/direwolf/blob/master/README.md" +SRC_URI="https://github.com/wb2osz/direwolf/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2 BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="alsa gps hamlib test udev" +RESTRICT="!test? ( test )" + +RDEPEND=" + alsa? ( media-libs/alsa-lib ) + gps? ( sci-geosciences/gpsd ) + hamlib? ( media-libs/hamlib:= ) + udev? ( virtual/libudev:= ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.6-use-standard-doc-dir.patch +) + +src_configure() { + local mycmakeargs=( + -DCMAKE_DISABLE_FIND_PACKAGE_ALSA=$(usex !alsa) + -DCMAKE_DISABLE_FIND_PACKAGE_GPSD=$(usex !gps) + -DCMAKE_DISABLE_FIND_PACKAGE_hamlib=$(usex !hamlib) + -DCMAKE_DISABLE_FIND_PACKAGE_udev=$(usex !udev) + -DUNITTEST=$(usex test) + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + # Fix udev rule installation path + udev_dorules "${ED}"/etc/udev/rules.d/99-direwolf-cmedia.rules + rm "${ED}"/etc/udev/rules.d/99-direwolf-cmedia.rules || die + + keepdir /var/log/direwolf + + # Pre-CMake, we installed a default config to /etc/direwolf. + # Should we do that now? + #insinto /etc/direwolf/ + #doins direwolf.conf + + systemd_dounit "${FILESDIR}"/direwolf.service + systemd_dounit "${FILESDIR}"/direwolf-kiss.service +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]] ; then + einfo "The default configuration files are at:" + einfo " - ${EROOT}/usr/share/doc/${PF}/conf/direwolf.conf" + einfo " - ${EROOT}/usr/share/doc/${PF}/conf/sdr.conf" + einfo "Copy these to the /etc/direwolf/ directory to modify them." + fi +} diff --git a/media-radio/direwolf/files/direwolf-1.6-use-standard-doc-dir.patch b/media-radio/direwolf/files/direwolf-1.6-use-standard-doc-dir.patch new file mode 100644 index 000000000000..1377ba0b4fab --- /dev/null +++ b/media-radio/direwolf/files/direwolf-1.6-use-standard-doc-dir.patch @@ -0,0 +1,50 @@ +From bfb62c085b0841818a5aaa0d2096c0d26f409553 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Fri, 26 Nov 2021 04:57:44 +0000 +Subject: [PATCH] Use standard doc directory (a la GNUInstallDirs) + +Signed-off-by: Sam James <sam@gentoo.org> +--- + CMakeLists.txt | 12 ++++-------- + 1 file changed, 4 insertions(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 139cb4d..e5da77c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -233,16 +233,12 @@ if (WIN32 OR CYGWIN) + set(INSTALL_MAN_DIR "man") + set(INSTALL_DATA_DIR "data") + else() +- set(INSTALL_BIN_DIR "bin") +- set(INSTALL_DOC_DIR "share/doc/${CMAKE_PROJECT_NAME}") ++ set(INSTALL_BIN_DIR "${CMAKE_INSTALL_BINDIR}") ++ set(INSTALL_DOC_DIR "${CMAKE_INSTALL_DOCDIR}") + set(INSTALL_CONF_DIR "${INSTALL_DOC_DIR}/conf") + set(INSTALL_SCRIPTS_DIR "${INSTALL_DOC_DIR}/scripts") +- if(FREEBSD) +- set(INSTALL_MAN_DIR "man/man1") +- else() +- set(INSTALL_MAN_DIR "share/man/man1") +- endif() +- set(INSTALL_DATA_DIR "share/${PROJECT_NAME}") ++ set(INSTALL_MAN_DIR "${CMAKE_INSTALL_MANDIR}/man1") ++ set(INSTALL_DATA_DIR "${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}") + endif(WIN32 OR CYGWIN) + + # requirements +-- +2.34.1 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e5da77c..ae7ea25 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -225,6 +225,7 @@ elseif (C_GCC) + endif() + + # set installation directories ++include(GNUInstallDirs) + if (WIN32 OR CYGWIN) + set(INSTALL_BIN_DIR ".") + set(INSTALL_DOC_DIR "doc") |