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