Blame appstream-generator.spec

76159c2
%global asgen_jsdir %{_datadir}/appstream/templates/default/static/js
76159c2
76159c2
Name:           appstream-generator
927e7b5
Version:        0.7.4
47d657f
Release:        2%{?dist}
76159c2
Summary:        Fast AppStream metadata generator
76159c2
76159c2
License:        LGPLv3+
76159c2
URL:            https://github.com/ximion/%{name}
76159c2
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
76159c2
76159c2
BuildRequires:  pkgconfig(glib-2.0)
76159c2
BuildRequires:  pkgconfig(gobject-2.0)
76159c2
BuildRequires:  pkgconfig(gio-2.0)
927e7b5
BuildRequires:  pkgconfig(glibd-2.0)
927e7b5
BuildRequires:  pkgconfig(appstream) >= 0.12.2
76159c2
BuildRequires:  pkgconfig(lmdb) >= 0.9
76159c2
BuildRequires:  pkgconfig(libarchive) >= 3.2
76159c2
BuildRequires:  pkgconfig(cairo) >= 1.12
76159c2
BuildRequires:  pkgconfig(gdk-pixbuf-2.0)
76159c2
BuildRequires:  pkgconfig(librsvg-2.0)
76159c2
BuildRequires:  pkgconfig(libcurl)
76159c2
BuildRequires:  pkgconfig(freetype2)
76159c2
BuildRequires:  pkgconfig(pango)
76159c2
BuildRequires:  pkgconfig(fontconfig)
76159c2
BuildRequires:  pkgconfig(mustache-d)
927e7b5
BuildRequires:  pkgconfig(dcontainers) >= 0.8.0
76159c2
BuildRequires:  pkgconfig(gobject-introspection-1.0)
927e7b5
BuildRequires:  gir-to-d >= 0.15.0
76159c2
BuildRequires:  ldc >= 1:1.1.0
25af283
# meson.build parsing bug fixed in 0.44.1
25af283
BuildRequires:  meson >= 0.44.1
76159c2
BuildRequires:  npm(Flot)
76159c2
BuildRequires:  js-highlight
76159c2
BuildRequires:  js-jquery
76159c2
# For man pages
76159c2
BuildRequires:  %{_bindir}/xsltproc
76159c2
BuildRequires:  docbook-dtds
76159c2
BuildRequires:  docbook-style-xsl
76159c2
# For nodejs macros
76159c2
BuildRequires:  nodejs-packaging
76159c2
# For JS macros
76159c2
BuildRequires:  web-assets-devel
76159c2
76159c2
# These are the only architectures upstream supports currently...
76159c2
ExclusiveArch:  x86_64 %{ix86} %{arm}
76159c2
76159c2
Requires:       npm(Flot)
76159c2
Requires:       js-highlight
76159c2
Requires:       js-jquery
76159c2
Recommends:     optipng
76159c2
76159c2
%description
76159c2
appstream-generator is a tool to generate distribution metadata
76159c2
from package repositories. It will extract icons, download
76159c2
screenshots, validate and transform the metadata, and return
76159c2
XML or YAML files that can be read by AppStream clients,
76159c2
such as software centers. It will also generate issue reports
76159c2
as JSON documents and HTML pages.
76159c2
76159c2
%prep
25af283
%autosetup -p1
76159c2
76159c2
76159c2
%build
76159c2
# Drop '-specs=/usr/lib/rpm/redhat/redhat-hardened-ld' as LDC doesn't support it
76159c2
export LDFLAGS="-Wl,-z,relro"
76159c2
# Export DFLAGS
76159c2
export DFLAGS="%{_d_optflags}"
25af283
%meson -Ddownload-js=false
76159c2
%meson_build
76159c2
76159c2
76159c2
%install
76159c2
%meson_install
76159c2
76159c2
# link in JavaScript libraries...
76159c2
mkdir -p %{buildroot}%{asgen_jsdir}/jquery
76159c2
ln -srf %{buildroot}%{_jsdir}/jquery/latest/jquery.min.js %{buildroot}%{asgen_jsdir}/jquery/jquery.min.js
76159c2
mkdir -p %{buildroot}%{asgen_jsdir}/highlight
76159c2
ln -srf %{buildroot}%{_jsdir}/highlight.js/highlight.pack.js %{buildroot}%{asgen_jsdir}/highlight/highlight.pack.js
76159c2
ln -srf %{buildroot}%{nodejs_sitelib}/flot/ %{buildroot}%{asgen_jsdir}/flot
76159c2
76159c2
76159c2
%check
76159c2
%meson_test
76159c2
76159c2
76159c2
%files
76159c2
%license LICENSE
76159c2
%doc MAINTAINERS NEWS README.md TODO
76159c2
%{_bindir}/appstream-generator
76159c2
%{_mandir}/man1/appstream-generator.1*
76159c2
%{_datadir}/appstream/
76159c2
%{_datadir}/metainfo/org.freedesktop.appstream.generator.metainfo.xml
76159c2
76159c2
%changelog
47d657f
* Mon Feb 18 2019 Kalev Lember <klember@redhat.com> - 0.7.4-2
47d657f
- Rebuilt for ldc 1.14
47d657f
927e7b5
* Sat Feb 02 2019 Neal Gompa <ngompa13@gmail.com> - 0.7.4-1
927e7b5
- Rebase to 0.7.4 (#1563877)
927e7b5
f3ff843
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.8-4
f3ff843
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
f3ff843
d603500
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.8-3
d603500
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
d603500
76d8993
* Mon Jul 09 2018 Kalev Lember <klember@redhat.com> - 0.6.8-2
76d8993
- Rebuilt for ldc 1.11
76d8993
25af283
* Wed Feb 21 2018 Neal Gompa <ngompa13@gmail.com> - 0.6.8-1
25af283
- Update to 0.6.8 (#1544598)
25af283
26e49fb
* Mon Feb 19 2018 Kalev Lember <klember@redhat.com> - 0.6.7-3
26e49fb
- Rebuilt for ldc 1.8
26e49fb
5cfb31f
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.7-2
5cfb31f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
5cfb31f
76159c2
* Sun Oct  8 2017 Neal Gompa <ngompa13@gmail.com> - 0.6.7-1
76159c2
- Initial packaging for Fedora (#1498468)