wok diff kismet/receipt @ rev 1934
Sylpheed upgrade to 2.6.0
author | hacker@aspic |
---|---|
date | Thu Dec 25 22:53:06 2008 +0100 (2008-12-25) |
parents | cb749a4370f3 |
children | 00ba339761e5 |
line diff
1.1 --- a/kismet/receipt Wed Jul 09 23:00:58 2008 +0200 1.2 +++ b/kismet/receipt Thu Dec 25 22:53:06 2008 +0100 1.3 @@ -5,8 +5,8 @@ 1.4 CATEGORY="network" 1.5 SHORT_DESC="Wireless network monitoring tool" 1.6 MAINTAINER="domcox@users.sourceforge.net" 1.7 -DEPENDS="expat gmp libpcap ncurses zlib" 1.8 -BUILD_DEPENDS="expat-dev gmp-dev ncurses-dev zlib-dev" 1.9 +DEPENDS="dbus libpcap ncurses" 1.10 +BUILD_DEPENDS="dbus-dev ncurses-dev" 1.11 TARBALL="$PACKAGE-$VERSION.tar.gz" 1.12 WEB_SITE="http://www.kismetwireless.net" 1.13 WGET_URL="http://www.kismetwireless.net/code/$TARBALL" 1.14 @@ -15,10 +15,14 @@ 1.15 compile_rules() 1.16 { 1.17 cd $src 1.18 - ./configure --prefix=/usr --infodir=/usr/share/info \ 1.19 - --mandir=/usr/share/man --sysconfdir=/etc/kismet \ 1.20 - $CONFIGURE_ARGS 1.21 - make 1.22 + ./configure \ 1.23 + --prefix=/usr \ 1.24 + --infodir=/usr/share/info \ 1.25 + --mandir=/usr/share/man \ 1.26 + --sysconfdir=/etc/kismet \ 1.27 + --disable-gpsmap \ 1.28 + $CONFIGURE_ARGS && \ 1.29 + make && \ 1.30 make DESTDIR=$PWD/_pkg install 1.31 } 1.32 1.33 @@ -29,7 +33,49 @@ 1.34 cp -a $_pkg/usr/bin $fs/usr 1.35 mkdir -p $fs/etc 1.36 cp -a $_pkg/etc/kismet $fs/etc 1.37 - sed -e 's/your_user_here/tux/' $_pkg/etc/kismet/kismet.conf \ 1.38 - > $fs/etc/kismet/kismet.conf 1.39 - strip -s $fs/usr/bin/* 1.40 + # not overwrite existing configuration 1.41 + mv $fs/etc/kismet/kismet.conf $fs/etc/kismet/kismet.conf.new 1.42 + mv $fs/etc/kismet/kismet_ui.conf $fs/etc/kismet/kismet_ui.conf.new 1.43 + mv $fs/etc/kismet/kismet_drone.conf $fs/etc/kismet/kismet_drone.conf.new 1.44 + # set tux as kismet user 1.45 + sed -i 's/your_user_here/tux/' $fs/etc/kismet/kismet.conf.new 1.46 + # disable sound 1.47 + sed -i 's/sound=true/sound=false/' $fs/etc/kismet/kismet_ui.conf.new 1.48 } 1.49 + 1.50 +post_install() 1.51 +{ 1.52 + # configuration files auto overwrite 1.53 + create=1 1.54 + overwrite=2 1.55 + keep=3 1.56 + cd /etc/kismet 1.57 + for file in "kismet" "kismet_ui" "kismet_drone" 1.58 + do 1.59 + # check current configuration files 1.60 + if [ ! -e $file.conf ]; then 1.61 + action=$create 1.62 + else 1.63 + current=`grep version= $file.conf` 1.64 + new=`grep version= $file.conf.new` 1.65 + if [ "$current" = "$new" ]; then 1.66 + action=$keep 1.67 + else 1.68 + action=$overwrite 1.69 + fi 1.70 + fi 1.71 + case $action in 1.72 + $create) 1.73 + mv $file.conf.new $file.conf 1.74 + ;; 1.75 + $keep) 1.76 + rm $file.conf.new 1.77 + ;; 1.78 + $overwrite) 1.79 + mv $file.conf $file.conf.bak 1.80 + mv $file.conf.new $file.conf 1.81 + echo "$file.conf new upstream version, please check" 1.82 + ;; 1.83 + esac 1.84 + done 1.85 +}