Bash · 1524 bytes Raw Blame History
1 # Maintainer: Matthew Wolffe <mfwolffe@outlook.com>
2 pkgname=fortress
3 pkgver=0.9.98
4 pkgrel=1
5 pkgdesc="A command-line file explorer written in modern Fortran with cd-on-exit"
6 arch=('x86_64' 'aarch64')
7 url="https://github.com/FortranGoingOnForty/fortress"
8 license=('MIT')
9 depends=('glibc' 'gcc-libs' 'fzf' 'git')
10 makedepends=('fortran-fpm' 'gcc-fortran')
11 install=fortress.install
12 source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
13 sha256sums=('1277da133881509d4cf5b76f8529ac8977df659300e432cdf4e519e12edbc684')
14
15 build() {
16 cd "$srcdir/$pkgname-$pkgver"
17 fpm build --flag "-O2"
18 }
19
20 package() {
21 cd "$srcdir/$pkgname-$pkgver"
22
23 # Install the binary
24 install -Dm755 "build/gfortran_"*"/app/fortress" "$pkgdir/usr/bin/fortress-bin"
25
26 # Install shell integration files
27 install -Dm644 "fortress.sh" "$pkgdir/usr/share/fortress/fortress.sh"
28 install -Dm644 "fortress.fish" "$pkgdir/usr/share/fortress/fortress.fish"
29
30 # Install bash integration to profile.d (auto-sourced on login)
31 install -Dm644 "fortress.sh" "$pkgdir/etc/profile.d/fortress.sh"
32
33 # Install fish integration to vendor functions (auto-loaded)
34 install -Dm644 "fortress.fish" "$pkgdir/usr/share/fish/vendor_functions.d/fortress.fish"
35
36 # Install documentation
37 install -Dm644 "README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
38 install -Dm644 "USAGE.md" "$pkgdir/usr/share/doc/$pkgname/USAGE.md"
39
40 # Install license
41 install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
42 }