summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6af0f78403c504504de9895a68e325749b88ca86 (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=wpa_supplicant-git
pkgver=2.10.r1120.gcc8a09a48
pkgrel=1
pkgdesc="A daemon program controlling the wireless connection"
arch=('i686' 'x86_64')
url="https://w1.fi/wpa_supplicant/"
license=('BSD')
depends=('glibc' 'openssl' 'libdbus' 'libnl' 'readline')
optdepends=('wpa_supplicant_gui: GUI frontend')
makedepends=('git')
provides=("wpa_supplicant=$pkgver")
conflicts=('wpa_supplicant')
source=("git+https://w1.fi/hostap.git"
        "config::https://gitlab.archlinux.org/archlinux/packaging/packages/wpa_supplicant/-/raw/main/wpa_supplicant_config")
sha256sums=('SKIP'
            'SKIP')


prepare() {
  cd "$srcdir"

  cp "config" "hostap/wpa_supplicant/.config"
}

pkgver() {
  cd "hostap/wpa_supplicant"

  git describe --long --tags | sed 's/^hostap_//;s/\([^-]*-g\)/r\1/;s/[_-]/./g'
}

build() {
  cd "hostap/wpa_supplicant"

  export CFLAGS="$CPPFLAGS $CFLAGS"
  make \
    LIBDIR="/usr/lib" \
    BINDIR="/usr/bin"
  make \
    LIBDIR="/usr/lib" \
    BINDIR="/usr/bin" \
    eapol_test
}

package() {
  cd "hostap/wpa_supplicant"

  make \
    LIBDIR="/usr/lib" \
    BINDIR="/usr/bin" \
    DESTDIR="$pkgdir" \
    install

  install -Dm755 "eapol_test" -t "$pkgdir/usr/bin"
  install -Dm644 "wpa_supplicant.conf" -t "$pkgdir/usr/share/doc/wpa_supplicant"
  install -Dm644 "dbus/fi.w1.wpa_supplicant1.service" -t "$pkgdir/usr/share/dbus-1/system-services"
  install -Dm644 "dbus/dbus-wpa_supplicant.conf" "$pkgdir/etc/dbus-1/system.d/wpa_supplicant.conf"
  install -Dm644 "systemd"/*.service -t "$pkgdir/usr/lib/systemd/system"

  sed -n '/This software may/,/OF SUCH DAMAGE./p' "README" > "COPYING"
  install -Dm644 "COPYING" -t "$pkgdir/usr/share/licenses/wpa_supplicant"
}