]> git.pld-linux.org Git - packages/ash.git/blob - ash.spec
- removed redundant /s from paths
[packages/ash.git] / ash.spec
1 # conditional build
2 # --without static
3 # --with dietlibc (link with dietlibc, implies --without static)
4 # Branch: HEAD
5
6 %{?_with_dietlibc:%define _without_static 1}
7
8 Summary:        Small bourne shell from Berkeley
9 Summary(de):    Kleine Bourne-Shell von Berkeley
10 Summary(es):    Pequeña shell bourne de Berkeley
11 Summary(fr):    Shell Bourne réduit de Berkeley
12 Summary(pl):    Ma³y shell bourne'a
13 Summary(pt_BR): Pequena shell bourne de Berkeley
14 Summary(ru):    ïÂÌÅÇÞÅÎÎÁÑ ×ÅÒÓÉÑ Bourne shell (sh)
15 Summary(tr):    Ufak bir bourne kabuðu
16 Summary(uk):    ðÏÌÅÇÛÅÎÁ ×ÅÒӦѠBourne shell (sh)
17 Summary(zh_CN): [ϵͳ]BerkeleyµÄ΢ÐÍBourne Shell
18 Summary(zh_TW): [\e-A¨t\e$)B²Î]Berkeleyªº\e-A·L\e$)B«¬Bourne Shell
19 Name:           ash
20 Version:        0.4.0
21 Release:        8
22 License:        BSD
23 Group:          Applications/Shells
24 Source0:        %{name}-%{version}.tar.gz
25 # Source0-md5:  1c59f5b62a081cb0cb3b053c01d79529
26 Patch0:         %{name}-builtin.patch
27 Patch1:         %{name}-echo.patch
28 Patch2:         %{name}-getcwd.patch
29 Patch3:         %{name}-getopt.patch
30 Patch4:         %{name}-glob.patch
31 Patch5:         %{name}-jobs.patch
32 Patch6:         %{name}-kill.patch
33 Patch7:         %{name}-makefile.patch
34 Patch8:         %{name}-manpage.patch
35 Patch9:         %{name}-hetio.patch
36 Patch10:        %{name}-memout.patch
37 Patch11:        %{name}-misc.patch
38 Patch12:        %{name}-redir.patch
39 Patch13:        %{name}-setmode.patch
40 Patch14:        %{name}-syntax.patch
41 Patch15:        %{name}-test.patch
42 Patch16:        %{name}-times.patch
43 Patch17:        %{name}-debian.patch
44 Patch18:        %{name}-ppid.patch
45 Patch19:        %{name}-freebsd.patch
46 Patch20:        %{name}-sighup.patch
47 Patch21:        %{name}-dietlibc.patch
48 BuildRequires:  byacc
49 %{?_with_dietlibc:BuildRequires:        dietlibc-static}
50 BuildRequires:  flex
51 %{!?_without_static:BuildRequires:      glibc-static}
52 Requires(post,preun,verify):    grep
53 Requires(preun):        fileutils
54 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 Conflicts:      mkinitrd <= 1.7
56
57 %define         _bindir         /bin
58
59 %description
60 ash is a bourne shell clone from Berkeley. It supports all of the
61 standard Bourne shell commands and has the advantage of supporting
62 them while remaining considerably smaller than bash.
63
64 %description -l de
65 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
66 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
67 weniger Platz beansprucht als bash.
68
69 %description -l es
70 ash es un clone del shell bourne de Berkeley. Soporta todos los
71 comandos padrón de la Bourne shell y tiene la ventaja de soportarlos
72 con un tamaño considerablemente menor del que bash.
73
74 %description -l fr
75 ash est un clone Berkeley du shell Bourne. Il gère toutes les
76 commandes standard du shell Bourne et a l'avantage de les gérer tout
77 en restant considérablement plus petit que bash.
78
79 %description -l pl
80 Ash jest klonem shella Bourne'a z Berkeley. Obs³uguje standardowe
81 komendy shella Bourne'a i jest mniejszy ni¿ bash.
82
83 %description -l pt_BR
84 ash é um clone do shell bourne de Berkeley. Ele suporta todos os
85 comandos-padrão da Bourne shell e tem a vantagem de suportá-los com um
86 tamanho consideravelmente menor do que bash.
87
88 %description -l ru
89 ûÅÌÌ - ÜÔÏ ÂÁÚÏ×ÁÑ ÓÉÓÔÅÍÎÁÑ ÐÒÏÇÒÁÍÍÁ, ËÏÔÏÒÁÑ ÉÎÔÅÒÐÒÅÔÉÒÕÅÔ ËÏÍÁÎÄÙ
90 ÐÏÌØÚÏ×ÁÔÅÌÑ, ××ÏÄÉÍÙÅ Ó ËÌÁ×ÉÁÔÕÒÙ ÉÌÉ ÐÒÉ ÐÏÍÏÝÉ ÍÙÛÉ. Ash - ÜÔÏ
91 ËÌÏΠBourne shell (sh) ÉÚ âÅÒËÌÉ. Ash ÐÏÄÄÅÒÖÉ×ÁÅÔ ×ÓÅ ÓÔÁÎÄÁÒÔÎÙÅ
92 ËÏÍÁÎÄÙ ÛÅÌÌÁ sh, ÂÕÄÕÞÉ ÚÎÁÞÉÔÅÌØÎÏ ÍÅÎØÛÅ ÞÅÍ sh. ÷ ash ÏÔÓÕÔÓÔ×ÕÀÔ
93 ÎÅËÏÔÏÒÙÅ ×ÏÚÍÏÖÎÏÓÔÉ Bourne shell (ÎÁÐÒÉÍÅÒ, ÉÓÔÏÒÉÑ ËÏÍÁÎÄ), ÎÏ ÏÎ
94 ÔÒÅÂÕÅÔ ÚÎÁÞÉÔÅÌØÎÏ ÍÅÎØÛÅ ÐÁÍÑÔÉ.
95
96 %description -l tr
97 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
98 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
99 avantajýna sahiptir.
100
101 %description -l uk
102 ûÅÌ - ÃÅ ÂÁÚÏ×Á ÓÉÓÔÅÍÎÁ ÐÒÏÇÒÁÍÁ, ËÏÔÒÁ ¦ÎÔÅÒÐÒÅÔÕ¤ ËÏÍÁÎÄÉ
103 ËÏÒÉÓÔÕ×ÁÞÁ, Ñ˦ ××ÏÄÑÔØÓÑ Ú ËÌÁצÁÔÕÒÉ ÁÂÏ ÚÁ ÄÏÐÏÍÏÇÏÀ ÍÉÛ¦. Ash -
104 ÃÅ ËÌÏΠBourne shell (sh) Ú âÅÒË̦. Ash Ð¦ÄÔÒÉÍÕ¤ ÕÓ¦ ÓÔÁÎÄÁÒÔΦ
105 ËÏÍÁÎÄÉ ÛÅÌÁ sh, ÂÕÄÕÞÉ ÚÎÁÞÎÏ ÍÅÎÛÉ͠Φ֠sh. ÷ ash ×¦ÄÓÕÔΦ ÄÅÑ˦
106 ÍÏÖÌÉ×ÏÓÔ¦ Bourne shell (ÎÁÐÒÉËÌÁÄ, ¦ÓÔÏҦѠËÏÍÁÎÄ), ÚÁÔŠצΠ×ÉÍÁÇÁ¤
107 ÚÎÁÞÎÏ ÍÅÎÛÅ ÐÁÍ'ÑÔ¦.
108
109 %package static
110 Summary:        Small bourne shell from Berkeley
111 Summary(de):    Kleine Bourne-Shell von Berkeley
112 Summary(fr):    Shell Bourne réduit de Berkeley
113 Summary(pl):    Ma³y shell bourne'a
114 Summary(tr):    Ufak bir bourne kabuðu
115 Group:          Applications/Shells
116 Requires(post,preun,verify):    grep
117 Requires(preun):        fileutils
118 Conflicts:      mkinitrd <= 1.7
119
120 %description static
121 ash is a bourne shell clone from Berkeley. It supports all of the
122 standard Bourne shell commands and has the advantage of supporting
123 them while remaining considerably smaller than bash.
124
125 %description static -l de
126 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
127 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
128 weniger Platz beansprucht als bash.
129
130 %description static -l fr
131 ash est un clone Berkeley du shell Bourne. Il gère toutes les
132 commandes standard du shell Bourne et a l'avantage de les gérer tout
133 en restant considérablement plus petit que bash.
134
135 %description static -l pl
136 Ash jest klonem shella Bourne'a z Berkeley. Obs³uguje standardowe
137 komendy shella Bourne'a i jest mniejszy ni¿ bash.
138
139 %description static -l tr
140 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
141 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
142 avantajýna sahiptir.
143
144 %prep
145 %setup -q
146 %patch0 -p1
147 %patch1 -p1
148 %patch2 -p1
149 %patch3 -p1
150 %patch4 -p1
151 %patch5 -p1
152 %patch6 -p1
153 %patch7 -p1
154 %patch8 -p1
155 %patch9 -p1
156 %patch10 -p1
157 %patch11 -p1
158 %patch12 -p1
159 %patch13 -p1
160 %patch14 -p1
161 %patch15 -p1
162 %patch16 -p1
163 # this is mainly for information, maybe add changelog to %doc?
164 %patch17 -p1
165 %patch18 -p1
166 %patch19 -p1
167 %patch20 -p1
168 %{?_with_dietlibc:%patch21 -p1}
169
170 %build
171
172 %{?_with_dietlibc:%define __cc %{_arch}-dietlibc-gcc}
173
174 %{!?_without_static:%{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}"}
175 %{!?_without_static:mv -f sh ash.static}
176 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" CC="%{__cc}"
177
178 %install
179 rm -rf $RPM_BUILD_ROOT
180 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
181
182 install sh $RPM_BUILD_ROOT%{_bindir}/ash
183 %{!?_without_static:install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static}
184 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
185 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
186 ln -sf ash $RPM_BUILD_ROOT%{_bindir}/bsh
187
188 %clean
189 rm -rf $RPM_BUILD_ROOT
190
191 %post
192 umask 022
193 if [ ! -f /etc/shells ]; then
194         echo "%{_bindir}/ash" > /etc/shells
195         echo "%{_bindir}/bsh" >> /etc/shells
196 else
197         if ! grep -q '^%{_bindir}/ash$' /etc/shells ; then
198                 echo "%{_bindir}/ash" >> /etc/shells
199         fi
200         if ! grep -q '^%{_bindir}/bsh$' /etc/shells ; then
201                 echo "%{_bindir}/bsh" >> /etc/shells
202         fi
203 fi
204
205 %preun
206 if [ "$1" = 0 ]; then
207         umask 022
208         grep -v '^%{_bindir}/ash$' /etc/shells | grep -v '^%{_bindir}/bsh$' > /etc/shells.new
209         mv -f /etc/shells.new /etc/shells
210 fi
211
212 %post static
213 umask 022
214 if [ ! -f /etc/shells ]; then
215         echo "%{_bindir}/ash.static" >> /etc/shells
216 else
217         if ! grep -q '^%{_bindir}/ash.static$' /etc/shells ; then
218                 echo "%{_bindir}/ash.static" >> /etc/shells
219         fi
220 fi
221
222 %preun static
223 if [ "$1" = 0 ]; then
224         umask 022
225         grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
226         mv -f /etc/shells.new /etc/shells
227 fi
228
229 %verifyscript
230 for n in ash bsh ; do
231         echo -n "Looking for $n in /etc/shells... "
232         if ! grep -q "^%{_bindir}/${n}\$" /etc/shells ; then
233                 echo "missing"
234                 echo "${n} missing from /etc/shells" >&2
235         else
236                 echo "found"
237         fi
238 done
239
240 %verifyscript static
241 echo -n "Looking for ash.static in /etc/shells... "
242 if ! grep -q '^%{_bindir}/ash\.static$' /etc/shells ; then
243         echo "missing"
244         echo "ash.static missing from /etc/shells" >&2
245 else
246         echo "found"
247 fi
248
249 %files
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_bindir}/ash
252 %attr(755,root,root) %{_bindir}/bsh
253 %{_mandir}/man1/*
254
255 %{!?_without_static:%files static}
256 %{!?_without_static:%defattr(644,root,root,755)}
257 %{!?_without_static:%attr(755,root,root) %{_bindir}/ash.static}
This page took 0.04588 seconds and 4 git commands to generate.