clamav/clamav-clean.sh

30 lines
1.1 KiB
Bash
Raw Normal View History

2021-06-22 22:36:50 +00:00
VERSION=0.103.3
2018-07-12 03:16:22 +00:00
NAME=clamav
2018-10-04 05:58:44 +00:00
TARBALL_CLEAN=${NAME}-${VERSION}-norar.tar.xz
2018-07-12 03:16:22 +00:00
TARBALL=${NAME}-${VERSION}.tar.gz
wget https://www.clamav.net/downloads/production/${TARBALL}
wget https://www.clamav.net/downloads/production/${TARBALL}.sig
gpg --verify ${TARBALL}.sig ${TARBALL}
2018-10-04 05:58:44 +00:00
zcat ${TARBALL} | tar --delete -f - '*/libclamunrar/*' | xz -c > ${TARBALL_CLEAN}
2021-04-08 10:34:50 +00:00
2021-06-22 22:36:50 +00:00
# WIP clouflare don't allow wget we need download with browser
2021-04-08 10:34:50 +00:00
wget http://database.clamav.net/main.cvd
wget http://database.clamav.net/daily.cvd
wget http://database.clamav.net/bytecode.cvd
main_ver=$(file main.cvd | sed -e 's/.*version /main-/;s/,.*/.cvd/')
daily_ver=$(file daily.cvd | sed -e 's/.*version /daily-/;s/,.*/.cvd/')
bytecode_ver=$(file bytecode.cvd | sed -e 's/.*version /bytecode-/;s/,.*/.cvd/')
cp main.cvd $main_ver
cp daily.cvd $daily_ver
cp bytecode.cvd $bytecode_ver
sed -i "s|^Source10: .*|Source10: $main_ver|" clamav.spec
sed -i "s|^Source11: .*|Source11: $daily_ver|" clamav.spec
sed -i "s|^Source12: .*|Source12: $bytecode_ver|" clamav.spec
2021-06-22 22:36:50 +00:00
echo fedpkg new-sources ${TARBALL_CLEAN} $main_ver $daily_ver $bytecode_ver