appstream-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. %bcond_with qt5
  2. %bcond_with doc
  3. %global _vpath_srcdir .
  4. %global _vpath_builddir build
  5. %global __global_cflags %{optflags}
  6. %global __global_ldflags ""
  7. %global _kf5_metainfodir %{_datadir}/metainfo
  8. # Vala/Vapi support ( upstream disabled by default, probably explains why it the build breaks often )
  9. %global vala 1
  10. Summary: Utilities to generate, maintain and access the AppStream database
  11. Name: appstream
  12. Version: 0.12.11
  13. Release: 2%{?_dist_release}
  14. Group: system
  15. Vendor: Project Vine
  16. Distribution: Vine Linux
  17. # lib LGPLv2+, tools GPLv2+
  18. License: GPLv2+ and LGPLv2+
  19. #URL: http://www.freedesktop.org/wiki/Distributions/AppStream
  20. URL: https://github.com/ximion/appstream
  21. Source0: https://www.freedesktop.org/software/appstream/releases/AppStream-%{version}.tar.xz
  22. ## upstream patches (lookaside cache)
  23. ## upstreamable patches
  24. # needed for cmake auto-provides
  25. BuildRequires: cmake
  26. BuildRequires: meson
  27. BuildRequires: gettext
  28. BuildRequires: gperf
  29. BuildRequires: gtk-doc
  30. BuildRequires: intltool
  31. BuildRequires: itstool
  32. %if %{with qt5}
  33. # for %%_kf5_metainfodir macro
  34. BuildRequires: kf5-rpm-macros
  35. %endif
  36. #BuildRequires: libstemmer-devel
  37. BuildRequires: libsoup-devel
  38. BuildRequires: lmdb-devel
  39. BuildRequires: pkgconfig(gio-2.0) pkgconfig(gobject-introspection-1.0)
  40. BuildRequires: pkgconfig(libxml-2.0)
  41. BuildRequires: pkgconfig(packagekit-glib2)
  42. BuildRequires: pkgconfig(protobuf-lite)
  43. %if %{with qt5}
  44. BuildRequires: pkgconfig(Qt5Core)
  45. %endif
  46. BuildRequires: pkgconfig(yaml-0.1)
  47. %if %{with doc}
  48. BuildRequires: publican
  49. %endif
  50. BuildRequires: xmlto
  51. Requires: appstream-data
  52. %if ! 0%{?vala}
  53. Obsoletes: appstream-vala < 0.7.3
  54. %endif
  55. %description
  56. AppStream makes it easy to access application information from the
  57. AppStream database over a nice GObject-based interface.
  58. %package devel
  59. Summary: Development files for %{name}
  60. Requires: %{name}%{?_isa} = %{version}-%{release}
  61. %description devel
  62. %{summary}.
  63. %if %{with qt5}
  64. %package qt
  65. Summary: Qt5 bindings for %{name}
  66. Requires: %{name}%{?_isa} = %{version}-%{release}
  67. %description qt
  68. %{summary}.
  69. %package qt-devel
  70. Summary: Development files for %{name}-qt bindings
  71. Requires: %{name}-qt%{?_isa} = %{version}-%{release}
  72. Requires: pkgconfig(Qt5Core)
  73. %description qt-devel
  74. %{summary}.
  75. %endif
  76. %if 0%{?vala}
  77. %package vala
  78. Summary: Vala bindings for %{name}
  79. Requires: %{name}%{?_isa} = %{version}-%{release}
  80. BuildRequires: vala-tools
  81. Requires: vala
  82. %description vala
  83. %{summary}.
  84. %endif
  85. %prep
  86. %autosetup -n AppStream-%{version} -p1
  87. sed -i -e "s|0.12.2|%{version}|" meson.build
  88. %build
  89. export LANG=ja_JP.UTF-8
  90. %{meson} \
  91. -Dstemming=false \
  92. %if %{with doc}
  93. -Ddocs=true \
  94. %endif
  95. %if %{with qt5}
  96. -Dqt=true \
  97. %endif
  98. -Dvapi=%{?vala:true}%{!?vala:false}
  99. %{meson_build}
  100. %install
  101. export LANG=ja_JP.UTF-8
  102. %{meson_install}
  103. mkdir -p %{buildroot}/var/cache/app-info/{icons,gv,xmls}
  104. touch %{buildroot}/var/cache/app-info/cache.watch
  105. %find_lang appstream
  106. %if "%{?_kf5_metainfodir}" != "%{_datadir}/metainfo"
  107. # move metainfo to right/legacy location
  108. mkdir -p %{buildroot}%{_kf5_metainfodir}
  109. mv %{buildroot}%{_datadir}/metainfo/*.xml \
  110. %{buildroot}%{_kf5_metainfodir}
  111. %endif
  112. %check
  113. export LANG=ja_JP.UTF-8
  114. %{meson_test}
  115. %post -p /sbin/ldconfig
  116. %postun -p /sbin/ldconfig
  117. %posttrans
  118. %{_bindir}/appstreamcli refresh --force >& /dev/null ||:
  119. ## use file triggers instead of static pkg names
  120. ## other repos can provide appdata too
  121. %if 0%{?fedora} > 25
  122. ## not sure how smart appstreamcli is about cache validation
  123. ## to judge if --force is really needed here or not -- rex
  124. %transfiletriggerin -- %{_datadir}/app-info/xmls
  125. %{_bindir}/appstreamcli refresh --force >& /dev/null ||:
  126. %transfiletriggerpostun -- %{_datadir}/app-info/xmls
  127. %{_bindir}/appstreamcli refresh >& /dev/null ||:
  128. %else
  129. %triggerun -- appstream-data
  130. %{_bindir}/appstreamcli refresh >& /dev/null ||:
  131. %endif
  132. %files -f appstream.lang
  133. %doc AUTHORS
  134. %license LICENSE.GPLv2
  135. %license LICENSE.LGPLv2.1
  136. %{_bindir}/appstreamcli
  137. %{_mandir}/man1/appstreamcli.1*
  138. %config(noreplace) %{_sysconfdir}/appstream.conf
  139. %dir %{_libdir}/girepository-1.0/
  140. %{_libdir}/girepository-1.0/AppStream-1.0.typelib
  141. %{_libdir}/libappstream.so.4*
  142. %{_libdir}/libappstream.so.%{version}
  143. %{_kf5_metainfodir}/org.freedesktop.appstream.cli.*.xml
  144. # put in -devel? -- rex
  145. %{_datadir}/gettext/its/metainfo.*
  146. %ghost /var/cache/app-info/cache.watch
  147. %dir /var/cache/app-info/
  148. %dir /var/cache/app-info/icons/
  149. %dir /var/cache/app-info/gv/
  150. %dir /var/cache/app-info/xmls/
  151. %files devel
  152. %{_includedir}/appstream/
  153. %{_libdir}/libappstream.so
  154. %{_libdir}/pkgconfig/appstream.pc
  155. %dir %{_datadir}/gir-1.0/
  156. %{_datadir}/gir-1.0/AppStream-1.0.gir
  157. %dir %{_docdir}/appstream
  158. %{_docdir}/appstream/html/
  159. ## symlink pointing to ^^, but need to take care, since rpm has
  160. ## trouble replacing dirs with symlinks, omit it for now -- rex
  161. %exclude %{_datadir}/gtk-doc/html/appstream
  162. %if %{with qt5}
  163. %ldconfig_scriptlets qt
  164. %files qt
  165. %{_libdir}/libAppStreamQt.so.2*
  166. %{_libdir}/libAppStreamQt.so.%{version}
  167. %files qt-devel
  168. %{_includedir}/AppStreamQt/
  169. %{_libdir}/cmake/AppStreamQt/
  170. %{_libdir}/libAppStreamQt.so
  171. %endif
  172. %if 0%{?vala}
  173. %files vala
  174. %{_datadir}/vala/vapi/appstream.deps
  175. %{_datadir}/vala/vapi/appstream.vapi
  176. %endif
  177. %changelog
  178. * Sat Aug 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.12.11-2
  179. - added R:appstream-data.
  180. * Sat Aug 01 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.12.11-1
  181. - new upstream release.
  182. * Mon Dec 10 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.12.3-2
  183. - initial build for Vine Linux.
  184. * Tue Nov 27 2018 Rex Dieter <rdieter@fedoraproject.org> - 0.12.3-1
  185. - 0.12.3
  186. * Fri Oct 12 2018 Kalev Lember <klember@redhat.com> - 0.12.2-2
  187. - Backport an upstream fix for empty content_rating tags
  188. * Tue Aug 07 2018 Rex Dieter <rdieter@fedoraproject.org> - 0.12.2-1
  189. - appstream-0.12.2 (#1589595)
  190. * Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-2
  191. - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
  192. * Sun Jun 10 2018 Rex Dieter <rdieter@fedoraproject.org> - 0.12.1-1
  193. - appstream-0.12.1 (#1589595)
  194. - use %%ldconfig_scriptlets
  195. * Sun Apr 08 2018 Rex Dieter <rdieter@fedoraproject.org> - 0.12.0-1
  196. - 0.12.0 (#1563876)
  197. * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.8-3
  198. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  199. * Fri Feb 02 2018 Jan Grulich <jgrulich@redhat.com> - 0.11.8-2
  200. - Fix broken cmake for Qt library
  201. * Fri Jan 26 2018 Rex Dieter <rdieter@fedoraproject.org> - 0.11.8-1
  202. - 0.11.8
  203. * Fri Dec 29 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.11.7-2
  204. - use metainfo dir for f28+
  205. * Fri Nov 03 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.11.7-1
  206. - 0.11.7
  207. * Mon Oct 02 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.11.6-1
  208. - 0.11.6
  209. * Thu Sep 14 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.11.5-4
  210. - pull in upstream vala workaround
  211. * Thu Sep 14 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.11.5-3
  212. - hack around broken vala bindings
  213. * Tue Sep 12 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.11.5-2
  214. - use file triggers for cache regen
  215. * Mon Sep 11 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.11.5-1
  216. - 0.11.5 (#1486970)
  217. * Thu Sep 07 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.11.4-1
  218. - 0.11.4 (#1486970)
  219. * Sun Aug 06 2017 Björn Esser <besser82@fedoraproject.org> - 0.11.2-4
  220. - Rebuilt for AutoReq cmake-filesystem
  221. * Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.2-3
  222. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
  223. * Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.2-2
  224. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  225. * Wed Jul 19 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.11.2-1
  226. - 0.11.2
  227. * Mon Jul 03 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.11.1-1
  228. - 0.11.1
  229. * Fri May 05 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.11.0-1
  230. - 0.11.0
  231. * Wed Apr 05 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.10.6-1
  232. - 0.10.6
  233. * Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.5-2
  234. - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
  235. * Mon Jan 02 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.10.5-1
  236. - 0.10.5
  237. * Thu Dec 15 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.10.4-1
  238. - 0.10.4
  239. * Tue Nov 15 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.10.3-4
  240. - use /usr/share/appdata, improve /var/cache/app-info
  241. * Mon Nov 14 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.10.3-2
  242. - pull in upstream crash fix
  243. * Tue Nov 01 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.10.3-1
  244. - 0.10.3
  245. - update scriptlets to use 'refresh' instead of 'refresh-index'
  246. * Fri Sep 30 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.10.1-3
  247. - s|share/appstream|share/appdata/
  248. * Sat Sep 17 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.10.1-2
  249. - improve description, drop no-longer-used deps
  250. * Sat Sep 17 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.10.1-1
  251. - 0.10.1
  252. * Thu Aug 18 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.9.8-3
  253. - pull in upstream fixes
  254. * Wed Aug 17 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.9.8-2
  255. - (re)enable vala support (#1367892)
  256. * Fri Aug 12 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.9.8-1
  257. - 0.9.8
  258. * Thu May 12 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.9.6-1
  259. - 0.9.6
  260. * Fri Apr 08 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.9.3-1
  261. - 0.9.3
  262. * Wed Feb 24 2016 Rex Dieter <rdieter@fedoraproject.org> 0.9.1-1
  263. - 0.9.1
  264. * Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-2
  265. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  266. * Sun Dec 13 2015 Rex Dieter <rdieter@fedoraproject.org> 0.9.0-1
  267. - 0.9.0
  268. * Sun Dec 13 2015 Rex Dieter <rdieter@fedoraproject.org> 0.8.6-1
  269. - 0.8.6
  270. * Tue Sep 29 2015 Rex Dieter <rdieter@fedoraproject.org> 0.8.4-3
  271. - Don't abort hitting unknown appstream tags (#1267312)
  272. * Wed Sep 09 2015 Rex Dieter <rdieter@fedoraproject.org> 0.8.4-2
  273. - polish scriptlets
  274. - use --force in %%post
  275. - use %%triggerun -- appstream-data (only on upgrades)
  276. - ignore errors, redirect output to /dev/null
  277. * Tue Sep 08 2015 Rex Dieter <rdieter@fedoraproject.org> 0.8.4-1
  278. - 0.8.4, refresh-index whenever appstream-data is updated too
  279. * Thu Sep 03 2015 Rex Dieter <rdieter@fedoraproject.org> 0.8.3-2
  280. - -devel: fix doc handling, omit gtk-doc symlink (for now)
  281. * Thu Sep 03 2015 Rex Dieter <rdieter@fedoraproject.org> 0.8.3-1
  282. - 0.8.3
  283. * Sat Jun 27 2015 Rex Dieter <rdieter@fedoraproject.org> 0.8.2-1
  284. - 0.8.2
  285. * Sat Jun 27 2015 Rex Dieter <rdieter@fedoraproject.org> 0.8.1-1
  286. - 0.8.1
  287. * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-3
  288. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  289. * Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.8.0-2
  290. - Rebuilt for GCC 5 C++11 ABI change
  291. * Wed Jan 28 2015 Rex Dieter <rdieter@fedoraproject.org> 0.8.0-1
  292. - 0.8.0
  293. * Wed Jan 21 2015 Rex Dieter <rdieter@fedoraproject.org> 0.7.6-1
  294. - 0.7.6
  295. * Wed Jan 21 2015 Rex Dieter <rdieter@fedoraproject.org> 0.7.5-2
  296. - -qt: Qt5 support (drop deprecated Qt4-based bindings)
  297. * Tue Jan 13 2015 Rex Dieter <rdieter@fedoraproject.org> 0.7.5-1
  298. - 0.7.5
  299. * Mon Oct 13 2014 Rex Dieter <rdieter@fedoraproject.org> - 0.7.3-1
  300. - 0.7.3
  301. - omit vala support (for now, build broken)
  302. * Tue Sep 30 2014 Rex Dieter <rdieter@fedoraproject.org> 0.7.2-2
  303. - pull in some upstream fixes, fix %%posttrans scriptlet
  304. * Tue Sep 30 2014 Rex Dieter <rdieter@fedoraproject.org> 0.7.2-1
  305. - 0.7.2, ready qt5 support (not enabled yet)
  306. * Fri Sep 12 2014 Rex Dieter <rdieter@fedoraproject.org> 0.7.1-1
  307. - 0.7.1
  308. * Wed Aug 20 2014 Rex Dieter <rdieter@fedoraproject.org> 0.7.0-4
  309. - enable Qt bindings support
  310. * Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-3
  311. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
  312. * Tue Jul 22 2014 Kalev Lember <kalevlember@gmail.com> - 0.7.0-2
  313. - Rebuilt for gobject-introspection 1.41.4
  314. * Wed Jul 16 2014 Rex Dieter <rdieter@fedoraproject.org> 0.7.0-1
  315. - 0.7.0
  316. * Sat Jun 28 2014 Rex Dieter <rdieter@fedoraproject.org> 0.6.2-6
  317. - Requires: appstream-data
  318. * Sat Jun 28 2014 Rex Dieter <rdieter@fedoraproject.org> 0.6.2-5
  319. - backport upstream commit to fix appstream-index hang (#1098306)
  320. * Fri Jun 20 2014 Rex Dieter <rdieter@fedoraproject.org> 0.6.2-4
  321. - appstream-index scriptlet hanging, skip for now (#1098306)
  322. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.2-3
  323. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  324. * Thu May 15 2014 Rex Dieter <rdieter@fedoraproject.org> 0.6.2-2
  325. - update URL
  326. * Mon May 12 2014 Rex Dieter <rdieter@fedoraproject.org> 0.6.2-1
  327. - 0.6.2
  328. * Sat Apr 26 2014 Rex Dieter <rdieter@fedoraproject.org> 0.6.1-1
  329. - Appstream-0.6.1, -vala support lives!
  330. * Sat Apr 19 2014 Rex Dieter <rdieter@fedoraproject.org> - 0.6-1
  331. - Appstream-0.6
  332. - Obsoletes: appstream-vala (no longer provided)
  333. * Sun Feb 23 2014 Rex Dieter <rdieter@fedoraproject.org> 0.5-1
  334. - Appstream-0.5
  335. * Fri Jan 31 2014 Rex Dieter <rdieter@fedoraproject.org> 0.4.0-3
  336. - rebuild (PackageKit)
  337. * Mon Nov 04 2013 Rex Dieter <rdieter@fedoraproject.org> 0.4.0-2
  338. - -vala subpkg
  339. - own %%{_libdir}/girepository-1.0, %%{_libdir}/packagekit-plugins (until someone better comes along)
  340. * Sun Nov 03 2013 Rex Dieter <rdieter@fedoraproject.org> 0.4.0-1
  341. - AppStream-0.4.0