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