appstream-vl.spec 13 KB

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