dev-python/click-default-group: keyworded 1.2.2 for ia64, bug #700918
[gentoo.git] / media-plugins / vdr-weatherng / vdr-weatherng-0.0.8_pre3-r1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit vdr-plugin-2 flag-o-matic
7
8 MY_PV="$(ver_rs 3 -)"
9 MY_P="${PN}-${MY_PV}"
10
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"
14
15 LICENSE="GPL-2 stardock-images"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="dxr3"
19
20 DEPEND="media-libs/imlib2[jpeg,gif]
21         >=media-video/vdr-1.3.34"
22 RDEPEND="${DEPEND}"
23
24 S="${WORKDIR}/weatherng-${MY_PV}"
25
26 VDR_CONFD_FILE="${FILESDIR}/confd-0.0.8"
27 VDR_RCADDON_FILE="${FILESDIR}/rc-addon-0.0.8.sh"
28
29 PATCHES=("${FILESDIR}/${P}-i18n-fix.diff")
30
31 src_prepare() {
32         vdr-plugin-2_src_prepare
33
34         # wrt bug 595390
35         append-cxxflags $(test-flags-CXX -std=gnu++03) -std=gnu++03
36
37         eapply "${FILESDIR}/${P}-gentoo.diff"
38         eapply "${FILESDIR}/${P}-timeout.diff"
39         eapply "${FILESDIR}/${P}-gcc43.patch"
40
41         use dxr3 && eapply "${FILESDIR}/${P}-dxr3.diff"
42
43         # /bin/sh is not necessaryly bash, so explicitly use /bin/bash
44         sed -e 's#/bin/sh#/bin/bash#' -i examples/weatherng.sh
45
46         sed -i weatherng.c -e "s:RegisterI18n://RegisterI18n:"
47 }
48
49 src_install() {
50         vdr-plugin-2_src_install
51
52         insinto /usr/share/vdr/weatherng/images
53         doins "${S}"/images/*.png
54
55         diropts -m0755 -ovdr -gvdr
56         dodir /var/vdr/${VDRPLUGIN}
57
58         insinto  /var/vdr/${VDRPLUGIN}
59         insopts -m755 -ovdr -gvdr
60         doins "${S}"/examples/weatherng.sh
61 }
62
63 pkg_postinst() {
64         vdr-plugin-2_pkg_postinst
65
66         echo
67         elog "To display the weather for your location"
68         elog "you have to find out its ID on weather.com"
69         elog
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"
72         elog
73         elog "It contains a code for your city"
74         elog "For Herne this is GMXX0056"
75         elog
76         elog "Now you have to enter this code in /etc/conf.d/vdr.weatherng WEATHERNG_STATIONID(x)"
77         echo
78 }