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