wok-next annotate kismet/receipt @ rev 14130
move xfconf to libxfconf (xfce itself use this name), recook libxfce4ui (depend on libxfconf)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Feb 28 10:46:10 2013 +0000 (2013-02-28) |
parents | 30062b4789f2 |
children | 3fe2c569088e |
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" |
domcox@1021 | 8 TARBALL="$PACKAGE-$VERSION.tar.gz" |
domcox@1021 | 9 WEB_SITE="http://www.kismetwireless.net" |
domcox@1021 | 10 WGET_URL="http://www.kismetwireless.net/code/$TARBALL" |
jozee@4942 | 11 TAGS="wireless network monitor" |
domcox@1021 | 12 |
erjo@9936 | 13 DEPENDS="dbus libnl libpcap ncurses pcre libcap attr" |
pascal@12584 | 14 BUILD_DEPENDS="pkg-config libpcap-dev ncurses-dev" |
erjo@9936 | 15 |
domcox@1021 | 16 # Rules to configure and make the package. |
domcox@1021 | 17 compile_rules() |
domcox@1021 | 18 { |
domcox@1021 | 19 cd $src |
domcox@1898 | 20 ./configure \ |
domcox@1898 | 21 --prefix=/usr \ |
domcox@1898 | 22 --sysconfdir=/etc/kismet \ |
domcox@1898 | 23 $CONFIGURE_ARGS && \ |
domcox@1898 | 24 make && \ |
slaxemulator@9588 | 25 make DESTDIR=$DESTDIR install |
domcox@1021 | 26 } |
domcox@1021 | 27 |
domcox@1021 | 28 # Rules to gen a SliTaz package suitable for Tazpkg. |
domcox@1021 | 29 genpkg_rules() |
domcox@1021 | 30 { |
domcox@1021 | 31 mkdir -p $fs/usr |
domcox@1021 | 32 cp -a $_pkg/usr/bin $fs/usr |
domcox@3626 | 33 cp -a $src/kismet_capture $fs/usr/bin |
domcox@1021 | 34 mkdir -p $fs/etc |
domcox@1021 | 35 cp -a $_pkg/etc/kismet $fs/etc |
domcox@3622 | 36 # do 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_drone.conf $fs/etc/kismet/kismet_drone.conf.new |
domcox@1021 | 39 } |
domcox@1898 | 40 |
domcox@1898 | 41 post_install() |
domcox@1898 | 42 { |
domcox@3443 | 43 # addgroup kismet if needed |
domcox@3443 | 44 if ! grep -q kismet $1/etc/group; then |
domcox@3443 | 45 echo -n "Adding group kismet..." |
slaxemulator@10872 | 46 chroot $1/ addgroup -g 315 kismet |
domcox@3443 | 47 status |
domcox@3443 | 48 fi |
domcox@3443 | 49 # Add tux to kismet group |
domcox@3443 | 50 chroot $1/ addgroup tux kismet |
domcox@3443 | 51 # set Kismet as suid-root |
domcox@3443 | 52 echo -n "Set Kismet as suid-root.." |
domcox@3443 | 53 chroot $1/ chown root:kismet /usr/bin/kismet_capture && \ |
domcox@3443 | 54 chroot $1/ chmod 4550 /usr/bin/kismet_capture |
domcox@3443 | 55 status |
domcox@3443 | 56 # configuration files update |
domcox@1898 | 57 create=1 |
domcox@1898 | 58 overwrite=2 |
domcox@1898 | 59 keep=3 |
domcox@3443 | 60 cd $1/etc/kismet |
domcox@3622 | 61 # kismet_ui.conf doesn't exists anymore |
domcox@3622 | 62 if [ -e kismet_ui.conf ]; then |
domcox@3622 | 63 mv kismet_ui.conf kismet_ui.oldpkg |
domcox@3622 | 64 fi |
domcox@3622 | 65 for file in "kismet" "kismet_drone" |
domcox@1898 | 66 do |
domcox@3443 | 67 # check current files version |
domcox@1898 | 68 if [ ! -e $file.conf ]; then |
domcox@1898 | 69 action=$create |
domcox@1898 | 70 else |
domcox@1898 | 71 current=`grep version= $file.conf` |
domcox@1898 | 72 new=`grep version= $file.conf.new` |
domcox@1898 | 73 if [ "$current" = "$new" ]; then |
domcox@1898 | 74 action=$keep |
domcox@1898 | 75 else |
domcox@1898 | 76 action=$overwrite |
domcox@1898 | 77 fi |
domcox@1898 | 78 fi |
domcox@3443 | 79 # update if needed |
domcox@1898 | 80 case $action in |
domcox@1898 | 81 $create) |
domcox@1898 | 82 mv $file.conf.new $file.conf |
domcox@1898 | 83 ;; |
domcox@1898 | 84 $keep) |
domcox@1898 | 85 rm $file.conf.new |
domcox@3443 | 86 warning="keep" |
domcox@1898 | 87 ;; |
domcox@1898 | 88 $overwrite) |
domcox@3443 | 89 mv $file.conf $file.conf.oldpkg |
domcox@1898 | 90 mv $file.conf.new $file.conf |
domcox@3443 | 91 warning=$overwrite |
domcox@3443 | 92 echo "Warning: /etc/kismet/$file.conf new version from upstream" |
domcox@1898 | 93 ;; |
domcox@1898 | 94 esac |
domcox@1898 | 95 done |
domcox@3443 | 96 if [ "$warning" != "keep" ]; then |
domcox@3443 | 97 echo "-----" |
domcox@3443 | 98 echo "You MUST edit etc/kismet/kismet.conf and configure Kismet" |
domcox@3443 | 99 echo "for your system, or it will NOT run properly!" |
domcox@3443 | 100 fi |
domcox@1898 | 101 } |
domcox@3443 | 102 |
domcox@3443 | 103 post_remove() |
domcox@3443 | 104 { |
domcox@3443 | 105 delgroup kismet |
domcox@3443 | 106 rm -rf /etc/kismet |
domcox@3443 | 107 } |