diff options
author | Daniel M. Capella | 2023-08-14 21:26:12 -0400 |
---|---|---|
committer | Daniel M. Capella | 2023-08-14 21:30:05 -0400 |
commit | cc06cc8181c96f82e8baf3c77b19c239e2eb30f3 (patch) | |
tree | df55338db91cf143cd073088805297580ac79704 | |
parent | 77134c547ba5e7055fd3ef87dc2466a929466428 (diff) | |
download | aur-cc06cc8181c96f82e8baf3c77b19c239e2eb30f3.tar.gz |
Use ttf-font-nerd and install compiled bytecode
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 36 | ||||
-rw-r--r-- | ranger_devicons-git.install | 10 | ||||
-rw-r--r-- | ranger_devicons.install | 9 |
4 files changed, 37 insertions, 28 deletions
@@ -1,17 +1,17 @@ pkgbase = ranger_devicons-git pkgdesc = Ranger plugin that adds file glyphs/icon support to Ranger - pkgver = r87.5bb1c32 + pkgver = r89.de64ab2 pkgrel = 1 url = https://github.com/alexanderjeurissen/ranger_devicons - install = ranger_devicons.install + install = ranger_devicons-git.install arch = any license = GPL3 makedepends = git depends = ranger - depends = nerd-fonts + depends = ttf-font-nerd provides = ranger_devicons conflicts = ranger_devicons - source = ranger_devicons-git::git+https://github.com/alexanderjeurissen/ranger_devicons - md5sums = SKIP + source = git+https://github.com/alexanderjeurissen/ranger_devicons.git + b2sums = SKIP pkgname = ranger_devicons-git @@ -1,28 +1,36 @@ -# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> +# Maintainer: Daniel M. Capella <polyzen@archlinux.org> +# Contributor: Luis Martinez <luis dot martinez at disroot dot org> # Contributor: wostarxi <wostarxi@outlook.com> pkgname=ranger_devicons-git -_pkg="${pkgname%-git}" -pkgver=r87.5bb1c32 +_name=${pkgname%-git} +pkgver=r89.de64ab2 pkgrel=1 pkgdesc='Ranger plugin that adds file glyphs/icon support to Ranger' arch=('any') -url='https://github.com/alexanderjeurissen/ranger_devicons' +url=https://github.com/alexanderjeurissen/ranger_devicons license=('GPL3') -depends=('ranger' 'nerd-fonts') +depends=('ranger' 'ttf-font-nerd') makedepends=('git') -provides=("$_pkg") -conflicts=("$_pkg") -install="$_pkg.install" -source=("$pkgname::git+$url") -md5sums=('SKIP') +provides=("$_name") +conflicts=("$_name") +install="$pkgname.install" +source=("git+$url.git") +b2sums=('SKIP') pkgver() { - cd "$pkgname" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "$_name" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$_name" + python -m compileall . + python -O -m compileall . } package() { - cd "$pkgname" - install -Dv __init__.py devicons.py -t "$pkgdir/usr/share/ranger/plugins/$_pkg/" + cd "$_name" + install -Dm644 -t "$pkgdir"/usr/share/ranger/plugins/"$_name" __init__.py devicons.py + cp -r __pycache__ "$pkgdir"/usr/share/ranger/plugins/"$_name" } diff --git a/ranger_devicons-git.install b/ranger_devicons-git.install new file mode 100644 index 000000000000..93215f07fd0d --- /dev/null +++ b/ranger_devicons-git.install @@ -0,0 +1,10 @@ +post_install() { +cat << EOF +Make this plugin available to ranger: +\$ mkdir -p \${XDG_CONFIG_HOME:-\$HOME/.config}/ranger/plugins +\$ ln -fsT /usr/share/ranger/plugins/ranger_devicons \${XDG_CONFIG_HOME:-\$HOME/.config}/ranger/plugins/ranger_devicons + +Set the global default linemode to "devicons": +\$ echo 'default_linemode devicons' >> \${XDG_CONFIG_HOME:-\$HOME/.config}/ranger/rc.conf +EOF +} diff --git a/ranger_devicons.install b/ranger_devicons.install deleted file mode 100644 index f07fbb608974..000000000000 --- a/ranger_devicons.install +++ /dev/null @@ -1,9 +0,0 @@ -post_install() { -cat << EOF -This plugin uses glyphs from a patched NERDfont, So you should install a NERDfont and set it as the default font for your terminal. -Then execute the following command: - mkdir ~/.config/ranger/plugins - ln -sf /usr/share/ranger/plugins/ranger_devicons ~/.config/ranger/plugins/ranger_devicons - echo "default_linemode devicons" >> ~/.config/ranger/rc.conf -EOF -} |