source: spec/trunk/SPECS/ash.spec@ 16

Last change on this file since 16 was 11, checked in by Yuri Dario, 15 years ago

spec: initial import for base .spec files.

  • Property svn:eol-style set to native
File size: 3.0 KB
Line 
1Summary: A smaller version of the Bourne shell (sh).
2Name: ash
3Version: 0.0.0
4Release: 1
5License: BSD
6Group: System Environment/Shells
7Source: ash.zip
8#Source: ftp://ftp.debian.org/debian/dists/woody/main/source/shells/%{name}_%{version}.orig.tar.gz
9#Patch0: ftp://ftp.debian.org/debian/dists/woody/main/source/shells/%{name}_%{version}-38.diff.gz
10#Patch2: ash-0.3.8-tempfile.patch
11#Patch1: ash-0.3.8-build.patch
12#Patch3: ash-0.3.8-mannewline.patch
13#Patch4: ash-0.3.8-segv.patch
14#Prereq: fileutils grep
15#BuildPrereq: pmake >= 1.45 byacc
16#Buildroot: %{_tmppath}/%{name}-%{version}-root
17#Conflicts: mkinitrd <= 1.7
18
19%description
20A shell is a basic system program that interprets keyboard and mouse
21commands. The ash shell is a clone of Berkeley's Bourne shell
22(sh). Ash supports all of the standard sh shell commands, but is
23considerably smaller than sh. The ash shell lacks some Bourne shell
24features (for example, command-line histories), but it uses a lot less
25memory.
26
27You should install ash if you need a lightweight shell with many of
28the same capabilities as the sh shell.
29
30%prep
31%setup -q -n ash-%{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
59rm -rf %{buildroot}
60mkdir -p %{buildroot}/@unixroot/bin
61mkdir -p %{buildroot}%{_bindir}
62mkdir -p %{buildroot}%{_mandir}/man1
63
64cp bin/ash.exe %{buildroot}/@unixroot/bin/sh
65cp bin/ash.exe %{buildroot}%{_bindir}/sh.exe
66
67cp bin/ash.exe %{buildroot}/@unixroot/bin/env
68cp bin/env.exe %{buildroot}%{_bindir}/env
69
70cp usr/man/man1/ash.1.gz %{buildroot}%{_mandir}/man1/ash.1.gz
71#ln -sf ash.1 %{buildroot}%{_mandir}/man1/bsh.1
72#ln -sf ash %{buildroot}/bin/bsh
73#install -m 755 sh.static %{buildroot}/bin/ash.static
74
75#%post
76#if [ ! -f /etc/shells ]; then
77# echo "/bin/ash" > /etc/shells
78# echo "/bin/bsh" >> /etc/shells
79#else
80# if ! grep '^/bin/ash$' /etc/shells > /dev/null; then
81# echo "/bin/ash" >> /etc/shells
82# fi
83# if ! grep '^/bin/bsh$' /etc/shells > /dev/null; then
84# echo "/bin/bsh" >> /etc/shells
85# fi
86#fi
87
88#%postun
89#if [ "$1" = "0" ]; then
90# grep -v '^/bin/ash' < /etc/shells | grep -v '^/bin/bsh' > /etc/shells.new
91# mv /etc/shells.new /etc/shells
92#fi
93
94%verifyscript
95#
96#for n in ash bsh; do
97# echo -n "Looking for $n in /etc/shells... "
98# if ! grep "^/bin/${n}\$" /etc/shells > /dev/null; then
99# echo "missing"
100# echo "${n} missing from /etc/shells" >&2
101# else
102# echo "found"
103# fi
104#done
105
106%clean
107rm -rf %{buildroot}
108
109%files
110%defattr(-,root,root)
111/@unixroot/bin/sh
112/@unixroot/bin/env
113%{_bindir}/sh.exe
114%{_bindir}/env
115#/bin/bsh
116%{_mandir}/man1/*
Note: See TracBrowser for help on using the repository browser.