summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5db3b47a6cc5389b86f950fe06081e36f06a8266 (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
# Maintainer: defname
pkgname=iwdrofimenu-git
_pkgname=iwdrofimenu
pkgver=r35.bd271f2
pkgrel=1
pkgdesc="A rofi script providing a minimalistic wifi network chooser for iwd"
arch=("any")
url="https://github.com/defname/rofi-iwd-wifi-menu"
license=('GPL3')
depends=("python-pexpect" "python>=3.10" "iwd>=2" "rofi>=1.7" "util-linux>=2.38")
makedepends=("git")
provides=("${_pkgname}")
conflicts=("${_pkgname}")
install=iwdrofimenu.install
changelog=
source=("${_pkgname}::git+https://github.com/defname/rofi-iwd-wifi-menu")
md5sums=("SKIP")

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

prepare() {
    cd ${_pkgname}
    printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
    cd ${_pkgname}
    install -d $pkgdir/usr/bin
    PREFIX=$pkgdir/usr make install
    rm $pkgdir/usr/bin/iwdrofimenu
    ln -s /usr/share/$_pkgname/iwdrofimenu.py $pkgdir/usr/bin/iwdrofimenu
}