]>
Commit | Line | Data |
---|---|---|
f27661b8 JB |
1 | # |
2 | # Conditional build: | |
c7a4424e | 3 | %bcond_with alpm # Arch Linux PacMan support |
8d4b491a | 4 | %bcond_with rpm5 # rpm5 fork instead of rpm.org |
c7a4424e JB |
5 | %bcond_with stemmer # search stemmer based on libstemmer |
6 | %bcond_without static_libs # static libraries | |
dc0e2239 | 7 | |
08ba24e9 JB |
8 | Summary: GLib Objects and helper methods for reading and writing AppStream metadata |
9 | Summary(pl.UTF-8): Obiekty GLiba i metody pomocnicze do odczytu i zapisu metadanych AppStream | |
10 | Name: appstream-glib | |
09d82f64 JB |
11 | Version: 0.8.2 |
12 | Release: 1 | |
08ba24e9 JB |
13 | License: LGPL v2.1+ |
14 | Group: Libraries | |
99b53f56 | 15 | Source0: https://people.freedesktop.org/~hughsient/appstream-glib/releases/%{name}-%{version}.tar.xz |
09d82f64 | 16 | # Source0-md5: bf2f1610c2c5b734b6fa82b9319ef26c |
77502258 | 17 | Patch0: %{name}-rpm5.patch |
99fb326e | 18 | Patch1: %{name}-stemmer.patch |
99b53f56 | 19 | URL: https://people.freedesktop.org/~hughsient/appstream-glib/ |
f27661b8 | 20 | %{?with_alpm:BuildRequires: alpm-devel} |
09d82f64 | 21 | BuildRequires: curl-devel >= 7.56.0 |
77502258 JB |
22 | BuildRequires: docbook-dtd43-xml |
23 | BuildRequires: docbook-style-xsl | |
a4e4c62e | 24 | BuildRequires: fontconfig-devel |
0c3985a1 JB |
25 | # pkgconfig(freetype2) >= 9.10.0 |
26 | BuildRequires: freetype-devel >= 1:2.2.1 | |
c7a4424e | 27 | BuildRequires: gcab-devel >= 1.0 |
3f5284c4 | 28 | BuildRequires: gcc >= 5:3.2 |
c440ce23 | 29 | BuildRequires: gdk-pixbuf2-devel >= 2.31.5 |
3f5284c4 | 30 | BuildRequires: gettext-tools >= 0.19.7 |
8ce70c84 | 31 | BuildRequires: glib2-devel >= 1:2.58.0 |
08ba24e9 JB |
32 | BuildRequires: gobject-introspection-devel >= 0.9.8 |
33 | BuildRequires: gperf | |
77502258 | 34 | BuildRequires: gtk+3-devel >= 3.0 |
dc0e2239 | 35 | BuildRequires: gtk-doc >= 1.9 |
a4e4c62e | 36 | BuildRequires: intltool >= 0.40.0 |
c7a4424e | 37 | BuildRequires: json-glib-devel >= 1.1.2 |
08ba24e9 | 38 | BuildRequires: libarchive-devel |
08ba24e9 | 39 | BuildRequires: libstdc++-devel |
3f5284c4 | 40 | %{?with_stemmer:BuildRequires: libstemmer-devel} |
e71a83d4 | 41 | BuildRequires: libuuid-devel |
77502258 | 42 | BuildRequires: libxslt-progs |
09d82f64 | 43 | BuildRequires: meson >= 0.46.0 |
8ce70c84 | 44 | BuildRequires: ninja >= 1.5 |
a4e4c62e | 45 | BuildRequires: pango-devel |
08ba24e9 | 46 | BuildRequires: pkgconfig |
8d4b491a JB |
47 | BuildRequires: rpm-build >= 4.6 |
48 | %if %{with rpm5} | |
49 | BuildRequires: rpm-devel >= 5.0 | |
50 | %else | |
51 | BuildRequires: rpm-devel >= 1:4.6 | |
52 | %endif | |
8ce70c84 | 53 | BuildRequires: rpmbuild(macros) >= 1.736 |
f27661b8 | 54 | BuildRequires: sqlite3-devel >= 3 |
08ba24e9 JB |
55 | BuildRequires: tar >= 1:1.22 |
56 | BuildRequires: xz | |
c7a4424e | 57 | BuildRequires: yaml-devel >= 0.1 |
c440ce23 | 58 | Requires: gdk-pixbuf2 >= 2.31.5 |
8ce70c84 | 59 | Requires: glib2 >= 1:2.58.0 |
c7a4424e | 60 | Requires: json-glib >= 1.1.2 |
4775b279 JB |
61 | Provides: appdata-tools = %{version} |
62 | Obsoletes: appdata-tools < 0.2 | |
08ba24e9 JB |
63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
64 | ||
65 | %description | |
66 | AppStream-Glib library provides GObjects and helper methods to make it | |
67 | easy to read and write AppStream metadata. It also provides a simple | |
68 | DOM implementation that makes it easy to edit nodes and convert to and | |
69 | from the standardized XML representation. | |
70 | ||
71 | %description -l pl.UTF-8 | |
72 | Biblioteka AppStream-Glib dostarcza obiekty GLiba (GObject) oraz | |
73 | metody pomocnicze ułatwiające odczyt i zapis metadanych AppStream. | |
74 | Zapewnia także prostą implementację DOM ułatwiającą modyfikowanie | |
75 | węzłów i konwersję do i ze standardowej reprezentacji XML. | |
76 | ||
77 | %package devel | |
78 | Summary: Header files for appstream-glib library | |
79 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki appstream-glib | |
80 | Group: Development/Libraries | |
81 | Requires: %{name} = %{version}-%{release} | |
09d82f64 | 82 | Requires: curl-devel >= 7.56.0 |
c7a4424e | 83 | Requires: gcab-devel >= 1.0 |
c440ce23 | 84 | Requires: gdk-pixbuf2-devel >= 2.31.5 |
8ce70c84 | 85 | Requires: glib2-devel >= 1:2.58.0 |
e71a83d4 JB |
86 | Requires: libarchive-devel |
87 | Requires: libuuid-devel | |
09d82f64 JB |
88 | Requires: yaml-devel >= 0.1 |
89 | %if %{with rpm5} | |
90 | Requires: rpm-devel >= 5.0 | |
91 | %else | |
92 | Requires: rpm-devel >= 1:4.6 | |
93 | %endif | |
fc3c4427 JB |
94 | Obsoletes: appstream-builder-devel < 0.7.15 |
95 | Obsoletes: appstream-builder-static < 0.7.15 | |
08ba24e9 JB |
96 | |
97 | %description devel | |
98 | Header files for appstream-glib library. | |
99 | ||
100 | %description devel -l pl.UTF-8 | |
101 | Pliki nagłówkowe biblioteki appstream-glib. | |
102 | ||
103 | %package static | |
104 | Summary: Static appstream-glib library | |
105 | Summary(pl.UTF-8): Statyczna biblioteka appstream-glib | |
106 | Group: Development/Libraries | |
107 | Requires: %{name}-devel = %{version}-%{release} | |
108 | ||
109 | %description static | |
110 | Static appstream-glib library. | |
111 | ||
112 | %description static -l pl.UTF-8 | |
113 | Statyczna biblioteka appstream-glib. | |
114 | ||
115 | %package apidocs | |
116 | Summary: appstream-glib API documentation | |
117 | Summary(pl.UTF-8): Dokumentacja API biblioteki appstream-glib | |
118 | Group: Documentation | |
d264f8e7 | 119 | BuildArch: noarch |
08ba24e9 JB |
120 | |
121 | %description apidocs | |
122 | API documentation for appstream-glib library. | |
123 | ||
124 | %description apidocs -l pl.UTF-8 | |
125 | Dokumentacja API biblioteki appstream-glib. | |
126 | ||
77502258 JB |
127 | %package -n bash-completion-appstream-glib |
128 | Summary: Bash completion for appstream-glib package | |
129 | Summary(pl.UTF-8): Bashowe dopełnianie składni dla pakietu appstream-glib | |
130 | Group: Applications/Shells | |
131 | Requires: %{name} = %{version}-%{release} | |
132 | Requires: bash-completion >= 2.0 | |
133 | ||
134 | %description -n bash-completion-appstream-glib | |
135 | Bash completion for appstream-util command. | |
136 | ||
137 | %description -n bash-completion-appstream-glib -l pl.UTF-8 | |
138 | Bashowe dopełnianie składni polecenia appstream-util. | |
139 | ||
140 | %package -n appstream-builder | |
141 | Summary: AppStreamBuilder library to create AppStream metadata from packages | |
142 | Summary(pl.UTF-8): Biblioteka AppStreamBuilder tworząca metadane AppStream z pakietów | |
143 | Group: Libraries | |
144 | Requires: %{name} = %{version}-%{release} | |
0c3985a1 | 145 | Requires: freetype >= 1:2.2.1 |
77502258 JB |
146 | |
147 | %description -n appstream-builder | |
148 | AppStreamBuilder library to create AppStream metadata from packages. | |
149 | ||
150 | %description -n appstream-builder -l pl.UTF-8 | |
151 | Biblioteka AppStreamBuilder tworząca metadane AppStream z pakietów. | |
152 | ||
77502258 JB |
153 | %package -n bash-completion-appstream-builder |
154 | Summary: Bash completion for appstream-builder package | |
155 | Summary(pl.UTF-8): Bashowe dopełnianie składni dla pakietu appstream-builder | |
156 | Group: Applications/Shells | |
157 | Requires: appstream-builder = %{version}-%{release} | |
158 | Requires: bash-completion >= 2.0 | |
159 | ||
160 | %description -n bash-completion-appstream-builder | |
161 | Bash completion for appstream-builder command. | |
162 | ||
163 | %description -n bash-completion-appstream-builder -l pl.UTF-8 | |
164 | Bashowe dopełnianie składni polecenia appstream-builder. | |
165 | ||
08ba24e9 JB |
166 | %prep |
167 | %setup -q | |
bdd67182 | 168 | %{?with_rpm5:%patch0 -p1} |
77502258 | 169 | %patch1 -p1 |
c7a4424e JB |
170 | |
171 | %if %{with static_libs} | |
fc3c4427 | 172 | %{__sed} -i -e 's/shared_library/library/' libappstream-glib/meson.build |
c7a4424e | 173 | %endif |
08ba24e9 JB |
174 | |
175 | %build | |
c7a4424e JB |
176 | # for off64_t |
177 | CPPFLAGS="%{rpmcppflags} -D_LARGEFILE64_SOURCE" | |
99fb326e | 178 | %meson build \ |
c7a4424e JB |
179 | -Dalpm=%{__true_false aplm} \ |
180 | -Dstemmer=%{__true_false stemmer} \ | |
99fb326e AM |
181 | -Dgtk-doc=true |
182 | ||
183 | %meson_build -C build | |
08ba24e9 JB |
184 | |
185 | %install | |
186 | rm -rf $RPM_BUILD_ROOT | |
187 | ||
99fb326e | 188 | %meson_install -C build |
e71a83d4 | 189 | |
8ce70c84 | 190 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/installed-tests |
e71a83d4 JB |
191 | # already in gettext-tools >= 0.19.7 |
192 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/gettext/its/appdata.{its,loc} | |
77502258 | 193 | |
a4e4c62e JB |
194 | %find_lang %{name} |
195 | ||
08ba24e9 JB |
196 | %clean |
197 | rm -rf $RPM_BUILD_ROOT | |
198 | ||
199 | %post -p /sbin/ldconfig | |
200 | %postun -p /sbin/ldconfig | |
201 | ||
a4e4c62e | 202 | %files -f %{name}.lang |
08ba24e9 JB |
203 | %defattr(644,root,root,755) |
204 | %doc AUTHORS MAINTAINERS NEWS README.md | |
e71a83d4 | 205 | %attr(755,root,root) %{_bindir}/appstream-compose |
08ba24e9 JB |
206 | %attr(755,root,root) %{_bindir}/appstream-util |
207 | %attr(755,root,root) %{_libdir}/libappstream-glib.so.*.*.* | |
2fb305ec | 208 | %attr(755,root,root) %ghost %{_libdir}/libappstream-glib.so.8 |
08ba24e9 | 209 | %{_libdir}/girepository-1.0/AppStreamGlib-1.0.typelib |
4775b279 | 210 | %{_aclocaldir}/appdata-xml.m4 |
e71a83d4 | 211 | %{_mandir}/man1/appstream-compose.1* |
77502258 | 212 | %{_mandir}/man1/appstream-util.1* |
08ba24e9 JB |
213 | |
214 | %files devel | |
215 | %defattr(644,root,root,755) | |
216 | %attr(755,root,root) %{_libdir}/libappstream-glib.so | |
217 | %{_datadir}/gir-1.0/AppStreamGlib-1.0.gir | |
218 | %{_includedir}/libappstream-glib | |
219 | %{_pkgconfigdir}/appstream-glib.pc | |
77502258 | 220 | %{_aclocaldir}/appstream-xml.m4 |
08ba24e9 | 221 | |
c7a4424e | 222 | %if %{with static_libs} |
08ba24e9 JB |
223 | %files static |
224 | %defattr(644,root,root,755) | |
225 | %{_libdir}/libappstream-glib.a | |
99fb326e | 226 | %endif |
08ba24e9 | 227 | |
77502258 JB |
228 | %files -n bash-completion-appstream-glib |
229 | %defattr(644,root,root,755) | |
dc0e2239 | 230 | %{bash_compdir}/appstream-util |
77502258 | 231 | |
08ba24e9 JB |
232 | %files apidocs |
233 | %defattr(644,root,root,755) | |
234 | %{_gtkdocdir}/appstream-glib | |
77502258 JB |
235 | |
236 | %files -n appstream-builder | |
237 | %defattr(644,root,root,755) | |
238 | %attr(755,root,root) %{_bindir}/appstream-builder | |
e71a83d4 | 239 | %dir %{_libdir}/asb-plugins-5 |
e71a83d4 | 240 | %attr(755,root,root) %{_libdir}/asb-plugins-5/libasb_plugin_appdata.so |
e71a83d4 JB |
241 | %attr(755,root,root) %{_libdir}/asb-plugins-5/libasb_plugin_desktop.so |
242 | %attr(755,root,root) %{_libdir}/asb-plugins-5/libasb_plugin_font.so | |
243 | %attr(755,root,root) %{_libdir}/asb-plugins-5/libasb_plugin_gettext.so | |
244 | %attr(755,root,root) %{_libdir}/asb-plugins-5/libasb_plugin_hardcoded.so | |
c7a4424e | 245 | %attr(755,root,root) %{_libdir}/asb-plugins-5/libasb_plugin_icon.so |
6387ce59 | 246 | %attr(755,root,root) %{_libdir}/asb-plugins-5/libasb_plugin_shell_extension.so |
77502258 JB |
247 | %{_mandir}/man1/appstream-builder.1* |
248 | ||
77502258 JB |
249 | %files -n bash-completion-appstream-builder |
250 | %defattr(644,root,root,755) | |
dc0e2239 | 251 | %{bash_compdir}/appstream-builder |