]> git.pld-linux.org Git - packages/AppStream.git/blob - AppStream.spec
- updated to 0.8.6
[packages/AppStream.git] / AppStream.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # API documentation build
4 %bcond_without  qt              # Qt library (libappstream-qt)
5 %bcond_without  vala            # Vala API (VAPI)
6
7 Summary:        AppStream-Core library and tools
8 Summary(pl.UTF-8):      Biblioteka i narzędzia AppStream-Core
9 Name:           AppStream
10 Version:        0.8.6
11 Release:        1
12 License:        LGPL v2.1+
13 Group:          Libraries
14 Source0:        http://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz
15 # Source0-md5:  6ef680f00a9f888ea3feb658883bf655
16 URL:            http://www.freedesktop.org/wiki/Distributions/AppStream/Software/
17 BuildRequires:  cmake >= 3.2.0
18 BuildRequires:  gettext-tools
19 BuildRequires:  glib2-devel >= 1:2.36
20 BuildRequires:  gobject-introspection-devel
21 BuildRequires:  intltool
22 BuildRequires:  libstdc++-devel
23 BuildRequires:  libxml2-devel >= 2.0
24 BuildRequires:  pkgconfig
25 BuildRequires:  protobuf-devel
26 BuildRequires:  tar >= 1:1.22
27 %{?with_vala:BuildRequires:     vala}
28 BuildRequires:  xapian-core-devel >= 1.2
29 BuildRequires:  xz
30 BuildRequires:  yaml-devel >= 0.1
31 %if %{with qt}
32 BuildRequires:  Qt5Core-devel >= 5.0
33 BuildRequires:  qt5-qmake >= 5.0
34 %endif
35 %if %{with apidocs}
36 BuildRequires:  gtk-doc
37 BuildRequires:  publican
38 BuildRequires:  xmlto
39 %endif
40 Requires:       glib2 >= 1:2.36
41 Requires:       xapian-core-libs >= 1.2
42 Obsoletes:      PackageKit-plugin-appstream
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 AppStream-Core library and tools to access the AppStream component
47 database.
48
49 %description -l pl.UTF-8
50 Biblioteka i narzędzia AppStream-Core służące do dostępu do bazy
51 danych komponentu AppStream.
52
53 %package devel
54 Summary:        Header files for AppStream library
55 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki AppStream
56 Group:          Development/Libraries
57 Requires:       %{name} = %{version}-%{release}
58 Requires:       glib2-devel >= 1:2.36
59
60 %description devel
61 Header files for AppStream library.
62
63 %description devel -l pl.UTF-8
64 Pliki nagłówkowe biblioteki AppStream.
65
66 %package apidocs
67 Summary:        AppStream API documentation
68 Summary(pl.UTF-8):      Dokumentacja API biblioteki AppStream
69 Group:          Documentation
70 %if "%{_rpmversion}" >= "5"
71 BuildArch:      noarch
72 %endif
73
74 %description apidocs
75 API documentation for AppStream library.
76
77 %description apidocs -l pl.UTF-8
78 Dokumentacja API biblioteki AppStream.
79
80 %package qt
81 Summary:        AppstreamQt library
82 Summary(pl.UTF-8):      Biblioteka AppstreamQt
83 Group:          Libraries
84 Requires:       Qt5Core >= 5.0
85 Requires:       xapian-core-libs >= 1.2
86
87 %description qt
88 AppstreamQt library.
89
90 %description qt -l pl.UTF-8
91 Biblioteka AppstreamQt.
92
93 %package qt-devel
94 Summary:        Header files for AppstreamQt library
95 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki AppstreamQt
96 Group:          Libraries
97 Requires:       %{name}-qt = %{version}-%{release}
98 Requires:       Qt5Core-devel >= 5.0
99
100 %description qt-devel
101 Header files for AppstreamQt library.
102
103 %description qt-devel -l pl.UTF-8
104 Pliki nagłówkowe biblioteki AppstreamQt.
105
106 %package -n vala-appstream
107 Summary:        Vala API for AppStream library
108 Summary(pl.UTF-8):      API języka Vala do biblioteki AppStream
109 Group:          Development/Libraries
110 Requires:       %{name}-devel = %{version}-%{release}
111 Requires:       vala
112
113 %description -n vala-appstream
114 Vala API for AppStream library.
115
116 %description -n vala-appstream -l pl.UTF-8
117 API języka Vala do biblioteki AppStream.
118
119 %prep
120 %setup -q
121
122 %build
123 install -d build
124 cd build
125 %cmake .. \
126         %{?with_apidocs:-DDOCUMENTATION=ON} \
127         %{?with_qt:-DQT=ON} \
128         %{?with_vala:-DVAPI=ON}
129
130 %{__make} -j1
131
132 %install
133 rm -rf $RPM_BUILD_ROOT
134
135 %{__make} -C build install \
136         DESTDIR=$RPM_BUILD_ROOT
137
138 install -d $RPM_BUILD_ROOT%{_docdir}
139 %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir}
140
141 %find_lang appstream
142
143 %clean
144 rm -rf $RPM_BUILD_ROOT
145
146 %post   -p /sbin/ldconfig
147 %postun -p /sbin/ldconfig
148
149 %post   qt -p /sbin/ldconfig
150 %postun qt -p /sbin/ldconfig
151
152 %files -f appstream.lang
153 %defattr(644,root,root,755)
154 %doc AUTHORS MAINTAINERS NEWS README.md RELEASE
155 %attr(755,root,root) %{_bindir}/appstreamcli
156 %attr(755,root,root) %{_libdir}/libappstream.so.*.*.*
157 %attr(755,root,root) %ghost %{_libdir}/libappstream.so.2
158 %{_libdir}/girepository-1.0/AppStream-0.8.typelib
159 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf
160 %dir %{_datadir}/app-info
161 %{_datadir}/app-info/categories.xml
162 %{_mandir}/man1/appstreamcli.1*
163
164 %files devel
165 %defattr(644,root,root,755)
166 %attr(755,root,root) %{_libdir}/libappstream.so
167 %{_datadir}/gir-1.0/AppStream-0.8.gir
168 %{_includedir}/AppStream
169 %{_pkgconfigdir}/appstream.pc
170
171 %if %{with apidocs}
172 %files apidocs
173 %defattr(644,root,root,755)
174 %{_docdir}/appstream
175 %{_gtkdocdir}/appstream
176 %endif
177
178 %if %{with qt}
179 %files qt
180 %defattr(644,root,root,755)
181 %attr(755,root,root) %{_libdir}/libAppstreamQt.so.*.*.*
182 %attr(755,root,root) %ghost %{_libdir}/libAppstreamQt.so.1
183
184 %files qt-devel
185 %defattr(644,root,root,755)
186 %attr(755,root,root) %{_libdir}/libAppstreamQt.so
187 %{_includedir}/AppstreamQt
188 %{_libdir}/cmake/AppstreamQt
189 %endif
190
191 %if %{with vala}
192 %files -n vala-appstream
193 %defattr(644,root,root,755)
194 %{_datadir}/vala/vapi/appstream.vapi
195 %endif
This page took 0.111241 seconds and 3 git commands to generate.