Commit 3f5c92d4 authored by Boris Yumankulov's avatar Boris Yumankulov Committed by Vitaly Lipatov

epm play freeoffice: drop year from PKGNAME (eterbug #17849)

parent 000d06b1
#!/bin/sh
TAR="$1"
RETURNTARNAME="$2"
URL="$4"
. $(dirname $0)/common.sh
VERSION=$(echo "$URL" | grep -oP 'softmaker-freeoffice-[0-9]+-\K[0-9]+')
YEAR=$(echo "$URL" | grep -oP 'softmaker-freeoffice-\K[0-9]{4}')
[ -n "$VERSION" ] || fatal "Can't get package version"
PKGNAME=$PRODUCT-$VERSION
mkdir -p opt/softmaker-freeoffice
mkdir -p usr/bin
erc $TAR || fatal
erc $(basename $TAR .tgz)/freeoffice$YEAR.tar.lzma || fatal
mv freeoffice$YEAR/* opt/$PRODUCT
cat <<EOF > usr/bin/planmaker
#!/bin/sh
# A script to run PlanMaker.
/opt/softmaker-freeoffice/planmaker "\$@"
EOF
cat <<EOF > usr/bin/textmaker
#!/bin/sh
# A script to run TextMaker
/opt/softmaker-freeoffice/textmaker "\$@"
EOF
cat <<EOF > usr/bin/presentations
#!/bin/sh
# A script to run Presentations
/opt/softmaker-freeoffice/presentations "\$@"
EOF
chmod 755 usr/bin/planmaker
chmod 755 usr/bin/textmaker
chmod 755 usr/bin/presentations
erc pack $PKGNAME.tar opt usr || fatal
return_tar $PKGNAME.tar
#!/bin/sh
PKGNAME=softmaker-freeoffice-2021
PKGNAME=softmaker-freeoffice
SUPPORTEDARCHES="x86_64"
VERSION="$2"
DESCRIPTION="SoftMaker Free Office from the official site"
......@@ -8,16 +8,7 @@ TIPS="Run epm play freeoffice=<version> to install some specific version"
. $(dirname $0)/common.sh
pkgtype=$(epm print info -p)
case $pkgtype in
rpm)
file="softmaker-freeoffice-$VERSION*.x86_64.rpm"
;;
*)
file="softmaker-freeoffice-$VERSION*_amd64.deb"
;;
esac
PKGURL="$(eget --list --latest https://www.freeoffice.com/ru/download/applications "$file")"
PKGURL="$(eget --list --latest https://www.freeoffice.com/ru/download/applications "softmaker-freeoffice-$VERSION*-amd64.tgz")"
install_pkgurl
install_pack_pkgurl
#!/bin/sh -x
# It will be run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
PRODUCT=freeoffice2021
PRODUCTDIR=/usr/share/freeoffice2021
VERSION=free21
. $(dirname $0)/common.sh
remove_file $PRODUCTDIR/add_rpm_repo.sh
add_requires coreutils file gawk grep sed xprop
#use_system_xdg $PRODUCTDIR/mime/xdg-utils
remove_dir $PRODUCTDIR/mime/xdg-utils
for i in planmaker presentations textmaker ; do
install_file $PRODUCTDIR/mime/$i-$VERSION.desktop /usr/share/applications/$i-$VERSION.desktop
done
cd $BUILDROOT$PRODUCTDIR || fatal
epm install --skip-installed xdg-utils
THEME=hicolor
# as in desktop files
FREENAME=free
for i in 16 24 32 48 64 128 256 512 1024 ; do
for app in prl tml pml ; do
install_file icons/${app}_$i.png /usr/share/icons/$THEME/${i}x${i}/apps/application-x-"$app"21"$FREENAME".png
done
done
# TODO: improve mime associations, icons
install_mimetypes_icon()
{
local size="$1"
shift
local app="$1"
shift
local v
for v in $* ; do
install_file icons/${app}_$size.png /usr/share/icons/$THEME/${size}x${size}/mimetypes/$v.png
done
}
for i in 48 16 32 64 128 ; do
install_mimetypes_icon $i tmd application-x-tmd application-x-tmv
# app='tmd_mso'
# for VAR in application-rtf text-rtf application-msword application-msword-template application-vnd.ms-word application-x-doc application-x-pocket-word application-vnd.openxmlformats-officedocument.wordprocessingml.document application-vnd.openxmlformats-officedocument.wordprocessingml.template application-vnd.ms-word.document.macroenabled.12 application-vnd.ms-word.template.macroenabled.12 ; do
# app='tmd_oth'
# for VAR in application-x-pocket-word application-vnd.oasis.opendocument.text text-rtf application-vnd.sun.xml.writer application-vnd.sun.xml.writer.template application-vnd.wordperfect application-vnd.oasis.open
install_mimetypes_icon $i pmd application-x-pmd application-x-pmv application-x-pmdx application/x-pagemaker
# app='pmd_mso'
# for VAR in application-x-sylk application-excel application-x-excel application-x-ms-excel application-x-msexcel application-x-xls application-xls application-vnd.ms-excel application-vnd.openxmlformats-officedocument.spreadsheetml.sheet application-vnd.openxmlformats-officedocument.spreadsheetml.template application-vnd.ms-excel.sheet.macroenabled.12 application-vnd.ms-excel.template.macroenabled.12 text-spreadsheet ; do
# app='pmd_oth'
# for VAR in text-csv application-x-dif application-x-prn application-vnd.stardivision.calc ; do
install_mimetypes_icon $i prd application-x-prd application-x-prs application-x-prv
# app='prd_mso'
# for VAR in application-ppt application-mspowerpoint application-vnd.ms-powerpoint application-vnd.ms-powerpoint.presentation.macroenabled.12 application-vnd.ms-powerpoint.slideshow.macroEnabled.12 application-vnd.openxmlformats-officedocument.presentationml.presentation application-vnd.openxmlformats-officedocument.presentationml.template application-vnd.openxmlformats-officedocument.presentationml.slideshow ; do
done
# CHECKME
install_file $PRODUCTDIR/mime/softmaker-freeoffice21.xml /usr/share/mime/application/softmaker-freeoffice21.xml
install_file $PRODUCTDIR/mime/softmaker-freeoffice21.mime /usr/share/mime-info/softmaker-freeoffice21.mime
env ERC_BACKEND="7z" use_7z=1 epm tool erc dwr.tar.lzma || fatal
# override stub files
subdir=dwr
[ -d "$subdir" ] || subdir=dwr.tar
mv -v $subdir/* . || fatal
remove_file $PRODUCTDIR/dwr.tar.lzma
add_libs_requires
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