summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9b45be08bd74a599a42c195f93154a8401f83ffb (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
# Maintainer: Mark Wagie <mark dot wagie at tutanota dot com>
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 "$srcdir/${pkgname%-git}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

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

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

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