source: spec/trunk/SPECS/bash.spec@ 236

Last change on this file since 236 was 236, checked in by Yuri Dario, 14 years ago

spec: sh,bash prepare for /bin removal.

  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
1%define patchleveltag .0
2%define baseversion 3.2
3
4Summary: The GNU Bourne Again shell
5Name: bash
6Version: %{baseversion}%{patchleveltag}
7Release: 6%{?dist}
8License: BSD
9Group: System Environment/Shells
10Source: 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%description
23The GNU Bourne Again shell (Bash) is a shell or command language
24interpreter that is compatible with the Bourne shell (sh). Bash
25incorporates useful features from the Korn shell (ksh) and the C shell
26(csh). Most sh scripts can be run by bash without modification.
27
28%prep
29%setup -q -n bash-%{version}
30#%patch0 -p1 -b .linux
31#%patch2 -p1 -b .tempfile
32#%ifarch alpha
33#%patch1 -p1 -b .alpha
34#%endif
35#%patch3 -p1
36#%patch4 -p0 -b .segv
37#chmod -R a+rX .
38
39%build
40#chmod u+x debian/bsdyacc
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
46#mv sh sh.dynamic
47#
48#pmake CFLAGS="-g ${RPM_OPT_FLAGS} \
49# -DBSD=1 -DSMALL -D_GNU_SOURCE \
50# -DGLOB_BROKEN -D__COPYRIGHT\(x\)= \
51# -D__RCSID\(x\)= -D_DIAGASSERT\(x\)=" \
52# YACC=`pwd`/debian/bsdyacc LDFLAGS="-static"
53#mv sh sh.static
54
55
56%install
57rm -rf %{buildroot}
58mkdir -p %{buildroot}/@unixroot/bin
59mkdir -p %{buildroot}%{_bindir}
60
61cp -p usr/bin/bash.exe %{buildroot}%{_bindir}/bash.exe
62ln -s %{_bindir}bash.exe %{buildroot}/@unixroot/bin/bash
63
64#%post
65#if [ ! -f /etc/shells ]; then
66# echo "/bin/ash" > /etc/shells
67# echo "/bin/bsh" >> /etc/shells
68#else
69# if ! grep '^/bin/ash$' /etc/shells > /dev/null; then
70# echo "/bin/ash" >> /etc/shells
71# fi
72# if ! grep '^/bin/bsh$' /etc/shells > /dev/null; then
73# echo "/bin/bsh" >> /etc/shells
74# fi
75#fi
76
77#%postun
78#if [ "$1" = "0" ]; then
79# grep -v '^/bin/ash' < /etc/shells | grep -v '^/bin/bsh' > /etc/shells.new
80# mv /etc/shells.new /etc/shells
81#fi
82
83%verifyscript
84#
85#for n in ash bsh; do
86# echo -n "Looking for $n in /etc/shells... "
87# if ! grep "^/bin/${n}\$" /etc/shells > /dev/null; then
88# echo "missing"
89# echo "${n} missing from /etc/shells" >&2
90# else
91# echo "found"
92# fi
93#done
94
95%clean
96rm -rf %{buildroot}
97
98%files
99%defattr(-,root,root)
100/@unixroot/bin/bash
101%{_bindir}/bash.exe
102#/bin/bsh
103#%{_mandir}/man1/*
104
105%changelog
106* Wed Nov 16 2011 yd
107- keep all executables to /usr/bin and place symlinks in /bin
Note: See TracBrowser for help on using the repository browser.