]> git.pld-linux.org Git - packages/AppStream.git/blob - AppStream.spec
- updated to 0.8.4
[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.4
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:  8294719755719d64640b84f7a3217591
16 Patch0:         %{name}-cmake.patch
17 URL:            http://www.freedesktop.org/wiki/Distributions/AppStream/Software/
18 BuildRequires:  cmake >= 2.8.12
19 BuildRequires:  gettext-tools
20 BuildRequires:  glib2-devel >= 1:2.36
21 BuildRequires:  gobject-introspection-devel
22 BuildRequires:  intltool
23 BuildRequires:  libstdc++-devel
24 BuildRequires:  libxml2-devel >= 2.0
25 BuildRequires:  pkgconfig
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 %patch0 -p1
122
123 %build
124 install -d build
125 cd build
126 %cmake .. \
127         %{?with_apidocs:-DDOCUMENTATION=ON} \
128         %{?with_qt:-DQT=ON} \
129         %{?with_vala:-DVAPI=ON}
130
131 %{__make} -j1
132
133 %install
134 rm -rf $RPM_BUILD_ROOT
135
136 %{__make} -C build install \
137         DESTDIR=$RPM_BUILD_ROOT
138
139 install -d $RPM_BUILD_ROOT%{_docdir}
140 %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir}
141
142 %find_lang appstream
143
144 %clean
145 rm -rf $RPM_BUILD_ROOT
146
147 %post   -p /sbin/ldconfig
148 %postun -p /sbin/ldconfig
149
150 %post   qt -p /sbin/ldconfig
151 %postun qt -p /sbin/ldconfig
152
153 %files -f appstream.lang
154 %defattr(644,root,root,755)
155 %doc AUTHORS MAINTAINERS NEWS README.md RELEASE
156 %attr(755,root,root) %{_bindir}/appstreamcli
157 %attr(755,root,root) %{_libdir}/libappstream.so.*.*.*
158 %attr(755,root,root) %ghost %{_libdir}/libappstream.so.2
159 %{_libdir}/girepository-1.0/AppStream-0.8.typelib
160 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf
161 %dir %{_datadir}/app-info
162 %{_datadir}/app-info/categories.xml
163 %{_mandir}/man1/appstreamcli.1*
164
165 %files devel
166 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_libdir}/libappstream.so
168 %{_datadir}/gir-1.0/AppStream-0.8.gir
169 %{_includedir}/AppStream
170 %{_pkgconfigdir}/appstream.pc
171
172 %if %{with apidocs}
173 %files apidocs
174 %defattr(644,root,root,755)
175 %{_docdir}/appstream
176 %{_gtkdocdir}/appstream
177 %endif
178
179 %if %{with qt}
180 %files qt
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_libdir}/libAppstreamQt.so.*.*.*
183 %attr(755,root,root) %ghost %{_libdir}/libAppstreamQt.so.1
184
185 %files qt-devel
186 %defattr(644,root,root,755)
187 %attr(755,root,root) %{_libdir}/libAppstreamQt.so
188 %{_includedir}/AppstreamQt
189 %{_libdir}/cmake/AppstreamQt
190 %endif
191
192 %if %{with vala}
193 %files -n vala-appstream
194 %defattr(644,root,root,755)
195 %{_datadir}/vala/vapi/appstream.vapi
196 %endif
This page took 0.116691 seconds and 3 git commands to generate.