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