summaryrefslogtreecommitdiff
path: root/community/lorcon/PKGBUILD
blob: 30bac17458f7e4656d09d95d6418a73c19128fe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# $Id: PKGBUILD 101007 2013-11-14 20:43:40Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: fnord0 [fnord0 <AT> riseup <DOT> net]
# Contributor: dninja <dninja@gmail.com>
# Contributor: Jon Gjengset <jon@thesquareplanet.com>

pkgname=lorcon
pkgver=2.0.0.20091101
pkgrel=1
epoch=1
pkgdesc='Generic library for injecting 802.11 frames'
url='http://802.11ninja.net/'
license=('GPL')
arch=('x86_64' 'i686')
depends=('libpcap')
makedepends=('git')
source=('git+https://code.google.com/p/lorcon/')
md5sums=('SKIP')

pkgver() {
  cd "$pkgname"

  major=$(cat Makefile.in | grep -E "^MAJOR " | sed 's/^.*= *//')
  minor=$(cat Makefile.in | grep -E "^MINOR " | sed 's/^.*= *//')
  tiny=$(cat Makefile.in | grep -E "^TINY " | sed 's/^.*= *//')
  version=$(cat Makefile.in | grep -E "^VERSION " | sed 's/^.*= *//')
  echo "$major.$minor.$tiny.$version"
}

prepare() {
  cd "$pkgname"

  ./configure --prefix=/usr --mandir=/usr/share/man
}

build() {
  make -C "$pkgname"
}

package() {
  make -C "$pkgname" DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et: