diff --git a/app-antivirus/drweb-workstation/Manifest b/app-antivirus/drweb-workstation/Manifest new file mode 100644 index 0000000..9440200 --- /dev/null +++ b/app-antivirus/drweb-workstation/Manifest @@ -0,0 +1,2 @@ +DIST drweb-11.1.4-av-linux-amd64.run 673883433 BLAKE2B 7c677d93df3db4f69e5cbd428b2e300c03e5d9e52dd238446e7abca4dcd58209e83e55ae88441ce829ea095d13dbcc832317c23c903958884e0c695534c43f85 SHA512 c6ab6cc4d8fbece0c4c337097999cb8506ff9b671f6afcac2d77d511e66fa543a4683417740fe6c322fc6bb988c7afd4fc3f8294797caf323a97cdfd240fdc73 +DIST drweb-11.1.4-av-linux-x86.run 675896534 BLAKE2B 0e74bcfe28149750adcd3de492132d372abbc9f93b058005a573482562d40887ab1bd5ff000c9a243b94bbb9b7e7dc2d43136b84dc1656b659e677a549ac88ec SHA512 d394475453a1f5906a1a71caadfaa2453de4975016792249e511773dd2ff10eebc59a4f3092ebd1eaa96c7283333aa51d8b584e37fdfae1fe302fa2de4f3c1fb diff --git a/app-antivirus/drweb-workstation/drweb-workstation-11.1.4.ebuild b/app-antivirus/drweb-workstation/drweb-workstation-11.1.4.ebuild new file mode 100644 index 0000000..3d7f02b --- /dev/null +++ b/app-antivirus/drweb-workstation/drweb-workstation-11.1.4.ebuild @@ -0,0 +1,108 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop xdg + +DESCRIPTION="Dr.Web for Linux Workstations" +HOMEPAGE="https://www.drweb.ru/" + +SRC_URI=" + + x86? ( + http://cdn-download.drweb.com/pub/drweb/unix/workstation/11.1/drweb-${PV}-av-linux-x86.run + ) + amd64? ( + http://cdn-download.drweb.com/pub/drweb/unix/workstation/11.1/drweb-${PV}-av-linux-amd64.run + ) +" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" +RESTRICT="bindist strip mirror" + +S=${WORKDIR} + +src_unpack() { + + "${DISTDIR}/${A}" --tar xfC ${S} || die + +} + +pkg_preinst() { + + # Sandbox Disabled + + # Запускаем установку + ${S}/install.sh --non-interactive || die + + # Правим сценарий запуска для работы с open-rc + sed -i -E -e '78a\# < Добавление для open-rc >\n elif which rc-service >/dev/null 2>&1; then\ + start-stop-daemon --start --exec "${DAEMON}" \\\ + --pidfile "${PIDFILE}" -- -d -p ${PIDFILE}\n\# < Добавление для open-rc />' /etc/init.d/drweb-configd + + sed -i -E -e '112a\# < Добавление для open-rc >\n elif which rc-service >/dev/null 2>&1; then\ + start-stop-daemon --stop --exec "${DAEMON}" \\\ + --pidfile "${PIDFILE}"\n\# < Добавление для open-rc />' /etc/init.d/drweb-configd + + sed -i -E -e '143a\# < Добавление для open-rc >\n elif which rc-service >/dev/null 2>&1; then\ + start-stop-daemon --signal HUP \\\ + --exec "${DAEMON}" --pidfile "${PIDFILE}"\n\# < Добавление для open-rc />' /etc/init.d/drweb-configd + + sed -i -E -e '160a\# < Добавление для open-rc >\n elif which rc-service >/dev/null 2>&1; then\ + start-stop-daemon --stop --exec "${DAEMON}" \\\ + --pidfile "${PIDFILE}" || \\\ + start-stop-daemon --start --exec "${DAEMON}" \\\ + --pidfile "${PIDFILE}" -- -d -p ${PIDFILE}\n\# < Добавление для open-rc />' /etc/init.d/drweb-configd + +} + +pkg_postinst() { + + # Добавляем службы в автозагрузку + if which systemctl >/dev/null 2>&1; then + systemctl enable drweb-configd >/dev/null 2>&1 && elog "Служба drweb-configd установлена" + + elif which update-rc.d >/dev/null 2>&1; then + update-rc.d drweb-configd defaults 90 10 >/dev/null 2>&1 && elog "Служба drweb-configd установлена" + + elif which rc-update >/dev/null 2>&1; then + rc-update add drweb-configd default >/dev/null 2>&1 && elog "Служба drweb-configd установлена" + fi + + [ -x /etc/init.d/drweb-configd ] && /etc/init.d/drweb-configd start + + xdg_desktop_database_update + xdg_icon_cache_update + +} + +pkg_prerm() { + + if [ "${REPLACED_BY_VERSION}" = "" ]; then + elog "Пакет окончательно удаляется" + /opt/drweb.com/bin/remove.sh --non-interactive || die + elog "Если желаете, то можете вручную удалить старые данные командой:" + elog "# rm -rf /var/opt/drweb.com" + + # Удаляем службы + if which systemctl >/dev/null 2>&1; then + systemctl disable drweb-configd >/dev/null 2>&1 + elif which update-rc.d >/dev/null 2>&1; then + update-rc.d -f drweb-configd remove >/dev/null 2>&1 + elif which rc-update >/dev/null 2>&1; then + rc-update del drweb-configd >/dev/null 2>&1 + fi + fi + +} + +pkg_postrm() { + + xdg_desktop_database_update + xdg_icon_cache_update + +}