wok-6.x annotate kismet/receipt @ rev 6883

Added -j4 back into libwebkit.
author Christopher Rogers <slaxemulator@gmail.com>
date Thu Oct 21 00:34:19 2010 +0000 (2010-10-21)
parents 9a43e64e1a0e
children 209f2ed52094
rev   line source
domcox@1021 1 # SliTaz package receipt.
domcox@1021 2
domcox@1021 3 PACKAGE="kismet"
domcox@6082 4 VERSION="2010-07-R1"
domcox@1022 5 CATEGORY="network"
domcox@1021 6 SHORT_DESC="Wireless network monitoring tool"
domcox@1021 7 MAINTAINER="domcox@users.sourceforge.net"
pascal@5002 8 DEPENDS="dbus libnl libpcap ncurses pcre libcap attr"
slaxemulator@6640 9 BUILD_DEPENDS="dbus-dev libnl-dev libpcap ncurses-dev pcre-dev pkg-config"
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"
jozee@4942 13 TAGS="wireless network monitor"
domcox@1021 14
domcox@1021 15 # Rules to configure and make the package.
domcox@1021 16 compile_rules()
domcox@1021 17 {
domcox@1021 18 cd $src
domcox@1898 19 ./configure \
domcox@1898 20 --prefix=/usr \
domcox@1898 21 --infodir=/usr/share/info \
domcox@1898 22 --mandir=/usr/share/man \
domcox@1898 23 --sysconfdir=/etc/kismet \
domcox@1898 24 $CONFIGURE_ARGS && \
domcox@1898 25 make && \
domcox@3626 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@3626 34 cp -a $src/kismet_capture $fs/usr/bin
domcox@1021 35 mkdir -p $fs/etc
domcox@1021 36 cp -a $_pkg/etc/kismet $fs/etc
domcox@3622 37 # do not overwrite existing configuration
domcox@1898 38 mv $fs/etc/kismet/kismet.conf $fs/etc/kismet/kismet.conf.new
domcox@1898 39 mv $fs/etc/kismet/kismet_drone.conf $fs/etc/kismet/kismet_drone.conf.new
domcox@1021 40 }
domcox@1898 41
domcox@1898 42 post_install()
domcox@1898 43 {
domcox@3443 44 # addgroup kismet if needed
domcox@3443 45 if ! grep -q kismet $1/etc/group; then
domcox@3443 46 echo -n "Adding group kismet..."
domcox@3443 47 chroot $1/ addgroup kismet
domcox@3443 48 status
domcox@3443 49 fi
domcox@3443 50 # Add tux to kismet group
domcox@3443 51 chroot $1/ addgroup tux kismet
domcox@3443 52 # set Kismet as suid-root
domcox@3443 53 echo -n "Set Kismet as suid-root.."
domcox@3443 54 chroot $1/ chown root:kismet /usr/bin/kismet_capture && \
domcox@3443 55 chroot $1/ chmod 4550 /usr/bin/kismet_capture
domcox@3443 56 status
domcox@3443 57 # configuration files update
domcox@1898 58 create=1
domcox@1898 59 overwrite=2
domcox@1898 60 keep=3
domcox@3443 61 cd $1/etc/kismet
domcox@3622 62 # kismet_ui.conf doesn't exists anymore
domcox@3622 63 if [ -e kismet_ui.conf ]; then
domcox@3622 64 mv kismet_ui.conf kismet_ui.oldpkg
domcox@3622 65 fi
domcox@3622 66 for file in "kismet" "kismet_drone"
domcox@1898 67 do
domcox@3443 68 # check current files version
domcox@1898 69 if [ ! -e $file.conf ]; then
domcox@1898 70 action=$create
domcox@1898 71 else
domcox@1898 72 current=`grep version= $file.conf`
domcox@1898 73 new=`grep version= $file.conf.new`
domcox@1898 74 if [ "$current" = "$new" ]; then
domcox@1898 75 action=$keep
domcox@1898 76 else
domcox@1898 77 action=$overwrite
domcox@1898 78 fi
domcox@1898 79 fi
domcox@3443 80 # update if needed
domcox@1898 81 case $action in
domcox@1898 82 $create)
domcox@1898 83 mv $file.conf.new $file.conf
domcox@1898 84 ;;
domcox@1898 85 $keep)
domcox@1898 86 rm $file.conf.new
domcox@3443 87 warning="keep"
domcox@1898 88 ;;
domcox@1898 89 $overwrite)
domcox@3443 90 mv $file.conf $file.conf.oldpkg
domcox@1898 91 mv $file.conf.new $file.conf
domcox@3443 92 warning=$overwrite
domcox@3443 93 echo "Warning: /etc/kismet/$file.conf new version from upstream"
domcox@1898 94 ;;
domcox@1898 95 esac
domcox@1898 96 done
domcox@3443 97 if [ "$warning" != "keep" ]; then
domcox@3443 98 echo "-----"
domcox@3443 99 echo "You MUST edit etc/kismet/kismet.conf and configure Kismet"
domcox@3443 100 echo "for your system, or it will NOT run properly!"
domcox@3443 101 fi
domcox@1898 102 }
domcox@3443 103
domcox@3443 104 post_remove()
domcox@3443 105 {
domcox@3443 106 delgroup kismet
domcox@3443 107 rm -rf /etc/kismet
domcox@3443 108 }