Update to 0.15.2 and Add appstream.yaml

This commit is contained in:
zhang__3125 2022-04-15 17:11:33 +08:00
parent 11c680e205
commit 1198fb2a83
4 changed files with 59 additions and 44 deletions

Binary file not shown.

View File

@ -1,45 +1,35 @@
# Vala/Vapi support ( upstream disabled by default, probably explains why it the build breaks often ) # Vala/Vapi support ( upstream disabled by default, probably explains why it the build breaks often )
%global vala 1 %global vala 1
Summary: Utilities to generate, maintain and access the AppStream database
Name: appstream Name: appstream
Version: 0.12.11 Version: 0.15.2
Release: 1 Release: 1
Summary: Utilities to generate, maintain and access the AppStream database
# lib LGPLv2+, tools GPLv2+
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
#URL: http://www.freedesktop.org/wiki/Distributions/AppStream
URL: https://github.com/ximion/appstream URL: https://github.com/ximion/appstream
Source0: AppStream-%{version}.tar.xz Source0: https://github.com/ximion/appstream/archive/refs/tags/v%{version}.tar.gz
## upstream patches (lookaside cache) BuildRequires: cmake meson gettext gperf gtk-doc intltool itstool
BuildRequires: libstemmer-devel sed
## upstreamable patches
# needed for cmake auto-provides
BuildRequires: cmake
BuildRequires: meson
BuildRequires: gettext
BuildRequires: gperf
BuildRequires: gtk-doc
BuildRequires: intltool
BuildRequires: itstool
BuildRequires: libstemmer-devel
BuildRequires: pkgconfig(gio-2.0) pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(gio-2.0) pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(libsoup-2.4) BuildRequires: pkgconfig(libsoup-2.4)
BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(lmdb) BuildRequires: pkgconfig(lmdb)
BuildRequires: pkgconfig(packagekit-glib2) BuildRequires: pkgconfig(packagekit-glib2)
BuildRequires: pkgconfig(protobuf-lite) BuildRequires: protobuf-lite-devel
BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Core)
# lrelease
BuildRequires: qt5-linguist BuildRequires: qt5-linguist
BuildRequires: pkgconfig(yaml-0.1) BuildRequires: pkgconfig(yaml-0.1)
BuildRequires: vala BuildRequires: vala
BuildRequires: xmlto BuildRequires: xmlto
BuildRequires: pkgconfig(cairo)
Requires: appstream-data BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(pango)
BuildRequires: pkgconfig(xmlb)
%description %description
AppStream makes it easy to access application information from the AppStream makes it easy to access application information from the
@ -48,10 +38,22 @@ AppStream database over a nice GObject-based interface.
%package devel %package devel
Summary: Development files for %{name} Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
# -vala subpackage removed in F30
Obsoletes: appstream-vala < 0.12.4-3 Obsoletes: appstream-vala < 0.12.4-3
Provides: appstream-vala = %{version}-%{release}
%description devel %description devel
Provides: appstream-vala = %{version}-%{release}
%{summary}.
%package compose
Summary: Library for generating AppStream data
Requires: %{name}%{?_isa} = %{version}-%{release}
%description compose
%{summary}.
%package compose-devel
Summary: Development files for %{name}-compose library
Requires: %{name}-compose%{?_isa} = %{version}-%{release}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
%description compose-devel
%{summary}. %{summary}.
%package qt %package qt
@ -67,15 +69,15 @@ Requires: pkgconfig(Qt5Core)
%description qt-devel %description qt-devel
%{summary}. %{summary}.
%prep %prep
%autosetup -n AppStream-%{version} -p1 %autosetup -n appstream-%{version} -p1
sed -i -e "s|0.12.2|%{version}|" meson.build #sed -i -e "s|0.15.2|%{version}|" meson.build
sed -i '/-Wno-error=deprecated-copy/ s/^/#/g' meson.build #sed -i '/-Wno-error=deprecated-copy/ s/^/#/g' meson.build
%build %build
%{meson} \ %{meson} \
-Dcompose=true \
-Dqt=true \ -Dqt=true \
-Dvapi=%{?vala:true}%{!?vala:false} -Dvapi=%{?vala:true}%{!?vala:false}
@ -101,7 +103,6 @@ mv %{buildroot}%{_datadir}/metainfo/*.xml \
%check %check
%{meson_test} ||: %{meson_test} ||:
#%ldconfig_scriptlets #%ldconfig_scriptlets
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
@ -109,25 +110,15 @@ mv %{buildroot}%{_datadir}/metainfo/*.xml \
%posttrans %posttrans
%{_bindir}/appstreamcli refresh --force >& /dev/null ||: %{_bindir}/appstreamcli refresh --force >& /dev/null ||:
## use file triggers instead of static pkg names
## other repos can provide appdata too
%if 0%{?fedora} > 25
## not sure how smart appstreamcli is about cache validation
## to judge if --force is really needed here or not -- rex
%transfiletriggerin -- %{_datadir}/app-info/xmls %transfiletriggerin -- %{_datadir}/app-info/xmls
%{_bindir}/appstreamcli refresh --force >& /dev/null ||: %{_bindir}/appstreamcli refresh --force >& /dev/null ||:
%transfiletriggerpostun -- %{_datadir}/app-info/xmls %transfiletriggerpostun -- %{_datadir}/app-info/xmls
%{_bindir}/appstreamcli refresh >& /dev/null ||: %{_bindir}/appstreamcli refresh --force >& /dev/null ||:
%else
%triggerun -- appstream-data
%{_bindir}/appstreamcli refresh >& /dev/null ||:
%endif
%files -f appstream.lang %files -f appstream.lang
%doc AUTHORS %doc AUTHORS
%license LICENSE.GPLv2 %license COPYING
%license LICENSE.LGPLv2.1
%{_bindir}/appstreamcli %{_bindir}/appstreamcli
%{_mandir}/man1/appstreamcli.1* %{_mandir}/man1/appstreamcli.1*
%config(noreplace) %{_sysconfdir}/appstream.conf %config(noreplace) %{_sysconfdir}/appstream.conf
@ -160,6 +151,23 @@ mv %{buildroot}%{_datadir}/metainfo/*.xml \
## symlink pointing to ^^, but need to take care, since rpm has ## symlink pointing to ^^, but need to take care, since rpm has
## trouble replacing dirs with symlinks, omit it for now -- rex ## trouble replacing dirs with symlinks, omit it for now -- rex
%exclude %{_datadir}/gtk-doc/html/appstream %exclude %{_datadir}/gtk-doc/html/appstream
%{_datadir}/installed-tests/appstream/metainfo-validate.test
%ldconfig_scriptlets compose
%files compose
%{_libexecdir}/appstreamcli-compose
%{_mandir}/man1/appstreamcli-compose.1*
%{_libdir}/libappstream-compose.so.0*
%{_libdir}/libappstream-compose.so.%{version}
%{_libdir}/girepository-1.0/AppStreamCompose-1.0.typelib
%{_metainfodir}/org.freedesktop.appstream.compose.metainfo.xml
%files compose-devel
%{_includedir}/appstream-compose/
%{_libdir}/libappstream-compose.so
%{_libdir}/pkgconfig/appstream-compose.pc
%{_datadir}/gir-1.0/AppStreamCompose-1.0.gir
%ldconfig_scriptlets qt %ldconfig_scriptlets qt
@ -172,7 +180,10 @@ mv %{buildroot}%{_datadir}/metainfo/*.xml \
%{_libdir}/cmake/AppStreamQt/ %{_libdir}/cmake/AppStreamQt/
%{_libdir}/libAppStreamQt.so %{_libdir}/libAppStreamQt.so
%changelog %changelog
* Fri Apr 15 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 0.15.2-1
- Update to 0.15.2
- Add appstream.yaml
* Fri Aug 7 2020 weidong <weidong@uniontech.com> - 0.12.11-1 * Fri Aug 7 2020 weidong <weidong@uniontech.com> - 0.12.11-1
- Initial release for OpenEuler - Initial release for OpenEuler

4
appstream.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: appstream
tag_prefix: ^v
separator: .

BIN
v0.15.2.tar.gz Normal file

Binary file not shown.