wok annotate kismet/receipt @ rev 24968
gnutls: disabled GOST support
author | Hans-G?nter Theisgen |
---|---|
date | Tue Apr 26 13:11:21 2022 +0100 (2022-04-26) |
parents | 6e8b1bcb30e2 |
children |
rev | line source |
---|---|
domcox@1021 | 1 # SliTaz package receipt. |
domcox@1021 | 2 |
domcox@1021 | 3 PACKAGE="kismet" |
devl547@11306 | 4 VERSION="2011-03-R2" |
domcox@1022 | 5 CATEGORY="network" |
domcox@1021 | 6 SHORT_DESC="Wireless network monitoring tool" |
pascal@13025 | 7 MAINTAINER="domcox@slitaz.org" |
pascal@15065 | 8 LICENSE="GPL2" |
domcox@1021 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@20671 | 10 WEB_SITE="https://www.kismetwireless.net" |
pascal@20669 | 11 WGET_URL="https://www.kismetwireless.net/code/$TARBALL" |
jozee@4942 | 12 TAGS="wireless network monitor" |
domcox@1021 | 13 |
erjo@9936 | 14 DEPENDS="dbus libnl libpcap ncurses pcre libcap attr" |
pascal@16805 | 15 BUILD_DEPENDS="pkg-config libpcap-dev ncurses-dev libnl-dev" |
erjo@9936 | 16 |
pascal@24445 | 17 # What is the latest version available today? |
pascal@24445 | 18 current_version() |
pascal@24445 | 19 { |
pascal@24445 | 20 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \ |
pascal@24445 | 21 sed '/kismet-[0-9]/!d;/tar/!d;s|.*kismet-||;s|.tar.*||' | sort -Vr | sed q |
pascal@24445 | 22 } |
pascal@24445 | 23 |
domcox@1021 | 24 # Rules to configure and make the package. |
domcox@1021 | 25 compile_rules() |
domcox@1021 | 26 { |
pascal@17673 | 27 export LDFLAGS="$LDFLAGS -ltinfo" |
pascal@15065 | 28 touch -d 197001010000 .depend |
domcox@1898 | 29 ./configure \ |
domcox@1898 | 30 --prefix=/usr \ |
domcox@1898 | 31 --sysconfdir=/etc/kismet \ |
domcox@1898 | 32 $CONFIGURE_ARGS && \ |
domcox@1898 | 33 make && \ |
slaxemulator@9588 | 34 make DESTDIR=$DESTDIR install |
domcox@1021 | 35 } |
domcox@1021 | 36 |
domcox@1021 | 37 # Rules to gen a SliTaz package suitable for Tazpkg. |
domcox@1021 | 38 genpkg_rules() |
domcox@1021 | 39 { |
domcox@1021 | 40 mkdir -p $fs/usr |
pascal@15065 | 41 cp -a $install/usr/bin $fs/usr |
domcox@3626 | 42 cp -a $src/kismet_capture $fs/usr/bin |
domcox@1021 | 43 mkdir -p $fs/etc |
pascal@15065 | 44 cp -a $install/etc/kismet $fs/etc |
domcox@3622 | 45 # do not overwrite existing configuration |
domcox@1898 | 46 mv $fs/etc/kismet/kismet.conf $fs/etc/kismet/kismet.conf.new |
domcox@1898 | 47 mv $fs/etc/kismet/kismet_drone.conf $fs/etc/kismet/kismet_drone.conf.new |
domcox@1021 | 48 } |
domcox@1898 | 49 |
domcox@1898 | 50 post_install() |
domcox@1898 | 51 { |
domcox@3443 | 52 # addgroup kismet if needed |
pascal@18730 | 53 if ! grep -q kismet "$1/etc/group"; then |
domcox@3443 | 54 echo -n "Adding group kismet..." |
pascal@18730 | 55 chroot "$1/" addgroup -g 315 kismet |
domcox@3443 | 56 status |
domcox@3443 | 57 fi |
domcox@3443 | 58 # Add tux to kismet group |
pascal@18730 | 59 chroot "$1/" addgroup tux kismet |
domcox@3443 | 60 # set Kismet as suid-root |
domcox@3443 | 61 echo -n "Set Kismet as suid-root.." |
pascal@18730 | 62 chroot "$1/" chown root:kismet /usr/bin/kismet_capture && \ |
pascal@18730 | 63 chroot "$1/" chmod 4550 /usr/bin/kismet_capture |
domcox@3443 | 64 status |
domcox@3443 | 65 # configuration files update |
domcox@1898 | 66 create=1 |
domcox@1898 | 67 overwrite=2 |
domcox@1898 | 68 keep=3 |
pascal@18730 | 69 cd "$1/etc/kismet" |
domcox@3622 | 70 # kismet_ui.conf doesn't exists anymore |
domcox@3622 | 71 if [ -e kismet_ui.conf ]; then |
domcox@3622 | 72 mv kismet_ui.conf kismet_ui.oldpkg |
domcox@3622 | 73 fi |
domcox@3622 | 74 for file in "kismet" "kismet_drone" |
domcox@1898 | 75 do |
domcox@3443 | 76 # check current files version |
domcox@1898 | 77 if [ ! -e $file.conf ]; then |
domcox@1898 | 78 action=$create |
domcox@1898 | 79 else |
domcox@1898 | 80 current=`grep version= $file.conf` |
domcox@1898 | 81 new=`grep version= $file.conf.new` |
domcox@1898 | 82 if [ "$current" = "$new" ]; then |
domcox@1898 | 83 action=$keep |
domcox@1898 | 84 else |
domcox@1898 | 85 action=$overwrite |
domcox@1898 | 86 fi |
domcox@1898 | 87 fi |
domcox@3443 | 88 # update if needed |
domcox@1898 | 89 case $action in |
domcox@1898 | 90 $create) |
domcox@1898 | 91 mv $file.conf.new $file.conf |
domcox@1898 | 92 ;; |
domcox@1898 | 93 $keep) |
domcox@1898 | 94 rm $file.conf.new |
domcox@3443 | 95 warning="keep" |
domcox@1898 | 96 ;; |
domcox@1898 | 97 $overwrite) |
domcox@3443 | 98 mv $file.conf $file.conf.oldpkg |
domcox@1898 | 99 mv $file.conf.new $file.conf |
domcox@3443 | 100 warning=$overwrite |
domcox@3443 | 101 echo "Warning: /etc/kismet/$file.conf new version from upstream" |
domcox@1898 | 102 ;; |
domcox@1898 | 103 esac |
domcox@1898 | 104 done |
domcox@3443 | 105 if [ "$warning" != "keep" ]; then |
domcox@3443 | 106 echo "-----" |
domcox@3443 | 107 echo "You MUST edit etc/kismet/kismet.conf and configure Kismet" |
domcox@3443 | 108 echo "for your system, or it will NOT run properly!" |
domcox@3443 | 109 fi |
pascal@18707 | 110 true |
domcox@1898 | 111 } |
domcox@3443 | 112 |
domcox@3443 | 113 post_remove() |
domcox@3443 | 114 { |
domcox@3443 | 115 delgroup kismet |
domcox@3443 | 116 rm -rf /etc/kismet |
domcox@3443 | 117 } |