| 1 | Name: fortsh |
| 2 | Version: 2.0.0 |
| 3 | Release: 1%{?dist} |
| 4 | Summary: Fortran Shell - A modern shell implementation in Fortran with advanced features |
| 5 | |
| 6 | License: MIT |
| 7 | URL: https://github.com/FortranGoingOnForty/fortsh |
| 8 | Source0: %{name}-%{version}.tar.gz |
| 9 | |
| 10 | BuildRequires: gfortran >= 11.0 |
| 11 | BuildRequires: gcc |
| 12 | BuildRequires: make |
| 13 | Requires: glibc |
| 14 | |
| 15 | %description |
| 16 | Fortsh (Fortran Shell) is a modern Unix shell implementation written in Fortran 2018 |
| 17 | that demonstrates Fortran's capability for system programming. It provides advanced |
| 18 | shell features including comprehensive built-in commands, job control, pattern matching, |
| 19 | performance monitoring, and complete scripting support. |
| 20 | |
| 21 | Features: |
| 22 | - Advanced I/O & Process Management (pipes, process substitution, coprocesses, brace expansion) |
| 23 | - Comprehensive Built-in Command Library (printf, read, getopts, pushd/popd, type/which) |
| 24 | - Advanced test operations with [[ ]] syntax and pattern matching |
| 25 | - Full scripting support (loops, functions, local variables, interactive input) |
| 26 | - Job control enhancements (suspend/resume, background process management) |
| 27 | - Enhanced command substitution with nesting and signal handling |
| 28 | - Pattern matching and globbing (*,?,[]) with brace expansion |
| 29 | - Performance monitoring and memory management with optimization |
| 30 | - Compatible with bash/zsh scripts and modern shell workflows |
| 31 | |
| 32 | %prep |
| 33 | %autosetup |
| 34 | |
| 35 | %build |
| 36 | make clean |
| 37 | make all |
| 38 | |
| 39 | %check |
| 40 | make test |
| 41 | |
| 42 | %install |
| 43 | mkdir -p %{buildroot}%{_bindir} |
| 44 | mkdir -p %{buildroot}%{_mandir}/man1 |
| 45 | mkdir -p %{buildroot}%{_docdir}/%{name} |
| 46 | |
| 47 | # Install binary |
| 48 | install -Dm755 bin/fortsh %{buildroot}%{_bindir}/fortsh |
| 49 | |
| 50 | # Install documentation |
| 51 | install -Dm644 README.md %{buildroot}%{_docdir}/%{name}/README.md |
| 52 | |
| 53 | %files |
| 54 | %doc README.md |
| 55 | %{_bindir}/fortsh |
| 56 | %{_docdir}/%{name}/README.md |
| 57 | |
| 58 | %changelog |
| 59 | * Wed Aug 28 2024 mfw <espadon@outlook.com> - 2.0.0-1 |
| 60 | - Full POSIX Compliance implementation |
| 61 | - Complete parameter expansion: ${var:-word}, ${var%pattern}, ${var#pattern} |
| 62 | - Positional parameters: $1, $2, $#, $*, $@ with proper handling |
| 63 | - Field splitting with $IFS support for word boundary control |
| 64 | - File descriptor redirection: n>file, n<file, <&n, >&n syntax |
| 65 | - Quote removal and tilde expansion for proper path handling |
| 66 | - All POSIX required built-ins: type, unset, readonly, shift, exec, eval |
| 67 | - Enterprise-grade POSIX.1-2017 compliance achieved |
| 68 | |
| 69 | * Wed Aug 28 2024 mfw <espadon@outlook.com> - 1.5.0-1 |
| 70 | - Phase 9 implementation: POSIX Compliance & Shell Standards |
| 71 | - Shell options framework: set -e, set -u, set -o pipefail, shopt commands |
| 72 | - Proper pipeline exit status handling with POSIX compliance |
| 73 | - Special variables: $$, $!, $?, $0, $PPID with automatic expansion |
| 74 | - Errexit integration for command failure handling |
| 75 | - Enhanced bash/zsh compatibility (~90% achieved) |
| 76 | - POSIX-compliant shell behavior for enterprise use |
| 77 | |
| 78 | * Wed Aug 28 2024 mfw <espadon@outlook.com> - 1.4.0-1 |
| 79 | - Phase 8 implementation: Advanced Shell Features |
| 80 | - Case statements: case/esac with pattern matching and wildcard support |
| 81 | - Here documents/strings: << <<- <<< operators with variable expansion |
| 82 | - History expansion: !!, !n, !-n, !string patterns with command search |
| 83 | - Enhanced aliases: parameter support with $1, $2, $*, $@, $#, ${n} |
| 84 | - Command line editing: Emacs and Vi modes with proper mode switching |
| 85 | - Associative arrays: key-value storage with declare, set, get operations |
| 86 | - Advanced shell features for improved bash/zsh compatibility |
| 87 | |
| 88 | * Wed Aug 28 2024 mfw <espadon@outlook.com> - 1.3.0-1 |
| 89 | - Phase 7 implementation: Built-in Command Library |
| 90 | - Advanced test operations: [[ ]] syntax with pattern matching, regex support |
| 91 | - Printf built-in: comprehensive formatting with %s, %d, %f, %x specifiers |
| 92 | - Interactive read built-in: -p prompt, -t timeout, -s silent, -a array modes |
| 93 | - Getopts command: full option parsing with OPTIND, OPTARG support |
| 94 | - Directory operations: pushd/popd/dirs with stack management |
| 95 | - Command identification: type/which/command for locating executables |
| 96 | - Enhanced built-in command library with 25+ commands |
| 97 | |
| 98 | * Wed Aug 28 2024 mfw <espadon@outlook.com> - 1.2.0-1 |
| 99 | - Phase 6 implementation: Advanced I/O & Process Management |
| 100 | - Enhanced command substitution with nested $(command $(inner)) support |
| 101 | - Process substitution: <(command) and >(command) functionality |
| 102 | - Brace expansion: {a,b,c}, {1..10}, {a..z} patterns |
| 103 | - Coprocess support: coproc command bidirectional communication |
| 104 | - Advanced signal handling: timeout, enhanced traps, process groups |
| 105 | - Built-in timeout command with automatic process termination |
| 106 | |
| 107 | * Wed Aug 28 2024 mfw <espadon@outlook.com> - 1.1.0-1 |
| 108 | - Phase 5 implementation: Core Language Extensions |
| 109 | - Array variables support: arr=(a b c), ${arr[0]}, ${arr[@]} |
| 110 | - Parameter expansion: ${var:offset:length}, ${var:-default}, ${#var} |
| 111 | - Arithmetic expansion: $((expression)) with basic math operations |
| 112 | - Enhanced variable assignment and expansion system |
| 113 | |
| 114 | * Sun Aug 25 2024 mfw <espadon@outlook.com> - 1.0.1-1 |
| 115 | - Enhanced shell functionality with functions and command substitution |
| 116 | - Improved variable expansion with parameter substitution |
| 117 | - Enhanced readline with history and tab completion |
| 118 | - Source file execution support |
| 119 | - Advanced scripting capabilities |
| 120 | |
| 121 | * Sun Aug 25 2024 mfw <espadon@outlook.com> - 1.0.0-1 |
| 122 | - Initial RPM release |
| 123 | - Complete Fortran shell implementation |
| 124 | - Advanced I/O redirection and job control |
| 125 | - Performance monitoring and memory management |
| 126 | - Pattern matching and globbing support |
| 127 | - Full scripting capabilities with control flow |
| 128 | - Comprehensive test suite and error handling |