1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
PKGNAME=r7-organizer_pro
SUPPORTEDARCHES="x86_64"
VERSION="$2"
DESCRIPTION="R7 Office Organizer Pro for Linux from the official site"
URL="https://r7-office.ru/downloadorganizer"
# fixme: global epm is used
case $(epm print info -e) in
ALTLinux/*)
PKGNAME="r7organizer"
# force latest version due broken package name
VERSION="*"
;;
esac
. $(dirname $0)/common.sh
# hack with release part
[ "$VERSION" = "*" ] || VERSION="$VERSION-1"
#arch=$(epm print info --distro-arch)
case $(epm print info -p) in
rpm)
mask="centos/r7organizer_pro-$VERSION.x86_64.rpm"
;;
*)
mask="ubuntu/r7-organizer_pro_${VERSION}_amd64.deb"
;;
esac
case $(epm print info -e) in
AstraLinuxSE/*)
mask="astra/r7-organizer_pro_${VERSION}_astralinux-signed_amd64.deb"
;;
ALTLinux/*)
mask="alt/r7organizer_pro-${VERSION}_altlinux.x86_64.rpm"
#override_pkgname "r7organizer"
;;
esac
if [ "$VERSION" = "*" ] ; then
PKGURL=$(eget -U --list --latest "https://r7-office.ru/downloadorganizer" "$mask")
else
PKGURL="https://download.r7-office.ru/organizer/$mask"
fi
# install with scripts (need for install icons and associations)
# see /etc/eepm/pkgallowscripts.list
# TODO: pack it into the package
epm install --scripts "$PKGURL"