summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 93d5fb895484e7a7f0f8cabc65a06bac48a30309 (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
# Maintainer: 
# Contributor: Mark Wagie <mark dot wagie at proton dot me>
pkgname=easywifi-git
pkgver=r9.04a9c12
pkgrel=1
pkgdesc="The easiest way to add wifi networks on Linux"
arch=('any')
url="https://github.com/NoahCristino/easywifi"
license=('MIT')
depends=(
  'python'
  'networkmanager'
)
makedepends=('git')
optdepends=('dnsmasq: to create hotspots')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/NoahCristino/easywifi.git')
sha256sums=('SKIP')

pkgver() {
  cd "${pkgname%-git}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "${pkgname%-git}"

  # Add shebang
  sed -i '1 i\#!/usr/bin/env python' "${pkgname%-git}.py"
}

package() {
  cd "${pkgname%-git}"
  install -Dm755 "${pkgname%-git}.py" "$pkgdir/usr/bin/${pkgname%-git}"
  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}