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