summaryrefslogtreecommitdiff
path: root/community/hostapd/PKGBUILD
blob: 8a9458dd21e72c51188761ff1ef4b56c9c4cfab0 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# $Id: PKGBUILD 48888 2011-06-07 11:05:59Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

_madwifiver=0.9.4.4133
pkgname=hostapd
pkgver=0.7.3
pkgrel=5
pkgdesc="daemon for wireless software access points"
arch=('i686' 'x86_64' 'mips64el')
url="http://hostap.epitest.fi/hostapd/"
license=('custom')
depends=('openssl' 'libnl')
makedepends=('svn')
provides=('hostapd')
conflicts=('hostapd')
backup=('etc/hostapd/hostapd.conf'
	'etc/conf.d/hostapd'
	'etc/hostapd/hlr_auc_gw.milenage_db'
	'etc/hostapd/hostapd.accept'
	'etc/hostapd/hostapd.deny'
	'etc/hostapd/hostapd.eap_user'
	'etc/hostapd/hostapd.radius_clients'
	'etc/hostapd/hostapd.sim_db'
	'etc/hostapd/hostapd.vlan'
	'etc/hostapd/hostapd.wpa_psk'
	'etc/hostapd/wired.conf')
install=hostapd.install
source=(http://hostap.epitest.fi/releases/$pkgname-$pkgver.tar.gz
	ftp://ftp.archlinux.org/other/madwifi/madwifi-${_madwifiver}.tar.bz2
	config.bz2
	hostapd
	hostapd.conf.d)
md5sums=('91a7c8d0f090b7104152d3455a84c112'
         'ca3c3504d000e7b3d7063af46271c932'
         '5d087e2e047ffceb3218e6b2b68fb3bf'
         'd570327c385f34a4af24d3a0d61cea19'
         'f169534b0f59b341f6df1a21e0344511')

build() {
  cd $srcdir/$pkgname-$pkgver/hostapd

  cp ../../config ./.config

  sed -i "s|/usr|$srcdir/madwifi|" .config
  sed -i "s|/usr/local/bin|$pkgdir/usr/bin|" Makefile

  mkdir -p $pkgdir/usr/bin $pkgdir/etc/hostapd \
      $pkgdir/usr/man/man1 $pkgdir/usr/man/man8 \
      $pkgdir/usr/share/licenses/$pkgname $pkgdir/etc/rc.d

  make
}

package() {
  cd $srcdir/$pkgname-$pkgver/hostapd
  make DESTDIR=$pkg install

  cp hlr_auc_gw.milenage_db $pkgdir/etc/hostapd
  cp hostapd.accept $pkgdir/etc/hostapd
  cp hostapd.conf $pkgdir/etc/hostapd
  cp hostapd.deny $pkgdir/etc/hostapd
  cp hostapd.eap_user $pkgdir/etc/hostapd
  cp hostapd.radius_clients $pkgdir/etc/hostapd
  cp hostapd.sim_db $pkgdir/etc/hostapd
  cp hostapd.vlan $pkgdir/etc/hostapd
  cp hostapd.wpa_psk $pkgdir/etc/hostapd
  cp wired.conf $pkgdir/etc/hostapd
  cp hostapd.8 $pkgdir/usr/man/man8
  cp hostapd_cli.1 $pkgdir/usr/man/man1
  cp ../COPYING $pkgdir/usr/share/licenses/hostapd
  cp ../../hostapd $pkgdir/etc/rc.d
  mkdir -p $pkgdir/etc/conf.d
  cp ../../hostapd.conf.d $pkgdir/etc/conf.d/hostapd

  mv $pkgdir/usr/man $pkgdir/usr/share/
  sed -i 's#/etc/hostapd#/etc/hostapd/hostapd#' $pkgdir/etc/hostapd/hostapd.conf
}