]> git.pld-linux.org Git - packages/ash.git/blob - ash.spec
- typos.
[packages/ash.git] / ash.spec
1 # conditional build:
2 # if BOOT is defined, build BOOT package too
3 Summary:        Small bourne shell from Berkeley
4 Summary(de):    Kleine Bourne-Shell von Berkeley
5 Summary(fr):    Shell Bourne réduit de Berkeley
6 Summary(pl):    Ma³y shell bourne'a 
7 Summary(tr):    Ufak bir bourne kabuðu
8 Name:           ash
9 Version:        0.4.0
10 Release:        1
11 License:        BSD
12 Group:          Applications/Shells
13 Group(de):      Applikationen/Shells
14 Group(pl):      Aplikacje/Pow³oki
15 Source:         ash-%{version}.tar.gz
16 Patch0:         ash-builtin.patch
17 Patch1:         ash-echo.patch
18 Patch2:         ash-getcwd.patch
19 Patch3:         ash-getopt.patch
20 Patch4:         ash-glob.patch
21 Patch5:         ash-jobs.patch
22 Patch6:         ash-kill.patch
23 Patch7:         ash-makefile.patch
24 Patch8:         ash-manpage.patch
25 Patch9:         ash-hetio.patch
26 Patch10:        ash-memout.patch
27 Patch11:        ash-misc.patch
28 Patch12:        ash-redir.patch
29 Patch13:        ash-setmode.patch
30 Patch14:        ash-syntax.patch
31 Patch15:        ash-test.patch
32 Patch16:        ash-times.patch
33 Patch17:        ash-debian.patch
34 Patch18:        ash-ppid.patch
35 Patch19:        ash-freebsd.patch
36 Prereq:         fileutils
37 Prereq:         grep
38 BuildRequires:  glibc-static
39 %{?BOOT:BuildRequires:  uClibc-devel-BOOT}
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 Conflicts:      mkinitrd <= 1.7
42
43 %define         _bindir         /bin
44
45 %description
46 ash is a bourne shell clone from Berkeley. It supports all of the
47 standard Bourne shell commands and has the advantage of supporting
48 them while remaining considerably smaller than bash.
49
50 %description -l de
51 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
52 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
53 weniger Platz beansprucht als bash.
54
55 %description -l fr
56 ash est un clone Berkeley du shell Bourne. Il gère toutes les
57 commandes standard du shell Bourne et a l'avantage de les gérer tout
58 en restant considérablement plus petit que bash.
59
60 %description -l pl
61 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
62 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
63
64 %description -l tr
65 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
66 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
67 avantajýna sahiptir.
68
69 %package static
70 Summary:        Small bourne shell from Berkeley
71 Summary(de):    Kleine Bourne-Shell von Berkeley
72 Summary(fr):    Shell Bourne réduit de Berkeley
73 Summary(pl):    Ma³y shell bourne'a 
74 Summary(tr):    Ufak bir bourne kabuðu
75 Group:          Applications/Shells
76 Group(de):      Applikationen/Shells
77 Group(pl):      Aplikacje/Pow³oki
78 Prereq:         fileutils
79 Prereq:         grep
80 Conflicts:      mkinitrd <= 1.7
81
82 %description static
83 ash is a bourne shell clone from Berkeley. It supports all of the
84 standard Bourne shell commands and has the advantage of supporting
85 them while remaining considerably smaller than bash.
86
87 %description static -l de
88 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
89 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
90 weniger Platz beansprucht als bash.
91
92 %description static -l fr
93 ash est un clone Berkeley du shell Bourne. Il gère toutes les
94 commandes standard du shell Bourne et a l'avantage de les gérer tout
95 en restant considérablement plus petit que bash.
96
97 %description static -l pl
98 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
99 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
100
101 %description static -l tr
102 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
103 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
104 avantajýna sahiptir.
105
106 %if %{?BOOT:1}%{!?BOOT:0}
107 %package BOOT
108 Summary:        Small bourne shell from Berkeley
109 Summary(de):    Kleine Bourne-Shell von Berkeley
110 Summary(fr):    Shell Bourne réduit de Berkeley
111 Summary(pl):    Ma³y shell bourne'a 
112 Summary(tr):    Ufak bir bourne kabuðu
113 Group:          Applications/Shells
114 Group(de):      Applikationen/Shells
115 Group(pl):      Aplikacje/Pow³oki
116
117 %description BOOT
118 ash is a bourne shell clone from Berkeley. It supports all of the
119 standard Bourne shell commands and has the advantage of supporting
120 them while remaining considerably smaller than bash.
121 Version for bootdisk
122
123 %endif
124
125 %prep
126 %setup -q -n ash-%{version}
127 %patch0 -p1
128 %patch1 -p1
129 %patch2 -p1
130 %patch3 -p1
131 %patch4 -p1
132 %patch5 -p1
133 %patch6 -p1
134 %patch7 -p1
135 %patch8 -p1
136 %patch9 -p1
137 %patch10 -p1
138 %patch11 -p1
139 %patch12 -p1
140 %patch13 -p1
141 %patch14 -p1
142 %patch15 -p1
143 %patch16 -p1
144 # this is mainly for information, maybe add changelog to %doc?
145 %patch17 -p1
146 %patch18 -p1
147 %patch19 -p1
148
149 %build
150 # BOOT
151 %if %{?BOOT:1}%{!?BOOT:0}
152 %{__make} \
153         OPT_FLAGS="-I/usr/lib/bootdisk%{_includedir} -Os" \
154         LDFLAGS="-nostdlib %{rpmldflags}" \
155         LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc"
156 mv -f sh ash.BOOT
157 %{__make} clean
158 %endif
159
160 # other
161 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}"
162 mv -f sh ash.static
163 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}"
164
165 %install
166 rm -rf $RPM_BUILD_ROOT
167
168 # BOOT
169 %if %{?BOOT:1}%{!?BOOT:0}
170 install -d $RPM_BUILD_ROOT/usr/lib/bootdisk/bin
171 install ash.BOOT $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/ash
172 ln -s ash $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/sh
173 %endif
174
175 # other
176 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
177 install sh $RPM_BUILD_ROOT%{_bindir}/ash
178 install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static
179 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
180 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
181 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
182
183 %post
184 if [ ! -f /etc/shells ]; then
185         echo "%{_bindir}/ash" > /etc/shells
186         echo "%{_bindir}/bsh" >> /etc/shells
187 else
188         if ! grep '^%{_bindir}/ash$' /etc/shells > /dev/null; then
189                 echo "%{_bindir}/ash" >> /etc/shells
190         fi
191         if ! grep '^%{_bindir}/bsh$' /etc/shells > /dev/null; then
192                 echo "%{_bindir}/bsh" >> /etc/shells
193         fi
194 fi
195
196 %post static
197 if [ ! -f /etc/shells ]; then
198         echo "%{_bindir}/ash.static" >> /etc/shells
199 else
200         if ! grep '^%{_bindir}/ash.static$' /etc/shells > /dev/null; then
201                 echo "%{_bindir}/ash.static" >> /etc/shells
202         fi
203 fi
204
205 %preun
206 if [ "$0" = 0 ]; then
207         grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh | grep -v %{_bindir}/ash.static > /etc/shells.new
208         mv -f /etc/shells.new /etc/shells
209 fi
210
211 %preun static
212 if [ "$0" = 0 ]; then
213         grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh > /etc/shells.new
214         mv -f /etc/shells.new /etc/shells
215 fi
216
217 %verifyscript
218 for n in ash bsh ash.static; do
219     echo -n "Looking for $n in /etc/shells... "
220     if ! grep "^%{_bindir}/${n}\$" /etc/shells > /dev/null; then
221         echo "missing"
222         echo "${n} missing from /etc/shells" >&2
223     else
224         echo "found"
225     fi
226 done
227
228 %clean
229 rm -rf $RPM_BUILD_ROOT
230
231 %files
232 %defattr(644,root,root,755)
233 %attr(755,root,root) %{_bindir}/ash
234 %attr(755,root,root) %{_bindir}/bsh
235 %{_mandir}/man1/*
236
237 %files static
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_bindir}/ash.static
240
241 %if %{?BOOT:1}%{!?BOOT:0}
242 %files BOOT
243 %defattr(644,root,root,755)
244 %attr(755,root,root) /usr/lib/bootdisk/bin/*
245 %endif
This page took 0.088603 seconds and 4 git commands to generate.