wok annotate lynis/receipt @ rev 25361

sshrc: typo in wget_url
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jul 27 16:25:20 2022 +0000 (2022-07-27)
parents 7cfc423aaa00
children 7364ffdaaa60
rev   line source
pascal@14512 1 # SliTaz package receipt.
pascal@14512 2
pascal@14512 3 PACKAGE="lynis"
Hans-G?nter@24873 4 VERSION="3.0.7"
pascal@14512 5 CATEGORY="security"
pascal@14512 6 SHORT_DESC="Security and system auditing tool."
pascal@14512 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@14997 8 LICENSE="GPL3"
pascal@20414 9 WEB_SITE="https://cisofy.com/lynis/"
Hans-G?nter@21398 10
pascal@14512 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@20414 12 WGET_URL="https://downloads.cisofy.com/lynis/$TARBALL"
pascal@14512 13
Hans-G?nter@24316 14 SUGGESTED="findutils grep groff perl procps rpm4 wget"
pascal@14512 15 DEPENDS=""
pascal@14512 16 BUILD_DEPENDS=""
pascal@14512 17
pascal@24319 18 # What is the latest version available today?
pascal@24319 19 current_version()
pascal@24319 20 {
pascal@24319 21 wget -O - https://github.com/CISOfy/lynis/releases 2>/dev/null | \
pascal@24319 22 sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q'
pascal@24319 23 }
pascal@24319 24
pascal@14512 25 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@14512 26 genpkg_rules()
pascal@14512 27 {
Hans-G?nter@21398 28 mkdir -p $fs/usr/share
Hans-G?nter@21398 29 mkdir -p $fs/usr/sbin
Hans-G?nter@21398 30 mkdir -p $install/usr/share/man
Hans-G?nter@21398 31 mkdir -p $install/usr/share/doc
Hans-G?nter@21398 32
Hans-G?nter@21398 33 cp $src/[A-Z]* $install/usr/share/doc
Hans-G?nter@21398 34 cp $src/lynis.8 $install/usr/share/man
Hans-G?nter@21398 35 cp -a $src $fs/usr/share/lynis
Hans-G?nter@21398 36
pascal@20416 37 sed -i "s!| grep \"\\^GNU Wget\" | awk '{ print \$3 !\
pascal@20416 38 2>\\&1 | awk '/^GNU Wget/{ print $3 }/^BusyBox/{ print \$1 \"/\" substr(\$2,2)!\
pascal@20416 39 " $fs/usr/share/lynis/include/binaries
pascal@20417 40 sed -i '/Generic/a\
pascal@20417 41 [ -s /etc/slitaz-release ] && LINUX_VERSION="SliTaz GNU/Linux" &&\
pascal@20417 42 OS_VERSION="$(cat /etc/slitaz-release)" &&\
pascal@20417 43 OS_FULLNAME="$LINUX_VERSION $OS_VERSION"' \
pascal@20417 44 $fs/usr/share/lynis/include/osdetection
pascal@20414 45 cat > $fs/usr/sbin/lynis <<EOT
pascal@20414 46 #!/bin/sh
pascal@20414 47
pascal@20414 48 cd /usr/share/lynis
pascal@20416 49 exec ./lynis "\$@"
pascal@20414 50 EOT
Hans-G?nter@21398 51
Hans-G?nter@23154 52 chown -R root.root $fs/usr/s*/lynis
Hans-G?nter@23154 53 chmod +x $fs/usr/sbin/lynis
pascal@14512 54 }