Bash · 1707 bytes Raw Blame History
1 # Maintainer: Matthew Wolffe <mfwolffe@outlook.com>
2 pkgname=fortress
3 pkgver=1.0.2
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=('5eb08ae980e3e4d3469510eda0c5d325db831ab8f3ac3146befd51efa929245f')
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 to lib (not directly in PATH)
24 install -Dm755 "build/gfortran_"*"/app/fortress" "$pkgdir/usr/lib/fortress/fortress"
25
26 # Install wrapper script to /usr/bin/fortress
27 install -Dm755 "fortress-wrapper.sh" "$pkgdir/usr/bin/fortress"
28
29 # Install shell integration files (for cd-on-exit when sourced)
30 install -Dm644 "fortress.sh" "$pkgdir/usr/share/fortress/fortress.sh"
31 install -Dm644 "fortress.fish" "$pkgdir/usr/share/fortress/fortress.fish"
32
33 # Install bash integration to profile.d (auto-sourced on login)
34 install -Dm644 "fortress.sh" "$pkgdir/etc/profile.d/fortress.sh"
35
36 # Install fish integration to vendor functions (auto-loaded)
37 install -Dm644 "fortress.fish" "$pkgdir/usr/share/fish/vendor_functions.d/fortress.fish"
38
39 # Install documentation
40 install -Dm644 "README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
41 install -Dm644 "USAGE.md" "$pkgdir/usr/share/doc/$pkgname/USAGE.md"
42
43 # Install license
44 install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
45 }