wok-next annotate kismet/receipt @ rev 20673

font-manager: dev package is empty, update deps.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri May 11 16:56:15 2018 +0300 (2018-05-11)
parents d43bf7aae921
children 342b30daff76
rev   line source
al@20534 1 # SliTaz package receipt v2.
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"
al@20534 9 WEB_SITE="http://www.kismetwireless.net"
al@20534 10
domcox@1021 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
domcox@1021 12 WGET_URL="http://www.kismetwireless.net/code/$TARBALL"
domcox@1021 13
al@20513 14 BUILD_DEPENDS="libpcap-dev ncurses-dev libnl-dev"
erjo@9936 15
al@20534 16 compile_rules() {
pascal@15065 17 touch -d 197001010000 .depend
al@20534 18
domcox@1898 19 ./configure \
domcox@1898 20 --sysconfdir=/etc/kismet \
al@20534 21 $CONFIGURE_ARGS &&
al@20534 22 make &&
al@20534 23 make DESTDIR=$DESTDIR install || return 1
al@20534 24
al@20534 25 install -Dm755 $src/kismet_capture $install/usr/bin/kismet_capture
domcox@1021 26 }
domcox@1021 27
al@20534 28 genpkg_rules() {
al@20534 29 copy @std
domcox@3622 30 # do not overwrite existing configuration
al@20534 31 mv $fs/etc/kismet/kismet.conf $fs/etc/kismet/kismet.conf.new
domcox@1898 32 mv $fs/etc/kismet/kismet_drone.conf $fs/etc/kismet/kismet_drone.conf.new
al@20534 33 DEPENDS="dbus libnl libpcap ncurses pcre libcap attr"
al@20534 34 TAGS="wireless network monitor"
domcox@1021 35 }
domcox@1898 36
al@20534 37 post_install() {
al@20534 38 # addgroup kismet if needed
al@20534 39 if ! grep -q kismet "$1/etc/group"; then
al@20534 40 chroot "$1/" addgroup -g 315 kismet
domcox@3443 41 fi
domcox@3443 42 # Add tux to kismet group
pascal@18730 43 chroot "$1/" addgroup tux kismet
domcox@3443 44 # set Kismet as suid-root
al@20534 45 chroot "$1/" chown root:kismet /usr/bin/kismet_capture &&
pascal@18730 46 chroot "$1/" chmod 4550 /usr/bin/kismet_capture
domcox@3443 47 # configuration files update
domcox@1898 48 create=1
domcox@1898 49 overwrite=2
domcox@1898 50 keep=3
pascal@18730 51 cd "$1/etc/kismet"
domcox@3622 52 # kismet_ui.conf doesn't exists anymore
domcox@3622 53 if [ -e kismet_ui.conf ]; then
domcox@3622 54 mv kismet_ui.conf kismet_ui.oldpkg
domcox@3622 55 fi
al@20534 56 for file in "kismet" "kismet_drone"; do
domcox@3443 57 # check current files version
domcox@1898 58 if [ ! -e $file.conf ]; then
domcox@1898 59 action=$create
al@20534 60 else
al@20534 61 current=$(grep version= $file.conf)
al@20534 62 new=$(grep version= $file.conf.new)
al@20534 63 if [ "$current" == "$new" ]; then
domcox@1898 64 action=$keep
domcox@1898 65 else
domcox@1898 66 action=$overwrite
domcox@1898 67 fi
domcox@1898 68 fi
domcox@3443 69 # update if needed
domcox@1898 70 case $action in
al@20534 71 $create)
al@20534 72 mv $file.conf.new $file.conf
al@20534 73 ;;
al@20534 74 $keep)
al@20534 75 rm $file.conf.new
al@20534 76 warning="keep"
al@20534 77 ;;
al@20534 78 $overwrite)
al@20534 79 mv $file.conf $file.conf.oldpkg
al@20534 80 mv $file.conf.new $file.conf
al@20534 81 warning=$overwrite
al@20534 82 echo "Warning: /etc/kismet/$file.conf new version from upstream"
al@20534 83 ;;
domcox@1898 84 esac
domcox@1898 85 done
domcox@3443 86 if [ "$warning" != "keep" ]; then
domcox@3443 87 echo "-----"
domcox@3443 88 echo "You MUST edit etc/kismet/kismet.conf and configure Kismet"
domcox@3443 89 echo "for your system, or it will NOT run properly!"
domcox@3443 90 fi
pascal@18707 91 true
domcox@1898 92 }
domcox@3443 93
al@20534 94 post_remove() {
al@20534 95 chroot "$1/" delgroup kismet
al@20534 96 rm -rf $1/etc/kismet
domcox@3443 97 }