wok view kismet/receipt @ rev 2636

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