]>
Commit | Line | Data |
---|---|---|
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 | |
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 | |
11 | Name: libmateweather | |
12 | Version: 1.12.0 | |
13 | Release: 2 | |
14 | License: GPL v2+ | |
15 | Group: X11/Libraries | |
16 | Source0: http://pub.mate-desktop.org/releases/1.12/%{name}-%{version}.tar.xz | |
17 | # Source0-md5: 25064c09873f60e99fa971162c470e37 | |
18 | URL: http://wiki.mate-desktop.org/libmateweather | |
19 | BuildRequires: autoconf >= 2.59 | |
20 | BuildRequires: automake >= 1:1.9 | |
21 | BuildRequires: gettext-tools | |
22 | BuildRequires: glib2-devel >= 1:2.36.0 | |
23 | %{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.24.0} | |
24 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0.0} | |
25 | BuildRequires: gtk-doc >= 1.11 | |
26 | BuildRequires: intltool >= 0.50.1 | |
27 | BuildRequires: libsoup-devel >= 2.34.0 | |
28 | BuildRequires: libtool >= 2:2.2.6 | |
29 | BuildRequires: libxml2-devel >= 1:2.6.0 | |
30 | BuildRequires: mate-common | |
31 | BuildRequires: pkgconfig >= 1:0.19 | |
32 | %if %{with python} | |
33 | BuildRequires: python-devel >= 2 | |
34 | BuildRequires: python-pygobject-devel >= 2.0 | |
35 | BuildRequires: python-pygtk-devel >= 2:2.0 | |
36 | %endif | |
37 | BuildRequires: rpm-pythonprov | |
38 | BuildRequires: rpmbuild(macros) >= 1.219 | |
39 | BuildRequires: tar >= 1:1.22 | |
40 | BuildRequires: xz | |
41 | Requires(post,postun): /sbin/ldconfig | |
42 | Requires: glib2 >= 1:2.36.0 | |
43 | Requires: gsettings-desktop-schemas | |
44 | %{!?with_gtk3:Requires: gtk+2 >= 2:2.24.0} | |
45 | %{?with_gtk3:Requires: gtk+3 >= 3.0.0} | |
46 | Requires: gtk-update-icon-cache | |
47 | Requires: libxml2 >= 1:2.6.0 | |
48 | Requires: mate-icon-theme | |
49 | Conflicts: mate-applet-gweather < 1.6.1 | |
50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
51 | ||
52 | %description | |
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 | |
58 | pogodowych w środowisku MATE Desktop. Jest odgałęzieniem libgweather. | |
59 | ||
60 | %package devel | |
61 | Summary: Development files for libmateweather | |
62 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libmateweather | |
63 | Group: X11/Development/Libraries | |
64 | Requires: %{name} = %{version}-%{release} | |
65 | Requires: glib2-devel >= 1:2.36.0 | |
66 | %{!?with_gtk3:Requires: gtk+2-devel >= 2:2.24.0} | |
67 | %{?with_gtk3:Requires: gtk+3-devel >= 3.0.0} | |
68 | Requires: libsoup-devel >= 2.4.0 | |
69 | Requires: libxml2-devel >= 1:2.6.0 | |
70 | ||
71 | %description devel | |
72 | Development files for libmateweather. | |
73 | ||
74 | %description devel -l pl.UTF-8 | |
75 | Pliki programistyczne biblioteki libmateweather. | |
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 | |
82 | %if "%{_rpmversion}" >= "5" | |
83 | BuildArch: noarch | |
84 | %endif | |
85 | ||
86 | %description apidocs | |
87 | libmateweather API documentation. | |
88 | ||
89 | %description apidocs -l pl.UTF-8 | |
90 | Dokumentacja API biblioteki libmateweather. | |
91 | ||
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 | ||
106 | %prep | |
107 | %setup -q | |
108 | ||
109 | %build | |
110 | %{__libtoolize} | |
111 | %{__aclocal} -I m4 | |
112 | %{__autoconf} | |
113 | %{__autoheader} | |
114 | %{__automake} | |
115 | %configure \ | |
116 | %{?with_gtk3:--with-gtk=3.0} \ | |
117 | --with-html-dir=%{_gtkdocdir} \ | |
118 | --with-zoneinfo-dir=%{_datadir}/zoneinfo \ | |
119 | %{?with_python:--enable-python} \ | |
120 | --disable-silent-rules \ | |
121 | --disable-static | |
122 | ||
123 | %{__make} | |
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 | ||
133 | %if %{with python} | |
134 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
135 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
136 | %py_postclean | |
137 | %endif | |
138 | ||
139 | # outdated copy of es | |
140 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/es_ES | |
141 | ||
142 | %find_lang %{name} | |
143 | ||
144 | %clean | |
145 | rm -rf $RPM_BUILD_ROOT | |
146 | ||
147 | %post | |
148 | /sbin/ldconfig | |
149 | %update_icon_cache mate | |
150 | %glib_compile_schemas | |
151 | ||
152 | %postun | |
153 | /sbin/ldconfig | |
154 | %update_icon_cache mate | |
155 | %glib_compile_schemas | |
156 | ||
157 | %files -f %{name}.lang | |
158 | %defattr(644,root,root,755) | |
159 | %doc AUTHORS ChangeLog NEWS README | |
160 | %attr(755,root,root) %{_libdir}/libmateweather.so.*.*.* | |
161 | %attr(755,root,root) %ghost %{_libdir}/libmateweather.so.1 | |
162 | %{_datadir}/libmateweather | |
163 | %{_datadir}/glib-2.0/schemas/org.mate.weather.gschema.xml | |
164 | %{_iconsdir}/mate/*x*/status/weather-*.png | |
165 | %{_iconsdir}/mate/scalable/status/weather-*.svg | |
166 | ||
167 | %files devel | |
168 | %defattr(644,root,root,755) | |
169 | %attr(755,root,root) %{_libdir}/libmateweather.so | |
170 | %{_includedir}/libmateweather | |
171 | %{_pkgconfigdir}/mateweather.pc | |
172 | ||
173 | %files apidocs | |
174 | %defattr(644,root,root,755) | |
175 | %{_gtkdocdir}/libmateweather | |
176 | ||
177 | %if %{with python} | |
178 | %files -n python-mateweather | |
179 | %defattr(644,root,root,755) | |
180 | %dir %{py_sitedir}/mateweather | |
181 | %{py_sitedir}/mateweather/*.py[co] | |
182 | %dir %{py_sitedir}/mateweather/I_KNOW_THIS_IS_UNSTABLE | |
183 | %{py_sitedir}/mateweather/I_KNOW_THIS_IS_UNSTABLE/*.py[co] | |
184 | %attr(755,root,root) %{py_sitedir}/mateweather/I_KNOW_THIS_IS_UNSTABLE/mateweather.so | |
185 | %endif |