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