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