]> git.pld-linux.org Git - packages/ash.git/blob - ash.spec
- merge translations from KSI.
[packages/ash.git] / ash.spec
1 # conditional build
2 # --without static
3 # Branch: HEAD
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(ru):    ïÂÌÅÇÞÅÎÎÁÑ ×ÅÒÓÉÑ Bourne shell (sh)
9 Summary(tr):    Ufak bir bourne kabuðu
10 Summary(uk):    ðÏÌÅÇÛÅÎÁ ×ÅÒӦѠBourne shell (sh)
11 Name:           ash
12 Version:        0.4.0
13 Release:        8
14 License:        BSD
15 Group:          Applications/Shells
16 Source0:        %{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 %{!?_without_static:BuildRequires:      glibc-static}
41 BuildRequires:  flex
42 BuildRequires:  byacc
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 Conflicts:      mkinitrd <= 1.7
45
46 %define         _bindir         /bin
47
48 %description
49 ash is a bourne shell clone from Berkeley. It supports all of the
50 standard Bourne shell commands and has the advantage of supporting
51 them while remaining considerably smaller than bash.
52
53 %description -l de
54 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
55 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
56 weniger Platz beansprucht als bash.
57
58 %description -l fr
59 ash est un clone Berkeley du shell Bourne. Il gère toutes les
60 commandes standard du shell Bourne et a l'avantage de les gérer tout
61 en restant considérablement plus petit que bash.
62
63 %description -l pl
64 Ash jest klonem shella Bourne'a z Berkeley. Obs³uguje standardowe
65 komendy shella Bourne'a i jest mniejszy ni¿ bash.
66
67 %description -l ru
68 ûÅÌÌ - ÜÔÏ ÂÁÚÏ×ÁÑ ÓÉÓÔÅÍÎÁÑ ÐÒÏÇÒÁÍÍÁ, ËÏÔÏÒÁÑ ÉÎÔÅÒÐÒÅÔÉÒÕÅÔ ËÏÍÁÎÄÙ
69 ÐÏÌØÚÏ×ÁÔÅÌÑ, ××ÏÄÉÍÙÅ Ó ËÌÁ×ÉÁÔÕÒÙ ÉÌÉ ÐÒÉ ÐÏÍÏÝÉ ÍÙÛÉ. Ash - ÜÔÏ
70 ËÌÏΠBourne shell (sh) ÉÚ âÅÒËÌÉ. Ash ÐÏÄÄÅÒÖÉ×ÁÅÔ ×ÓÅ ÓÔÁÎÄÁÒÔÎÙÅ
71 ËÏÍÁÎÄÙ ÛÅÌÌÁ sh, ÂÕÄÕÞÉ ÚÎÁÞÉÔÅÌØÎÏ ÍÅÎØÛÅ ÞÅÍ sh. ÷ ash ÏÔÓÕÔÓÔ×ÕÀÔ
72 ÎÅËÏÔÏÒÙÅ ×ÏÚÍÏÖÎÏÓÔÉ Bourne shell (ÎÁÐÒÉÍÅÒ, ÉÓÔÏÒÉÑ ËÏÍÁÎÄ), ÎÏ ÏÎ
73 ÔÒÅÂÕÅÔ ÚÎÁÞÉÔÅÌØÎÏ ÍÅÎØÛÅ ÐÁÍÑÔÉ.
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 %description -l uk
81 ûÅÌ - ÃÅ ÂÁÚÏ×Á ÓÉÓÔÅÍÎÁ ÐÒÏÇÒÁÍÁ, ËÏÔÒÁ ¦ÎÔÅÒÐÒÅÔÕ¤ ËÏÍÁÎÄÉ
82 ËÏÒÉÓÔÕ×ÁÞÁ, Ñ˦ ××ÏÄÑÔØÓÑ Ú ËÌÁצÁÔÕÒÉ ÁÂÏ ÚÁ ÄÏÐÏÍÏÇÏÀ ÍÉÛ¦. Ash -
83 ÃÅ ËÌÏΠBourne shell (sh) Ú âÅÒË̦. Ash Ð¦ÄÔÒÉÍÕ¤ ÕÓ¦ ÓÔÁÎÄÁÒÔΦ
84 ËÏÍÁÎÄÉ ÛÅÌÁ sh, ÂÕÄÕÞÉ ÚÎÁÞÎÏ ÍÅÎÛÉ͠Φ֠sh. ÷ ash ×¦ÄÓÕÔΦ ÄÅÑ˦
85 ÍÏÖÌÉ×ÏÓÔ¦ Bourne shell (ÎÁÐÒÉËÌÁÄ, ¦ÓÔÏҦѠËÏÍÁÎÄ), ÚÁÔŠצΠ×ÉÍÁÇÁ¤
86 ÚÎÁÞÎÏ ÍÅÎÛÅ ÐÁÍ'ÑÔ¦.
87
88 %package static
89 Summary:        Small bourne shell from Berkeley
90 Summary(de):    Kleine Bourne-Shell von Berkeley
91 Summary(fr):    Shell Bourne réduit de Berkeley
92 Summary(pl):    Ma³y shell bourne'a
93 Summary(tr):    Ufak bir bourne kabuðu
94 Group:          Applications/Shells
95 PreReq:         fileutils
96 PreReq:         grep
97 Conflicts:      mkinitrd <= 1.7
98
99 %description static
100 ash is a bourne shell clone from Berkeley. It supports all of the
101 standard Bourne shell commands and has the advantage of supporting
102 them while remaining considerably smaller than bash.
103
104 %description static -l de
105 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
106 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
107 weniger Platz beansprucht als bash.
108
109 %description static -l fr
110 ash est un clone Berkeley du shell Bourne. Il gère toutes les
111 commandes standard du shell Bourne et a l'avantage de les gérer tout
112 en restant considérablement plus petit que bash.
113
114 %description static -l pl
115 Ash jest klonem shella Bourne'a z Berkeley. Obs³uguje standardowe
116 komendy shella Bourne'a i jest mniejszy ni¿ bash.
117
118 %description static -l tr
119 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
120 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
121 avantajýna sahiptir.
122
123 %prep
124 %setup -q
125 %patch0 -p1
126 %patch1 -p1
127 %patch2 -p1
128 %patch3 -p1
129 %patch4 -p1
130 %patch5 -p1
131 %patch6 -p1
132 %patch7 -p1
133 %patch8 -p1
134 %patch9 -p1
135 %patch10 -p1
136 %patch11 -p1
137 %patch12 -p1
138 %patch13 -p1
139 %patch14 -p1
140 %patch15 -p1
141 %patch16 -p1
142 # this is mainly for information, maybe add changelog to %doc?
143 %patch17 -p1
144 %patch18 -p1
145 %patch19 -p1
146 %patch20 -p1
147
148 %build
149
150 %{!?_without_static:%{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}"}
151 %{!?_without_static:mv -f sh ash.static}
152 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" CC="%{__cc}"
153
154 %install
155 rm -rf $RPM_BUILD_ROOT
156
157 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
158 install sh $RPM_BUILD_ROOT%{_bindir}/ash
159 %{!?_without_static:install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static}
160 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
161 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
162 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
163
164 %post
165 if [ ! -f /etc/shells ]; then
166         echo "%{_bindir}/ash" > /etc/shells
167         echo "%{_bindir}/bsh" >> /etc/shells
168 else
169         if ! grep -q '^%{_bindir}/ash$' /etc/shells ; then
170                 echo "%{_bindir}/ash" >> /etc/shells
171         fi
172         if ! grep -q '^%{_bindir}/bsh$' /etc/shells ; then
173                 echo "%{_bindir}/bsh" >> /etc/shells
174         fi
175 fi
176
177 %post static
178 if [ ! -f /etc/shells ]; then
179         echo "%{_bindir}/ash.static" >> /etc/shells
180 else
181         if ! grep -q '^%{_bindir}/ash.static$' /etc/shells ; then
182                 echo "%{_bindir}/ash.static" >> /etc/shells
183         fi
184 fi
185
186 %preun
187 if [ "$1" = 0 ]; then
188         grep -v '^%{_bindir}/ash$' /etc/shells | grep -v '^%{_bindir}/bsh$' > /etc/shells.new
189         mv -f /etc/shells.new /etc/shells
190 fi
191
192 %preun static
193 if [ "$1" = 0 ]; then
194         grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
195         mv -f /etc/shells.new /etc/shells
196 fi
197
198 %verifyscript
199 for n in ash bsh ; do
200         echo -n "Looking for $n in /etc/shells... "
201         if ! grep -q "^%{_bindir}/${n}\$" /etc/shells ; then
202                 echo "missing"
203                 echo "${n} missing from /etc/shells" >&2
204         else
205                 echo "found"
206         fi
207 done
208
209 %verifyscript static
210 echo -n "Looking for ash.static in /etc/shells... "
211 if ! grep -q '^%{_bindir}/ash\.static$' /etc/shells ; then
212         echo "missing"
213         echo "ash.static missing from /etc/shells" >&2
214 else
215         echo "found"
216 fi
217
218 %clean
219 rm -rf $RPM_BUILD_ROOT
220
221 %files
222 %defattr(644,root,root,755)
223 %attr(755,root,root) %{_bindir}/ash
224 %attr(755,root,root) %{_bindir}/bsh
225 %{_mandir}/man1/*
226
227 %{!?_without_static:%files static}
228 %{!?_without_static:%defattr(644,root,root,755)}
229 %{!?_without_static:%attr(755,root,root) %{_bindir}/ash.static}
This page took 0.063255 seconds and 4 git commands to generate.