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