appstream-glib/openSUSE-appstream-process
Bjørn Lie 900248b32c Accepting request 425614 from GNOME:Next
- Update openSUSE-appstream-process:
  + Do not include -failed.xml.gz: people complain about the
    additional ~ 100KB zypp downloads on a repodata refresh at 'no
    value for them'. The failed.xml.gz is not needed for regular
    operations, but was a great help for packagers to find out why
    their app was vetoed. They will need to find different ways to
    get this info.
  + Rename appdata-screenshots.tar to appdata-screenshots-$HASH.tar
    to help mirrorbrain offload this file to mirrors.

- Add appstream-glib-lang.patch:  Add -lang package as a dependency
  in order to properly detect translations.

- Update to version 0.6.2:
  + New Features:
    - Add a hash function specifically designed for unique-ids.
    - Add AS_BUNDLE_KIND_CABINET.
    - Remove the inf parsing from appstream-glib.
  + Bugfixes:
    - Check if icon name is unset before checking the prefix.
    - Do not merge all LangPack entries.
    - Do not require an icon from LOCALIZATION kind.
    - Do not use the deprecated GNOME_COMPILE_WARNINGS.
    - Do not use the prefix check when parsing YAML.
    - Fix gcc shift warnings on 32 bit platforms.
    - Ignore system datadirs that are actually per-user.
    - Invalidate the unique-id if any of the parts are changed.
    - Make upgrade check for SPDX license string.
    - Pay attention to errors from libyaml
      (gh#hughsie/appstream-glib#129).

OBS-URL: https://build.opensuse.org/request/show/425614
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/appstream-glib?expand=0&rev=80
2016-09-08 08:30:53 +00:00

62 lines
1.8 KiB
Bash

#!/bin/bash
SRC=$1
DEST=$2
URL=https://static.opensuse.org/appstream/tumbleweed
# Do not produce the html files - the biggest tasks are done
# Users interested in them can always produce them locally out of the appdata.xml.gz file
HTMLOUT=no
TMPDIR=$(mktemp -d)
/usr/bin/appstream-builder \
--enable-hidpi \
--temp-dir=${TMPDIR}/apb \
--cache-dir=${TMPDIR}/apb/cache \
--origin=appdata \
--basename=appdata \
--packages-dir=${SRC} \
--output-dir=${DEST}
# clean up TMPDIR again
rm -rf ${TMPDIR}
# Change screenshot URLs to our own infrastructure; disabled, as infra not ready
# appstream-util mirror-screenshots \
# ${DEST}/appdata.xml.gz \
# ${URL} \
# /usr/share/app-screenshots \
# /tmp/apb-screenshots
if [ "$HTMLOUT" = "yes" ]; then
/usr/bin/appstream-util \
status-html \
${DEST}/appdata.xml.gz \
${DEST}/appdata.html
# compress the HTML file (boo#942985)
xz -9 ${DEST}/appdata.html
/usr/bin/appstream-util \
status-html \
${DEST}/appdata-failed.xml.gz \
${DEST}/appdata-failed.html
# compress the HTML file (boo#942985)
xz -9 ${DEST}/appdata-failed.html
fi
# rename the appdata-icons.tar.gz tarball to something like
# appdata-icons-${hash}.tar.gz, allowing mirrorbrain to send users
# off to a mirror to catch the file, improving performance
read md5 fn_catchall <<<$(md5sum ${DEST}/appdata-icons.tar.gz)
mv ${DEST}/appdata-icons.tar.gz ${DEST}/appdata-icons-${md5}.tar.gz
# also rename the appdata.xml.gz file in the same style
read md5 fn_catchall <<<$(md5sum ${DEST}/appdata.xml.gz)
mv ${DEST}/appdata.xml.gz ${DEST}/appdata-${md5}.xml.gz
# And the same for the -screenshots tarball (containing auto-generated screenshots for fonts)
read md5 fn_catchall <<<$(md5sum ${DEST}/appdata-screenshots.tar)
mv ${DEST}/appdata-screenshots.tar ${DEST}/appdata-screenshots-${md5}.tar