forked from jarun/nnn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
66 lines (57 loc) · 2.02 KB
/
PKGBUILD
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
64
65
66
# copied and modified from https://raw.githubusercontent.com/archlinux/svntogit-community/packages/nnn/trunk/PKGBUILD
# check original for better updated version.
# Maintainer: Felix Yan <[email protected]
# Maintainer: Alexander Epaneshnikov <[email protected]>
# Contributor: Maxim Baz <$pkgname at maximbaz dot com>
# Contributor: Pablo Arias <[email protected]>
# Contributor: John Jenkins <[email protected]>
pkgname=nnn-navn
pkgver=4.7.r5.g70aabc14
pkgrel=1
pkgdesc="The fastest terminal file manager ever written."
arch=('x86_64')
depends=('bash' 'sed')
optdepends=(
'atool: for more archive formats'
'libarchive: for more archive formats'
'zip: for zip archive format'
'unzip: for zip archive format'
'trash-cli: to trash files'
'sshfs: mount remotes'
'rclone: mount remotes'
'fuse2: unmount remotes'
'xdg-utils: desktop opener'
)
url="https://github.com/navneetankur/nnn"
license=('BSD')
source=("git+${url}.git")
md5sums=('SKIP')
makedepends=(git)
provides=(nnn)
conflicts=(nnn)
pkgver() {
cd nnn
git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g;s/v//g'
}
prepare() {
sed -i 's/install: all/install:/' "nnn/Makefile"
}
build() {
cd "nnn"
if [ "$CARCH" = "aarch64" -o "$CARCH" = "armv7l" ]; then
make O_NORL=1 O_NOBATCH=1 O_NOFIFO=1 O_NOSSN=1 O_NOUG=1 O_NOLC=1 O_NOX11=1 O_QSORT=1
else
make O_NERD=1
fi
}
package() {
cd "nnn"
make DESTDIR="${pkgdir}" PREFIX=/usr install
make DESTDIR="${pkgdir}" PREFIX=/usr install-desktop
install -Dm644 misc/auto-completion/fish/nnn.fish "${pkgdir}/usr/share/fish/vendor_completions.d/nnn.fish"
install -Dm644 misc/auto-completion/bash/nnn-completion.bash "${pkgdir}/usr/share/bash-completion/completions/nnn"
install -Dm644 misc/auto-completion/zsh/_nnn "${pkgdir}/usr/share/zsh/site-functions/_nnn"
install -Dm644 -t "${pkgdir}/usr/share/nnn/quitcd/" misc/quitcd/*
cp -a plugins "${pkgdir}/usr/share/nnn/plugins/"
install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}/" LICENSE
}