summaryrefslogtreecommitdiff
path: root/community/hostapd/PKGBUILD
blob: 54ca1c75b74f49afbb4a3537c556336584618182 (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
# $Id: PKGBUILD 70872 2012-05-18 10:00:26Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=hostapd
pkgver=1.0
pkgrel=1
pkgdesc="daemon for wireless software access points"
arch=('i686' 'x86_64' 'mips64el')
url="http://hostap.epitest.fi/hostapd/"
license=('custom')
depends=('openssl' 'libnl')
makedepends=()
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
	config
	hostapd
	hostapd.conf.d)
md5sums=('236247a7bbd4f60d5fa3e99849d1ffc9'
         '5d7ee10b04e33f22c37be56a4c33dddb'
         'd570327c385f34a4af24d3a0d61cea19'
         'f169534b0f59b341f6df1a21e0344511')

build() {
  cd "$srcdir/$pkgname-$pkgver"/hostapd
  cp "$srcdir/config" ./.config
  sed -i 's#/etc/hostapd#/etc/hostapd/hostapd#' hostapd.conf
  export CFLAGS="$CFLAGS `pkg-config --cflags libnl-3.0`"
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver/hostapd"

  install -D hostapd "$pkgdir/usr/bin/hostapd"
  install hostapd_cli "$pkgdir/usr/bin/hostapd_cli"

  install -Dm644 hlr_auc_gw.milenage_db "$pkgdir/etc/hostapd/hlr_auc_gw.milenage_db"
  install -m644 -t "$pkgdir/etc/hostapd" \
    hostapd.{accept,conf,deny,eap_user,radius_clients,sim_db,vlan,wpa_psk} \
    wired.conf

  install -Dm644 hostapd.8 "$pkgdir/usr/share/man/man8/hostapd.8"
  install -Dm644 hostapd_cli.1 "$pkgdir/usr/share/man/man1/hostapd_cli.1"

  install -D "$srcdir/hostapd" "$pkgdir/etc/rc.d/hostapd"
  install -Dm644 "$srcdir/hostapd.conf.d" "$pkgdir/etc/conf.d/hostapd"

  install -Dm644 ../COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}