]> git.pld-linux.org Git - packages/ash.git/blob - ash.spec
removed post-test rubbish
[packages/ash.git] / ash.spec
1 # Branch: HEAD
2 # conditional build:
3 # if BOOT is defined, build BOOT package too
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:        3
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 %{?BOOT:1}%{!?BOOT:0}
44 BuildRequires:  uClibc-devel-BOOT >= 20000521
45 %endif
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 Conflicts:      mkinitrd <= 1.7
48
49 %define         _bindir         /bin
50
51 %description
52 ash is a bourne shell clone from Berkeley. It supports all of the
53 standard Bourne shell commands and has the advantage of supporting
54 them while remaining considerably smaller than bash.
55
56 %description -l de
57 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
58 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
59 weniger Platz beansprucht als bash.
60
61 %description -l fr
62 ash est un clone Berkeley du shell Bourne. Il gère toutes les
63 commandes standard du shell Bourne et a l'avantage de les gérer tout
64 en restant considérablement plus petit que bash.
65
66 %description -l pl
67 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
68 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
69
70 %description -l tr
71 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
72 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
73 avantajýna sahiptir.
74
75 %package static
76 Summary:        Small bourne shell from Berkeley
77 Summary(de):    Kleine Bourne-Shell von Berkeley
78 Summary(fr):    Shell Bourne réduit de Berkeley
79 Summary(pl):    Ma³y shell bourne'a 
80 Summary(tr):    Ufak bir bourne kabuðu
81 Group:          Applications/Shells
82 Group(de):      Applikationen/Shells
83 Group(pl):      Aplikacje/Pow³oki
84 Prereq:         fileutils
85 Prereq:         grep
86 Conflicts:      mkinitrd <= 1.7
87
88 %description static
89 ash is a bourne shell clone from Berkeley. It supports all of the
90 standard Bourne shell commands and has the advantage of supporting
91 them while remaining considerably smaller than bash.
92
93 %description static -l de
94 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
95 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
96 weniger Platz beansprucht als bash.
97
98 %description static -l fr
99 ash est un clone Berkeley du shell Bourne. Il gère toutes les
100 commandes standard du shell Bourne et a l'avantage de les gérer tout
101 en restant considérablement plus petit que bash.
102
103 %description static -l pl
104 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
105 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
106
107 %description static -l tr
108 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
109 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
110 avantajýna sahiptir.
111
112 %if %{?BOOT:1}%{!?BOOT:0}
113 %package BOOT
114 Summary:        Small bourne shell from Berkeley
115 Summary(de):    Kleine Bourne-Shell von Berkeley
116 Summary(fr):    Shell Bourne réduit de Berkeley
117 Summary(pl):    Ma³y shell bourne'a 
118 Summary(tr):    Ufak bir bourne kabuðu
119 Group:          Applications/Shells
120 Group(de):      Applikationen/Shells
121 Group(pl):      Aplikacje/Pow³oki
122
123 %description BOOT
124 ash is a bourne shell clone from Berkeley. It supports all of the
125 standard Bourne shell commands and has the advantage of supporting
126 them while remaining considerably smaller than bash.
127 Version for bootdisk
128
129 %endif
130
131 %prep
132 %setup -q
133 %patch0 -p1
134 %patch1 -p1
135 %patch2 -p1
136 %patch3 -p1
137 %patch4 -p1
138 %patch5 -p1
139 %patch6 -p1
140 %patch7 -p1
141 %patch8 -p1
142 %patch9 -p1
143 #%patch10 -p1
144 %patch11 -p1
145 %patch12 -p1
146 %patch13 -p1
147 %patch14 -p1
148 %patch15 -p1
149 %patch16 -p1
150 # this is mainly for information, maybe add changelog to %doc?
151 %patch17 -p1
152 %patch18 -p1
153 %patch19 -p1
154 %patch20 -p1
155
156 %build
157 # BOOT
158 %if %{?BOOT:1}%{!?BOOT:0}
159 # some of this utilities does not compile with uClibc
160 # and it is not necessary
161 %{__make} mksignames mkbuiltins mknodes mksignames mksyntax mktokens
162 %{__make} \
163         OPT_FLAGS="-I/usr/lib/bootdisk%{_includedir} -Os" \
164         LDFLAGS="-nostdlib %{rpmldflags}" \
165         LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc"
166 mv -f sh ash.BOOT
167 %{__make} clean
168 %endif
169
170 # this patch imposes memory buffers - uClibc lacks them
171 patch -p1 <%{PATCH10}
172
173 # other
174 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}"
175 mv -f sh ash.static
176 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}"
177
178 %install
179 rm -rf $RPM_BUILD_ROOT
180
181 # BOOT
182 %if %{?BOOT:1}%{!?BOOT:0}
183 install -d $RPM_BUILD_ROOT/usr/lib/bootdisk/bin
184 install ash.BOOT $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/ash
185 ln -sf ash $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/sh
186 %endif
187
188 # other
189 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
190 install sh $RPM_BUILD_ROOT%{_bindir}/ash
191 install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static
192 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
193 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
194 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
195
196 %post
197 if [ ! -f /etc/shells ]; then
198         echo "%{_bindir}/ash" > /etc/shells
199         echo "%{_bindir}/bsh" >> /etc/shells
200 else
201         if ! grep -q '^%{_bindir}/ash$' /etc/shells ; then
202                 echo "%{_bindir}/ash" >> /etc/shells
203         fi
204         if ! grep -q '^%{_bindir}/bsh$' /etc/shells ; then
205                 echo "%{_bindir}/bsh" >> /etc/shells
206         fi
207 fi
208
209 %post static
210 if [ ! -f /etc/shells ]; then
211         echo "%{_bindir}/ash.static" >> /etc/shells
212 else
213         if ! grep -q '^%{_bindir}/ash.static$' /etc/shells ; then
214                 echo "%{_bindir}/ash.static" >> /etc/shells
215         fi
216 fi
217
218 %preun
219 if [ "$1" = 0 ]; then
220         grep -v '^%{_bindir}/ash$' /etc/shells | grep -v '^%{_bindir}/bsh$' > /etc/shells.new
221         mv -f /etc/shells.new /etc/shells
222 fi
223
224 %preun static
225 if [ "$1" = 0 ]; then
226         grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
227         mv -f /etc/shells.new /etc/shells
228 fi
229
230 %verifyscript
231 for n in ash bsh ; do
232     echo -n "Looking for $n in /etc/shells... "
233     if ! grep -q "^%{_bindir}/${n}\$" /etc/shells ; then
234         echo "missing"
235         echo "${n} missing from /etc/shells" >&2
236     else
237         echo "found"
238     fi
239 done
240
241 %verifyscript static
242 echo -n "Looking for ash.static in /etc/shells... "
243 if ! grep -q '^%{_bindir}/ash\.static$' /etc/shells ; then
244         echo "missing"
245         echo "ash.static missing from /etc/shells" >&2
246 else
247         echo "found"
248 fi
249
250 %clean
251 rm -rf $RPM_BUILD_ROOT
252
253 %files
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{_bindir}/ash
256 %attr(755,root,root) %{_bindir}/bsh
257 %{_mandir}/man1/*
258
259 %files static
260 %defattr(644,root,root,755)
261 %attr(755,root,root) %{_bindir}/ash.static
262
263 %if %{?BOOT:1}%{!?BOOT:0}
264 %files BOOT
265 %defattr(644,root,root,755)
266 %attr(755,root,root) /usr/lib/bootdisk/bin/*
267 %endif
This page took 0.044313 seconds and 4 git commands to generate.