]>
Commit | Line | Data |
---|---|---|
cbd7e3cc JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with gtk3 # use GTK+ 3.x instead of 2.x | |
4 | %bcond_without python # Python bindings (GTK+ 2.x only) | |
5 | # | |
6 | %if %{with gtk3} | |
7 | %undefine with_python | |
8 | %endif | |
ab9372dc JB |
9 | Summary: Library to allow MATE Desktop to display weather information |
10 | Summary(pl.UTF-8): Biblioteka umożliwiająca wyświetlanie informacji pogodowych w środowisku MATE Desktop | |
95104df7 | 11 | Name: libmateweather |
66908064 | 12 | Version: 1.16.1 |
a218511a | 13 | Release: 1 |
95104df7 ER |
14 | License: GPL v2+ |
15 | Group: X11/Libraries | |
5a09882a | 16 | Source0: http://pub.mate-desktop.org/releases/1.16/%{name}-%{version}.tar.xz |
66908064 | 17 | # Source0-md5: 6ec50c34dbfb49695421a291ca932d18 |
b71d5fa8 | 18 | URL: http://wiki.mate-desktop.org/libmateweather |
89c90155 JP |
19 | BuildRequires: autoconf >= 2.59 |
20 | BuildRequires: automake >= 1:1.9 | |
2d9656ef | 21 | BuildRequires: gettext-tools |
7654c5ca JB |
22 | BuildRequires: glib2-devel >= 1:2.36.0 |
23 | %{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.24.0} | |
cbd7e3cc | 24 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0.0} |
1551d369 | 25 | BuildRequires: gtk-doc >= 1.11 |
e835abcc | 26 | BuildRequires: intltool >= 0.50.1 |
89c90155 | 27 | BuildRequires: libsoup-devel >= 2.34.0 |
1551d369 | 28 | BuildRequires: libtool >= 2:2.2.6 |
ab9372dc | 29 | BuildRequires: libxml2-devel >= 1:2.6.0 |
95104df7 | 30 | BuildRequires: mate-common |
ab9372dc | 31 | BuildRequires: pkgconfig >= 1:0.19 |
cbd7e3cc | 32 | %if %{with python} |
ab9372dc JB |
33 | BuildRequires: python-devel >= 2 |
34 | BuildRequires: python-pygobject-devel >= 2.0 | |
35 | BuildRequires: python-pygtk-devel >= 2:2.0 | |
cbd7e3cc | 36 | %endif |
d33f0d8b | 37 | BuildRequires: rpm-pythonprov |
ab9372dc | 38 | BuildRequires: rpmbuild(macros) >= 1.219 |
95104df7 | 39 | BuildRequires: tar >= 1:1.22 |
66908064 | 40 | BuildRequires: tzdata-zoneinfo >= 2016g |
95104df7 | 41 | BuildRequires: xz |
ab9372dc | 42 | Requires(post,postun): /sbin/ldconfig |
00e63e63 | 43 | Requires(post,postun): gtk-update-icon-cache |
7654c5ca | 44 | Requires: glib2 >= 1:2.36.0 |
95104df7 | 45 | Requires: gsettings-desktop-schemas |
7654c5ca | 46 | %{!?with_gtk3:Requires: gtk+2 >= 2:2.24.0} |
cbd7e3cc | 47 | %{?with_gtk3:Requires: gtk+3 >= 3.0.0} |
00e63e63 | 48 | Requires: libsoup >= 2.34.0 |
ab9372dc | 49 | Requires: libxml2 >= 1:2.6.0 |
1ccc1d96 | 50 | Requires: mate-icon-theme |
66908064 | 51 | Requires: tzdata-zoneinfo >= 2016g |
c7df76e7 | 52 | Conflicts: mate-applet-gweather < 1.6.1 |
95104df7 ER |
53 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
54 | ||
55 | %description | |
ab9372dc JB |
56 | libmateweather is a library to allow MATE Desktop to display weather |
57 | information. It's a fork of libgweather. | |
58 | ||
59 | %description -l pl.UTF-8 | |
60 | libmateweather to biblioteka umożliwiająca wyświetlanie informacji | |
d2e04295 | 61 | pogodowych w środowisku MATE Desktop. Jest odgałęzieniem libgweather. |
95104df7 ER |
62 | |
63 | %package devel | |
64 | Summary: Development files for libmateweather | |
ab9372dc JB |
65 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libmateweather |
66 | Group: X11/Development/Libraries | |
95104df7 | 67 | Requires: %{name} = %{version}-%{release} |
7654c5ca JB |
68 | Requires: glib2-devel >= 1:2.36.0 |
69 | %{!?with_gtk3:Requires: gtk+2-devel >= 2:2.24.0} | |
cbd7e3cc | 70 | %{?with_gtk3:Requires: gtk+3-devel >= 3.0.0} |
00e63e63 | 71 | Requires: libsoup-devel >= 2.34.0 |
ab9372dc | 72 | Requires: libxml2-devel >= 1:2.6.0 |
95104df7 ER |
73 | |
74 | %description devel | |
ab9372dc JB |
75 | Development files for libmateweather. |
76 | ||
77 | %description devel -l pl.UTF-8 | |
78 | Pliki programistyczne biblioteki libmateweather. | |
95104df7 ER |
79 | |
80 | %package apidocs | |
81 | Summary: libmateweather API documentation | |
82 | Summary(pl.UTF-8): Dokumentacja API biblioteki libmateweather | |
83 | Group: Documentation | |
84 | Requires: gtk-doc-common | |
d2e04295 ER |
85 | %if "%{_rpmversion}" >= "5" |
86 | BuildArch: noarch | |
87 | %endif | |
95104df7 ER |
88 | |
89 | %description apidocs | |
90 | libmateweather API documentation. | |
91 | ||
92 | %description apidocs -l pl.UTF-8 | |
93 | Dokumentacja API biblioteki libmateweather. | |
94 | ||
ab9372dc JB |
95 | %package -n python-mateweather |
96 | Summary: Python binding for libmateweather library | |
97 | Summary(pl.UTF-8): Wiązanie Pythona do biblioteki libmateweather | |
98 | Group: Libraries/Python | |
99 | Requires: %{name} = %{version}-%{release} | |
100 | Requires: python-pygobject >= 2.0 | |
101 | Requires: python-pygtk-gtk >= 2:2.0 | |
102 | ||
103 | %description -n python-mateweather | |
104 | Python binding for libmateweather library. | |
105 | ||
106 | %description -n python-mateweather -l pl.UTF-8 | |
107 | Wiązanie Pythona do biblioteki libmateweather. | |
108 | ||
95104df7 ER |
109 | %prep |
110 | %setup -q | |
95104df7 ER |
111 | |
112 | %build | |
89c90155 JP |
113 | %{__libtoolize} |
114 | %{__aclocal} -I m4 | |
115 | %{__autoconf} | |
116 | %{__autoheader} | |
117 | %{__automake} | |
95104df7 | 118 | %configure \ |
cbd7e3cc | 119 | %{?with_gtk3:--with-gtk=3.0} \ |
95104df7 | 120 | --with-html-dir=%{_gtkdocdir} \ |
ab9372dc | 121 | --with-zoneinfo-dir=%{_datadir}/zoneinfo \ |
cbd7e3cc | 122 | %{?with_python:--enable-python} \ |
0475dace | 123 | --disable-silent-rules \ |
95104df7 ER |
124 | --disable-static |
125 | ||
0475dace | 126 | %{__make} |
95104df7 ER |
127 | |
128 | %install | |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | %{__make} install \ | |
131 | DESTDIR=$RPM_BUILD_ROOT | |
132 | ||
133 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libmateweather.la | |
134 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/mateweather/*/mateweather.la | |
135 | ||
cbd7e3cc | 136 | %if %{with python} |
95104df7 ER |
137 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} |
138 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
139 | %py_postclean | |
cbd7e3cc | 140 | %endif |
95104df7 | 141 | |
ab9372dc | 142 | # outdated copy of es |
95104df7 | 143 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/es_ES |
57240ca7 | 144 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{frp,jv} |
ab9372dc | 145 | |
95104df7 ER |
146 | %find_lang %{name} |
147 | ||
148 | %clean | |
149 | rm -rf $RPM_BUILD_ROOT | |
150 | ||
151 | %post | |
152 | /sbin/ldconfig | |
1ccc1d96 | 153 | %update_icon_cache mate |
95104df7 ER |
154 | %glib_compile_schemas |
155 | ||
156 | %postun | |
157 | /sbin/ldconfig | |
1ccc1d96 | 158 | %update_icon_cache mate |
95104df7 ER |
159 | %glib_compile_schemas |
160 | ||
161 | %files -f %{name}.lang | |
162 | %defattr(644,root,root,755) | |
89c90155 | 163 | %doc AUTHORS ChangeLog NEWS README |
ab9372dc JB |
164 | %attr(755,root,root) %{_libdir}/libmateweather.so.*.*.* |
165 | %attr(755,root,root) %ghost %{_libdir}/libmateweather.so.1 | |
95104df7 | 166 | %{_datadir}/libmateweather |
95104df7 | 167 | %{_datadir}/glib-2.0/schemas/org.mate.weather.gschema.xml |
ab9372dc JB |
168 | %{_iconsdir}/mate/*x*/status/weather-*.png |
169 | %{_iconsdir}/mate/scalable/status/weather-*.svg | |
95104df7 ER |
170 | |
171 | %files devel | |
172 | %defattr(644,root,root,755) | |
ab9372dc | 173 | %attr(755,root,root) %{_libdir}/libmateweather.so |
95104df7 ER |
174 | %{_includedir}/libmateweather |
175 | %{_pkgconfigdir}/mateweather.pc | |
176 | ||
177 | %files apidocs | |
178 | %defattr(644,root,root,755) | |
179 | %{_gtkdocdir}/libmateweather | |
ab9372dc | 180 | |
cbd7e3cc | 181 | %if %{with python} |
ab9372dc JB |
182 | %files -n python-mateweather |
183 | %defattr(644,root,root,755) | |
184 | %dir %{py_sitedir}/mateweather | |
185 | %{py_sitedir}/mateweather/*.py[co] | |
186 | %dir %{py_sitedir}/mateweather/I_KNOW_THIS_IS_UNSTABLE | |
187 | %{py_sitedir}/mateweather/I_KNOW_THIS_IS_UNSTABLE/*.py[co] | |
188 | %attr(755,root,root) %{py_sitedir}/mateweather/I_KNOW_THIS_IS_UNSTABLE/mateweather.so | |
cbd7e3cc | 189 | %endif |