| 1 | %define patchleveltag .0 | 
|---|
| 2 | %define baseversion 3.2 | 
|---|
| 3 |  | 
|---|
| 4 | Summary: The GNU Bourne Again shell | 
|---|
| 5 | Name: bash | 
|---|
| 6 | Version: %{baseversion}%{patchleveltag} | 
|---|
| 7 | Release: 8%{?dist} | 
|---|
| 8 | License: BSD | 
|---|
| 9 | Group: System Environment/Shells | 
|---|
| 10 | Source: bash.zip | 
|---|
| 11 |  | 
|---|
| 12 | Provides: /@unixroot/bin/bash | 
|---|
| 13 | Provides: /@unixroot/usr/bin/bash | 
|---|
| 14 |  | 
|---|
| 15 | %description | 
|---|
| 16 | The GNU Bourne Again shell (Bash) is a shell or command language | 
|---|
| 17 | interpreter that is compatible with the Bourne shell (sh). Bash | 
|---|
| 18 | incorporates useful features from the Korn shell (ksh) and the C shell | 
|---|
| 19 | (csh). Most sh scripts can be run by bash without modification. | 
|---|
| 20 |  | 
|---|
| 21 | %prep | 
|---|
| 22 | %setup -q -n bash-%{version} | 
|---|
| 23 | #%patch0 -p1 -b .linux | 
|---|
| 24 | #%patch2 -p1 -b .tempfile | 
|---|
| 25 | #%ifarch alpha | 
|---|
| 26 | #%patch1 -p1 -b .alpha | 
|---|
| 27 | #%endif | 
|---|
| 28 | #%patch3 -p1 | 
|---|
| 29 | #%patch4 -p0 -b .segv | 
|---|
| 30 | #chmod -R a+rX . | 
|---|
| 31 |  | 
|---|
| 32 | %build | 
|---|
| 33 | #chmod u+x debian/bsdyacc | 
|---|
| 34 | #pmake CFLAGS="-g ${RPM_OPT_FLAGS} \ | 
|---|
| 35 | #    -DBSD=1 -DSMALL -D_GNU_SOURCE \ | 
|---|
| 36 | #    -DGLOB_BROKEN -D__COPYRIGHT\(x\)= \ | 
|---|
| 37 | #    -D__RCSID\(x\)= -D_DIAGASSERT\(x\)=" \ | 
|---|
| 38 | #    YACC=`pwd`/debian/bsdyacc | 
|---|
| 39 | #mv sh sh.dynamic | 
|---|
| 40 | # | 
|---|
| 41 | #pmake CFLAGS="-g ${RPM_OPT_FLAGS} \ | 
|---|
| 42 | #    -DBSD=1 -DSMALL -D_GNU_SOURCE \ | 
|---|
| 43 | #    -DGLOB_BROKEN -D__COPYRIGHT\(x\)= \ | 
|---|
| 44 | #    -D__RCSID\(x\)= -D_DIAGASSERT\(x\)=" \ | 
|---|
| 45 | #    YACC=`pwd`/debian/bsdyacc LDFLAGS="-static" | 
|---|
| 46 | #mv sh sh.static | 
|---|
| 47 |  | 
|---|
| 48 |  | 
|---|
| 49 | %install | 
|---|
| 50 | rm -rf %{buildroot} | 
|---|
| 51 | mkdir -p %{buildroot}%{_bindir} | 
|---|
| 52 |  | 
|---|
| 53 | cp -p usr/bin/bash.exe %{buildroot}%{_bindir}/bash.exe | 
|---|
| 54 |  | 
|---|
| 55 | %clean | 
|---|
| 56 | rm -rf %{buildroot} | 
|---|
| 57 |  | 
|---|
| 58 | %files | 
|---|
| 59 | %defattr(-,root,root) | 
|---|
| 60 | %{_bindir}/bash.exe | 
|---|
| 61 | #%{_mandir}/man1/* | 
|---|
| 62 |  | 
|---|
| 63 | %changelog | 
|---|
| 64 | * Fri Feb 19 2016 yd <yd@os2power.com> 3.2.0-8 | 
|---|
| 65 | - added Provides for virtual /@unixroot/usr/bin/bash file. | 
|---|
| 66 |  | 
|---|
| 67 | * Sat Feb 04 2012 yd | 
|---|
| 68 | - added Provides for virtual /@unixroot/bin/bash file. | 
|---|
| 69 | - Remove symlinks from /bin. | 
|---|
| 70 |  | 
|---|
| 71 | * Wed Nov 16 2011 yd | 
|---|
| 72 | - keep all executables to /usr/bin and place symlinks in /bin | 
|---|