#!/bin/bash
# this is only suitable for fonts- packages for now
# alex@aiei.ch
if [ "${1}"x == x ]; then
echo usage: $0 debian-package
echo
echo You are supposed manually verify the output, and save it to
echo whatever.metainfo.xml and install that via debian/install to
echo usr/share/metainfo
exit 0
fi
#links2 -dump https://sources.debian.org/src/$1/
fontname=`echo $1 | sed "s,fonts-,,"`
homepage=`apt-cache show $1 | grep ^Homepage | sed "s,.*: ,,"`
shortdesc=`apt-cache show $1 | grep -v md5: | grep ^Description | sed "s,.*: ,,"`
longdesc=`apt-cache show $1 | grep "^ "`
license=``
cat << EOF
${1}
MIT
OFL-1.1
${fontname^}
${shortdesc}
${longdesc}
${homepage}
${DEBEMAIL}
EOF
exit 0
http