| 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: 7%{?dist} | 
|---|
| 8 | License: BSD | 
|---|
| 9 | Group: System Environment/Shells | 
|---|
| 10 | Source: bash.zip | 
|---|
| 11 | #Source: ftp://ftp.debian.org/debian/dists/woody/main/source/shells/%{name}_%{version}.orig.tar.gz | 
|---|
| 12 | #Patch0: ftp://ftp.debian.org/debian/dists/woody/main/source/shells/%{name}_%{version}-38.diff.gz | 
|---|
| 13 | #Patch2: ash-0.3.8-tempfile.patch | 
|---|
| 14 | #Patch1: ash-0.3.8-build.patch | 
|---|
| 15 | #Patch3: ash-0.3.8-mannewline.patch | 
|---|
| 16 | #Patch4: ash-0.3.8-segv.patch | 
|---|
| 17 | #Prereq: fileutils grep | 
|---|
| 18 | #BuildPrereq: pmake >= 1.45 byacc | 
|---|
| 19 | #Buildroot: %{_tmppath}/%{name}-%{version}-root | 
|---|
| 20 | #Conflicts: mkinitrd <= 1.7 | 
|---|
| 21 |  | 
|---|
| 22 | Provides: /@unixroot/bin/bash | 
|---|
| 23 |  | 
|---|
| 24 | %description | 
|---|
| 25 | The GNU Bourne Again shell (Bash) is a shell or command language | 
|---|
| 26 | interpreter that is compatible with the Bourne shell (sh). Bash | 
|---|
| 27 | incorporates useful features from the Korn shell (ksh) and the C shell | 
|---|
| 28 | (csh). Most sh scripts can be run by bash without modification. | 
|---|
| 29 |  | 
|---|
| 30 | %prep | 
|---|
| 31 | %setup -q -n bash-%{version} | 
|---|
| 32 | #%patch0 -p1 -b .linux | 
|---|
| 33 | #%patch2 -p1 -b .tempfile | 
|---|
| 34 | #%ifarch alpha | 
|---|
| 35 | #%patch1 -p1 -b .alpha | 
|---|
| 36 | #%endif | 
|---|
| 37 | #%patch3 -p1 | 
|---|
| 38 | #%patch4 -p0 -b .segv | 
|---|
| 39 | #chmod -R a+rX . | 
|---|
| 40 |  | 
|---|
| 41 | %build | 
|---|
| 42 | #chmod u+x debian/bsdyacc | 
|---|
| 43 | #pmake CFLAGS="-g ${RPM_OPT_FLAGS} \ | 
|---|
| 44 | #    -DBSD=1 -DSMALL -D_GNU_SOURCE \ | 
|---|
| 45 | #    -DGLOB_BROKEN -D__COPYRIGHT\(x\)= \ | 
|---|
| 46 | #    -D__RCSID\(x\)= -D_DIAGASSERT\(x\)=" \ | 
|---|
| 47 | #    YACC=`pwd`/debian/bsdyacc | 
|---|
| 48 | #mv sh sh.dynamic | 
|---|
| 49 | # | 
|---|
| 50 | #pmake CFLAGS="-g ${RPM_OPT_FLAGS} \ | 
|---|
| 51 | #    -DBSD=1 -DSMALL -D_GNU_SOURCE \ | 
|---|
| 52 | #    -DGLOB_BROKEN -D__COPYRIGHT\(x\)= \ | 
|---|
| 53 | #    -D__RCSID\(x\)= -D_DIAGASSERT\(x\)=" \ | 
|---|
| 54 | #    YACC=`pwd`/debian/bsdyacc LDFLAGS="-static" | 
|---|
| 55 | #mv sh sh.static | 
|---|
| 56 |  | 
|---|
| 57 |  | 
|---|
| 58 | %install | 
|---|
| 59 | rm -rf %{buildroot} | 
|---|
| 60 | mkdir -p %{buildroot}%{_bindir} | 
|---|
| 61 |  | 
|---|
| 62 | cp -p usr/bin/bash.exe %{buildroot}%{_bindir}/bash.exe | 
|---|
| 63 |  | 
|---|
| 64 | %clean | 
|---|
| 65 | rm -rf %{buildroot} | 
|---|
| 66 |  | 
|---|
| 67 | %files | 
|---|
| 68 | %defattr(-,root,root) | 
|---|
| 69 | %{_bindir}/bash.exe | 
|---|
| 70 | #%{_mandir}/man1/* | 
|---|
| 71 |  | 
|---|
| 72 | %changelog | 
|---|
| 73 | * Sat Feb 04 2012 yd | 
|---|
| 74 | - added Provides for virtual /@unixroot/bin/bash file. | 
|---|
| 75 | - Remove symlinks from /bin. | 
|---|
| 76 |  | 
|---|
| 77 | * Wed Nov 16 2011 yd | 
|---|
| 78 | - keep all executables to /usr/bin and place symlinks in /bin | 
|---|