summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 869990af0cfe0e483c346a24c701eaa542164741 (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: theguy147 <yakamoz147 (at) protonmail (dot) com>
# Contributor: spikecodes <19519553+spikecodes@users.noreply.github.com>

pkgname=feroxbuster-git
_pkgname=${pkgname%-git}
pkgver=2.2.2
pkgrel=1
pkgdesc="A fast, simple, recursive content discovery tool written in Rust. "
arch=('any')
url="https://github.com/epi052/feroxbuster"
license=("MIT")
makedepends=("git" "cargo")
provides=(${_pkgname})
conflicts=(${_pkgname})
source=("${_pkgname}::git+${url}.git")
sha256sums=("SKIP")

pkgver() {
	cd "${_pkgname}"
        git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	cd "${_pkgname}"
	cargo build --release
}

package() {
	install -Dm644 "${_pkgname}/LICENSE" "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE"
	install -Dm755 "${_pkgname}/target/release/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"

        # shell completions
        install -Dm644 "${_pkgname}/shell_completions/${_pkgname}.fish" "$pkgdir/usr/share/fish/vendor_completions.d/${_pkgname}.fish"
        install -Dm644 "${_pkgname}/shell_completions/_${_pkgname}"     "$pkgdir/usr/share/zsh/site-functions/_${_pkgname}"
}