wok-stable annotate kismet/receipt @ rev 3170

Add jtoolkit (Python web application framework)
author Christophe Lincoln <pankso@slitaz.org>
date Mon May 25 01:25:59 2009 +0200 (2009-05-25)
parents cb749a4370f3
children 00ba339761e5
rev   line source
domcox@1021 1 # SliTaz package receipt.
domcox@1021 2
domcox@1021 3 PACKAGE="kismet"
domcox@1021 4 VERSION="2008-05-R1"
domcox@1022 5 CATEGORY="network"
domcox@1021 6 SHORT_DESC="Wireless network monitoring tool"
domcox@1021 7 MAINTAINER="domcox@users.sourceforge.net"
domcox@1898 8 DEPENDS="dbus libpcap ncurses"
domcox@1898 9 BUILD_DEPENDS="dbus-dev ncurses-dev"
domcox@1021 10 TARBALL="$PACKAGE-$VERSION.tar.gz"
domcox@1021 11 WEB_SITE="http://www.kismetwireless.net"
domcox@1021 12 WGET_URL="http://www.kismetwireless.net/code/$TARBALL"
domcox@1021 13
domcox@1021 14 # Rules to configure and make the package.
domcox@1021 15 compile_rules()
domcox@1021 16 {
domcox@1021 17 cd $src
domcox@1898 18 ./configure \
domcox@1898 19 --prefix=/usr \
domcox@1898 20 --infodir=/usr/share/info \
domcox@1898 21 --mandir=/usr/share/man \
domcox@1898 22 --sysconfdir=/etc/kismet \
domcox@1898 23 --disable-gpsmap \
domcox@1898 24 $CONFIGURE_ARGS && \
domcox@1898 25 make && \
domcox@1021 26 make DESTDIR=$PWD/_pkg install
domcox@1021 27 }
domcox@1021 28
domcox@1021 29 # Rules to gen a SliTaz package suitable for Tazpkg.
domcox@1021 30 genpkg_rules()
domcox@1021 31 {
domcox@1021 32 mkdir -p $fs/usr
domcox@1021 33 cp -a $_pkg/usr/bin $fs/usr
domcox@1021 34 mkdir -p $fs/etc
domcox@1021 35 cp -a $_pkg/etc/kismet $fs/etc
domcox@1898 36 # not overwrite existing configuration
domcox@1898 37 mv $fs/etc/kismet/kismet.conf $fs/etc/kismet/kismet.conf.new
domcox@1898 38 mv $fs/etc/kismet/kismet_ui.conf $fs/etc/kismet/kismet_ui.conf.new
domcox@1898 39 mv $fs/etc/kismet/kismet_drone.conf $fs/etc/kismet/kismet_drone.conf.new
domcox@1898 40 # set tux as kismet user
domcox@1898 41 sed -i 's/your_user_here/tux/' $fs/etc/kismet/kismet.conf.new
domcox@1898 42 # disable sound
domcox@1898 43 sed -i 's/sound=true/sound=false/' $fs/etc/kismet/kismet_ui.conf.new
domcox@1021 44 }
domcox@1898 45
domcox@1898 46 post_install()
domcox@1898 47 {
domcox@1898 48 # configuration files auto overwrite
domcox@1898 49 create=1
domcox@1898 50 overwrite=2
domcox@1898 51 keep=3
domcox@1898 52 cd /etc/kismet
domcox@1898 53 for file in "kismet" "kismet_ui" "kismet_drone"
domcox@1898 54 do
domcox@1898 55 # check current configuration files
domcox@1898 56 if [ ! -e $file.conf ]; then
domcox@1898 57 action=$create
domcox@1898 58 else
domcox@1898 59 current=`grep version= $file.conf`
domcox@1898 60 new=`grep version= $file.conf.new`
domcox@1898 61 if [ "$current" = "$new" ]; then
domcox@1898 62 action=$keep
domcox@1898 63 else
domcox@1898 64 action=$overwrite
domcox@1898 65 fi
domcox@1898 66 fi
domcox@1898 67 case $action in
domcox@1898 68 $create)
domcox@1898 69 mv $file.conf.new $file.conf
domcox@1898 70 ;;
domcox@1898 71 $keep)
domcox@1898 72 rm $file.conf.new
domcox@1898 73 ;;
domcox@1898 74 $overwrite)
domcox@1898 75 mv $file.conf $file.conf.bak
domcox@1898 76 mv $file.conf.new $file.conf
domcox@1898 77 echo "$file.conf new upstream version, please check"
domcox@1898 78 ;;
domcox@1898 79 esac
domcox@1898 80 done
domcox@1898 81 }