Commit f8e1fc87 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm eepm.yaml related improvements

parent 9b7d3929
......@@ -25,6 +25,14 @@ PKGNAME=$PRODUCT-$VERSION.tar
[ -x "$TAR" ] || chmod u+x $verbose "$TAR"
$TAR --appimage-extract || fatal
cat <<EOF >$PKGNAME.eepm.yaml
name: $PRODUCT
version: $VERSION
upstream_file: $alpkg
generic_repack: appimage
EOF
erc pack $PKGNAME squashfs-root
return_tar $PKGNAME
......@@ -16,12 +16,16 @@ alpkg=$(basename $TAR)
epm assure unsquashfs squashfs-tools || fatal
a= unsquashfs $TAR || fatal
# name: plex-desktop
# version: 1.69.1
# summary: Plex for Linux
# description:
eval $(epm tool yaml squashfs-root/meta/snap.yaml | head | grep -E "(name|version|summary|description)=")
cat <<EOF >eepm.yaml
PKGNAME=$name-$version.tar
cat <<EOF >$PKGNAME.eepm.yaml
name: $name
version: $version
summary: $summary
......@@ -30,12 +34,10 @@ upstream_file: $alpkg
generic_repack: snap
EOF
PKGNAME=$name-$version.tar
install_file meta/gui/icon.png /usr/share/pixmaps.png
install_file meta/gui/*.desktop /usr/share/applications/$name.desktop
sed -i -e 's|^Icon=.*|Icon=$name|' usr/share/applications/$name.desktop
erc pack $PKGNAME squashfs-root eepm.yaml
erc pack $PKGNAME squashfs-root
return_tar $PKGNAME
......@@ -73,5 +73,19 @@ subst "s|^Release: |Release: epm1.repacked.|" $SPEC
set_rpm_field "Distribution" "EEPM"
if [ -r "$PKG.eepm.yaml" ] ; then
eval $(epm tool yaml $PKG.eepm.yaml | grep -E '(summary|description|upstream_file|upstream_url|url|appname|arches|group|license)=' ) #'
# for tarballs fix permissions
chmod $verbose -R a+rX *
set_rpm_field "Group" "$group"
set_rpm_field "License" "$license"
set_rpm_field "URL" "$url"
set_rpm_field "Summary" "$summary"
[ -n "$upstream_file" ] || upstream_file="binary package $PRODUCT"
[ -n "$upstream_url" ] && upstream_file="$upstream_url"
[ -n "$description" ] && subst "s|^\((Converted from a\) \(.*\) \(package.*\)|$description\n(Repacked from $upstream_file with $(epm --short --version))\n\1 \2 \3|" $SPEC
else
subst "s|^\((Converted from a\) \(.*\) \(package.*\)|(Repacked from binary \2 package with $(epm --short --version))\n\1 \2 \3|" $SPEC
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment