Unverified Commit 75cde144 authored by CatSema's avatar CatSema Committed by GitHub

epm play: add spravki-bk (#480)

parent 7972284f
#!/bin/sh
TAR="$1"
RETURNTARNAME="$2"
. $(dirname $0)/common.sh
# Extract the archive
erc "$TAR" || fatal
# Find the deb file in extracted content
PKG=$(find . -name "*.deb" -type f | head -1)
if [ -z "$PKG" ]; then
fatal "DEB file is not found in archive"
fi
return_tar "$PKG"
#!/bin/sh
PKGNAME=spravki-bk
SUPPORTEDARCHES="x86_64"
VERSION="$2"
DESCRIPTION="Система подготовки отчетности «Справки БК»"
URL="http://www.kremlin.ru/structure/additional/12/"
. $(dirname $0)/common.sh
warn_version_is_not_supported
# Get download URL for Astra Linux version from kremlin.ru
PKGURL=$(eget -q -O- http://www.kremlin.ru/structure/additional/12/ | grep -B1 "для Astra Linux" | grep -o 'href="[^"]*"' | sed 's/href="//;s/"//' | head -n 2 | tail -n 1)
install_pack_pkgurl
#!/bin/sh -x
# It will be run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
PRODUCT=spravki-bk
PRODUCTDIR=/opt/$PRODUCT
. $(dirname $0)/common.sh
# Fix problematic directory with CR character in name
cd "$BUILDROOT$PRODUCTDIR/resources/bin/" || exit 1
if [ -d "%sbk-cleaner-path%"$'\r' ]; then
mv "%sbk-cleaner-path%"$'\r' "%sbk-cleaner-path%"
fi
# Replace paths with \r in SPEC file
sed -i 's|%sbk-cleaner-path%\r|%sbk-cleaner-path%|g' "$SPEC"
# Remove incorrect desktop file and install proper icon
remove_file /usr/share/applications/sbk.desktop
install_file $PRODUCTDIR/resources/bin/ClientApp/build/logo.svg /usr/share/icons/hicolor/scalable/apps/$PRODUCT.svg
# Create binary link for command line execution
add_bin_link_command $PRODUCT $PRODUCTDIR/sbk
# Set correct permissions for chrome-sandbox (SUID bit required)
fix_chrome_sandbox $PRODUCTDIR/chrome-sandbox
# Create proper desktop file
cat <<EOF | create_file /usr/share/applications/$PRODUCT.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=СПО "Справки БК"
Comment=Система подготовки отчетности "Справки БК"
Icon=$PRODUCT
Exec=$PRODUCT
Categories=Office;
Terminal=false
EOF
# Add libgdiplus dependency
add_unirequires libgdiplus.so.0
# Create symbolic link for libgdiplus.so.0 in product directory
ln -sf /usr/lib64/libgdiplus.so.0 $PRODUCTDIR/resources/bin/libgdiplus.so
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