| 1 | Name: fortress |
| 2 | Version: 0.1.0 |
| 3 | Release: 1%{?dist} |
| 4 | Summary: A command-line file explorer written in modern Fortran with cd-on-exit |
| 5 | |
| 6 | License: MIT |
| 7 | URL: https://github.com/FortranGoingOnForty/fortress |
| 8 | Source0: %{name}-%{version}.tar.gz |
| 9 | |
| 10 | BuildRequires: gfortran >= 10.0 |
| 11 | BuildRequires: gcc |
| 12 | BuildRequires: fpm |
| 13 | Requires: glibc |
| 14 | Requires: gcc-libs |
| 15 | |
| 16 | %description |
| 17 | FORTRESS is a command-line file explorer written in modern Fortran with fzf integration. |
| 18 | It provides a dual-pane interface inspired by Ranger/Midnight Commander with intuitive |
| 19 | keyboard navigation and a unique cd-on-exit feature that allows you to navigate your |
| 20 | shell to any directory you select in the explorer. |
| 21 | |
| 22 | Features: |
| 23 | - Dual-pane display (parent dir 30%% | current dir 70%%) |
| 24 | - Real filesystem navigation with directory reading |
| 25 | - Smart selection memory - remembers position when navigating |
| 26 | - Visual hierarchy with dimmed parent pane and active current pane |
| 27 | - Color-coded files (directories, executables, dotfiles, regular files) |
| 28 | - Smooth updates with no flashing, selective redraws |
| 29 | - Arrow key navigation for intuitive movement |
| 30 | - Full-width selection bar with clean highlighting |
| 31 | - CD on exit - press 'c' to navigate your shell to selected directory |
| 32 | |
| 33 | %prep |
| 34 | %autosetup |
| 35 | |
| 36 | %build |
| 37 | fpm build --flag "-O2" |
| 38 | |
| 39 | %install |
| 40 | mkdir -p %{buildroot}%{_bindir} |
| 41 | mkdir -p %{buildroot}%{_datadir}/%{name} |
| 42 | mkdir -p %{buildroot}%{_datadir}/fish/vendor_functions.d |
| 43 | mkdir -p %{buildroot}%{_sysconfdir}/profile.d |
| 44 | mkdir -p %{buildroot}%{_docdir}/%{name} |
| 45 | |
| 46 | # Install the binary |
| 47 | install -Dm755 build/gfortran_*/app/fortress %{buildroot}%{_bindir}/fortress-bin |
| 48 | |
| 49 | # Install shell integration files to shared location |
| 50 | install -Dm644 fortress.sh %{buildroot}%{_datadir}/%{name}/fortress.sh |
| 51 | install -Dm644 fortress.fish %{buildroot}%{_datadir}/%{name}/fortress.fish |
| 52 | |
| 53 | # Install bash integration to profile.d (auto-sourced on login) |
| 54 | install -Dm644 fortress.sh %{buildroot}%{_sysconfdir}/profile.d/fortress.sh |
| 55 | |
| 56 | # Install fish integration to vendor functions (auto-loaded) |
| 57 | install -Dm644 fortress.fish %{buildroot}%{_datadir}/fish/vendor_functions.d/fortress.fish |
| 58 | |
| 59 | # Install documentation |
| 60 | install -Dm644 README.md %{buildroot}%{_docdir}/%{name}/README.md |
| 61 | if [ -f USAGE.md ]; then |
| 62 | install -Dm644 USAGE.md %{buildroot}%{_docdir}/%{name}/USAGE.md |
| 63 | fi |
| 64 | |
| 65 | %files |
| 66 | %license LICENSE |
| 67 | %doc README.md |
| 68 | %{_bindir}/fortress-bin |
| 69 | %{_datadir}/%{name}/fortress.sh |
| 70 | %{_datadir}/%{name}/fortress.fish |
| 71 | %config(noreplace) %{_sysconfdir}/profile.d/fortress.sh |
| 72 | %{_datadir}/fish/vendor_functions.d/fortress.fish |
| 73 | %{_docdir}/%{name}/README.md |
| 74 | |
| 75 | %post |
| 76 | cat <<'EOF' |
| 77 | |
| 78 | ==================================================================== |
| 79 | FORTRESS - Terminal File Explorer |
| 80 | ==================================================================== |
| 81 | |
| 82 | The 'fortress' command is now available! |
| 83 | |
| 84 | Shell integration (cd-on-exit) has been installed: |
| 85 | • Bash: Auto-loaded via /etc/profile.d/fortress.sh |
| 86 | • Fish: Auto-loaded via vendor_functions.d |
| 87 | • Zsh: Add to ~/.zshrc: |
| 88 | source %{_datadir}/%{name}/fortress.sh |
| 89 | |
| 90 | You may need to restart your shell or run: |
| 91 | source /etc/profile.d/fortress.sh # bash |
| 92 | |
| 93 | Usage: |
| 94 | fortress - Start the file explorer |
| 95 | Press 'c' on a directory to cd there and exit |
| 96 | |
| 97 | Documentation: %{_docdir}/%{name}/ |
| 98 | |
| 99 | ==================================================================== |
| 100 | |
| 101 | EOF |
| 102 | |
| 103 | %changelog |
| 104 | * Fri Oct 18 2025 mfw <espadon@outlook.com> - 0.1.0-1 |
| 105 | - Initial RPM release |
| 106 | - Dual-pane file explorer with Fortran implementation |
| 107 | - CD-on-exit functionality with shell integration |
| 108 | - Color-coded file display with visual hierarchy |
| 109 | - Smart selection memory and arrow key navigation |
| 110 | - Automatic shell integration for bash and fish |
| 111 | - Manual setup required for zsh |
| 112 |