1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit vdr-plugin-2 flag-o-matic
11 DESCRIPTION="VDR plugin: show weather for specified place"
12 HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
13 SRC_URI="http://vdr.websitec.de/download/${PN}/${MY_P}.tgz"
15 LICENSE="GPL-2 stardock-images"
17 KEYWORDS="~amd64 ~x86"
20 DEPEND="media-libs/imlib2[jpeg,gif]
21 >=media-video/vdr-1.3.34"
24 S="${WORKDIR}/weatherng-${MY_PV}"
26 VDR_CONFD_FILE="${FILESDIR}/confd-0.0.8"
27 VDR_RCADDON_FILE="${FILESDIR}/rc-addon-0.0.8.sh"
29 PATCHES=("${FILESDIR}/${P}-i18n-fix.diff")
32 vdr-plugin-2_src_prepare
35 append-cxxflags $(test-flags-CXX -std=gnu++03) -std=gnu++03
37 eapply "${FILESDIR}/${P}-gentoo.diff"
38 eapply "${FILESDIR}/${P}-timeout.diff"
39 eapply "${FILESDIR}/${P}-gcc43.patch"
41 use dxr3 && eapply "${FILESDIR}/${P}-dxr3.diff"
43 # /bin/sh is not necessaryly bash, so explicitly use /bin/bash
44 sed -e 's#/bin/sh#/bin/bash#' -i examples/weatherng.sh
46 sed -i weatherng.c -e "s:RegisterI18n://RegisterI18n:"
50 vdr-plugin-2_src_install
52 insinto /usr/share/vdr/weatherng/images
53 doins "${S}"/images/*.png
55 diropts -m0755 -ovdr -gvdr
56 dodir /var/vdr/${VDRPLUGIN}
58 insinto /var/vdr/${VDRPLUGIN}
59 insopts -m755 -ovdr -gvdr
60 doins "${S}"/examples/weatherng.sh
64 vdr-plugin-2_pkg_postinst
67 elog "To display the weather for your location"
68 elog "you have to find out its ID on weather.com"
70 elog "Go to http://uk.weather.com/search/drilldown/ and search for your city (i.e. Herne)"
71 elog "in the list of results click on the right one and then look at its URL"
73 elog "It contains a code for your city"
74 elog "For Herne this is GMXX0056"
76 elog "Now you have to enter this code in /etc/conf.d/vdr.weatherng WEATHERNG_STATIONID(x)"