summaryrefslogtreecommitdiff
path: root/community/arpwatch
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2013-08-03 17:45:52 +0200
committerMichał Masłowski <mtjm@mtjm.eu>2013-08-03 17:45:52 +0200
commit513c776d74c56a49781a09a5a772f4ea6d6bb401 (patch)
tree161509e3271db459f14f8c69de7c52d4902ba107 /community/arpwatch
parent8183144fe6e064d80985ac810f6178a3cf289d0d (diff)
parente191a289464c21aafe7478065ea7ed3ddda0766f (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community/arm-elf-binutils/PKGBUILD community/bird/PKGBUILD community/cantata/PKGBUILD community/dbmail/PKGBUILD community/ekg2/PKGBUILD community/ffmpeg-compat/PKGBUILD community/gigedit/PKGBUILD community/gimp-refocus/PKGBUILD community/gmime24/PKGBUILD community/gmpc/PKGBUILD community/gnash/PKGBUILD community/id3lib-rcc/PKGBUILD community/linuxsampler/PKGBUILD community/lwm/PKGBUILD community/midori/PKGBUILD community/mplayer2/PKGBUILD community/mtpaint/PKGBUILD community/nestopia/PKGBUILD community/preload/PKGBUILD community/projectm/PKGBUILD community/rusxmms/PKGBUILD community/taglib-rcc/PKGBUILD community/the_silver_searcher/PKGBUILD community/xnee/PKGBUILD core/libgcrypt/PKGBUILD core/libusbx/PKGBUILD core/mkinitcpio-busybox/PKGBUILD extra/a2ps/PKGBUILD extra/a52dec/PKGBUILD extra/abook/PKGBUILD extra/avidemux/PKGBUILD extra/bzflag/PKGBUILD extra/cln/PKGBUILD extra/exempi/PKGBUILD extra/ffmpeg/PKGBUILD extra/fluxter/PKGBUILD extra/fontforge/PKGBUILD extra/glib/PKGBUILD extra/gnet/PKGBUILD extra/gnome-vfs/PKGBUILD extra/gnutls/PKGBUILD extra/gstreamer0.10-ugly/PKGBUILD extra/gtk/PKGBUILD extra/idnkit/PKGBUILD extra/ilmbase/PKGBUILD extra/imake/PKGBUILD extra/kdenetwork/PKGBUILD extra/libdatrie/PKGBUILD extra/libmbim/PKGBUILD extra/libmp3splt/PKGBUILD extra/libqmi/PKGBUILD extra/libtxc_dxtn/PKGBUILD extra/libxfont/PKGBUILD extra/mesa/PKGBUILD extra/modemmanager/PKGBUILD extra/nedit/PKGBUILD extra/nmap/PKGBUILD extra/openexr/PKGBUILD extra/purple-plugin-pack/PKGBUILD extra/qemu/PKGBUILD extra/qtwebkit/PKGBUILD extra/subversion/PKGBUILD extra/transmission/PKGBUILD extra/truecrypt/PKGBUILD extra/vigra/PKGBUILD extra/virtuoso/PKGBUILD extra/vlc/PKGBUILD extra/wireshark/PKGBUILD extra/wxmaxima/PKGBUILD extra/x264/PKGBUILD extra/xorg-iceauth/PKGBUILD extra/xorg-mkfontscale/PKGBUILD extra/xorg-xfd/PKGBUILD libre/abuse-libre/PKGBUILD libre/clementine-libre/PKGBUILD libre/linux-libre/PKGBUILD
Diffstat (limited to 'community/arpwatch')
-rw-r--r--community/arpwatch/PKGBUILD14
-rw-r--r--community/arpwatch/ethercodes.dat.xzbin0 -> 166132 bytes
-rwxr-xr-xcommunity/arpwatch/gen_ethercode.sh32
3 files changed, 41 insertions, 5 deletions
diff --git a/community/arpwatch/PKGBUILD b/community/arpwatch/PKGBUILD
index 108c360e6..cc8c7acc9 100644
--- a/community/arpwatch/PKGBUILD
+++ b/community/arpwatch/PKGBUILD
@@ -1,40 +1,44 @@
-# $Id: PKGBUILD 91484 2013-05-23 10:11:13Z spupykin $
+# $Id: PKGBUILD 94834 2013-07-31 01:12:04Z seblu $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
-# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sébastien Luttringer
pkgname=arpwatch
pkgver=2.1a15
-pkgrel=11
+pkgrel=12
pkgdesc='Ethernet/FDDI station activity monitor'
arch=('i686' 'x86_64' 'mips64el')
url='ftp://ftp.ee.lbl.gov/'
license=('BSD')
depends=('libpcap' 'smtp-forwarder')
source=("ftp://ftp.ee.lbl.gov/$pkgname-$pkgver.tar.gz"
+ 'ethercodes.dat.xz'
'LICENSE'
"$pkgname.service")
md5sums=('cebfeb99c4a7c2a6cee2564770415fe7'
+ '0a47a4e7a0f2ede5c8c7f22ec678fa72'
'9359518c500562281e76cdb0b2fa9062'
'43e2358ba0532da38e5296250a7fcfd8')
prepare() {
cd $pkgname-$pkgver
# move arp database in /var/lib/arpwatch
+ # /var is used because arpwatch write its learned mac into this folder
sed -i 's|ARPDIR = $(prefix)/arpwatch|ARPDIR = /var/lib/arpwatch|' Makefile.in
# binary ownership to root
sed -i 's/-\(o\|g\) bin/-\1 root/g' Makefile.in
+ # Update ethercodes with recent OUI. See gen_ethercodes.sh
+ cp -f "$srcdir/ethercodes.dat" ethercodes.dat
}
build() {
cd $pkgname-$pkgver
./configure --prefix=/usr --mandir=/usr/share/man --sbindir=/usr/bin
- make SENDMAIL=`which sendmail`
+ make SENDMAIL=/usr/bin/sendmail
}
package() {
cd $pkgname-$pkgver
- install -d -m 0755 "$pkgdir"/usr/{bin,share/man}
+ install -d -m 0755 "$pkgdir"/usr/{bin,share/man/man8}
make DESTDIR="$pkgdir" install install-man
# install ether prefix database
install -Dm644 ethercodes.dat "$pkgdir/var/lib/$pkgname/ethercodes.dat"
diff --git a/community/arpwatch/ethercodes.dat.xz b/community/arpwatch/ethercodes.dat.xz
new file mode 100644
index 000000000..1838c8194
--- /dev/null
+++ b/community/arpwatch/ethercodes.dat.xz
Binary files differ
diff --git a/community/arpwatch/gen_ethercode.sh b/community/arpwatch/gen_ethercode.sh
new file mode 100755
index 000000000..a5cdeeebe
--- /dev/null
+++ b/community/arpwatch/gen_ethercode.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# Copyright © 2013 Sébastien Luttringer
+
+# This script is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This script is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this script. If not, see <http://www.gnu.org/licenses/>.
+
+# Get and format official OUI
+wget -O- 'http://standards.ieee.org/regauth/oui/oui.txt' | \
+sed -nr 's/[ \t]+(..)-(..)-(..)[ \t]+\(hex\)[ \t]+(.*)/\L\1:\2:\3\E\t\4/p' > ethercodes.dat
+
+# Add private OUI
+cat >> ethercodes.dat <<EOF
+52:54:00 QEMU Virtual NIC
+b0:c4:20 Bochs Virtual NIC
+de:ad:ca PearPC Virtual NIC
+00:ff:d1 Cooperative Linux virtual NIC
+EOF
+
+# Sort and compress
+sort ethercodes.dat | xz -9 > ethercodes.dat.xz
+rm ethercodes.dat