]> git.pld-linux.org Git - packages/ash.git/blob - ash.spec
- added BOOT package
[packages/ash.git] / ash.spec
1 Summary:        Small bourne shell from Berkeley
2 Summary(de):    Kleine Bourne-Shell von Berkeley
3 Summary(fr):    Shell Bourne réduit de Berkeley
4 Summary(pl):    Ma³y shell bourne'a 
5 Summary(tr):    Ufak bir bourne kabuðu
6 Name:           ash
7 Version:        0.3.1
8 Release:        1
9 License:        BSD
10 Group:          Applications/Shells
11 Group(de):      Applikationen/Shells
12 Group(pl):      Aplikacje/Pow³oki
13 Source0:        ftp://ftp.pld.org.pl/people/malekith/%{name}-linux-%{version}.tar.gz
14 Patch0:         %{name}-Makefile.patch
15 Prereq:         fileutils
16 Prereq:         grep
17 BuildRequires:  glibc-static
18 BuildRequires:  uClibc-devel-BOOT
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 Conflicts:      mkinitrd <= 1.7
21
22 %define         _bindir         /bin
23
24 %description
25 ash is a bourne shell clone from Berkeley. It supports all of the
26 standard Bourne shell commands and has the advantage of supporting
27 them while remaining considerably smaller than bash.
28
29 %description -l de
30 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
31 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
32 weniger Platz beansprucht als bash.
33
34 %description -l fr
35 ash est un clone Berkeley du shell Bourne. Il gère toutes les
36 commandes standard du shell Bourne et a l'avantage de les gérer tout
37 en restant considérablement plus petit que bash.
38
39 %description -l pl
40 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
41 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
42
43 %description -l tr
44 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
45 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
46 avantajýna sahiptir.
47
48 %package static
49 Summary:        Small bourne shell from Berkeley
50 Summary(de):    Kleine Bourne-Shell von Berkeley
51 Summary(fr):    Shell Bourne réduit de Berkeley
52 Summary(pl):    Ma³y shell bourne'a 
53 Summary(tr):    Ufak bir bourne kabuðu
54 Group:          Applications/Shells
55 Group(de):      Applikationen/Shells
56 Group(pl):      Aplikacje/Pow³oki
57 Prereq:         fileutils
58 Prereq:         grep
59 Conflicts:      mkinitrd <= 1.7
60
61 %description static
62 ash is a bourne shell clone from Berkeley. It supports all of the
63 standard Bourne shell commands and has the advantage of supporting
64 them while remaining considerably smaller than bash.
65
66 %description static -l de
67 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
68 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
69 weniger Platz beansprucht als bash.
70
71 %description static -l fr
72 ash est un clone Berkeley du shell Bourne. Il gère toutes les
73 commandes standard du shell Bourne et a l'avantage de les gérer tout
74 en restant considérablement plus petit que bash.
75
76 %description static -l pl
77 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
78 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
79
80 %description static -l tr
81 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
82 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
83 avantajýna sahiptir.
84
85 %package BOOT
86 Summary:        Small bourne shell from Berkeley
87 Summary(de):    Kleine Bourne-Shell von Berkeley
88 Summary(fr):    Shell Bourne réduit de Berkeley
89 Summary(pl):    Ma³y shell bourne'a 
90 Summary(tr):    Ufak bir bourne kabuðu
91 Group:          Applications/Shells
92 Group(de):      Applikationen/Shells
93 Group(pl):      Aplikacje/Pow³oki
94
95 %description BOOT
96 ash is a bourne shell clone from Berkeley. It supports all of the
97 standard Bourne shell commands and has the advantage of supporting
98 them while remaining considerably smaller than bash.
99 Version for bootdisk
100
101 %prep
102 %setup -q -n ash-linux-%{version}
103 %patch -p1
104
105 %build
106 # so far use static version linked with glibc
107 %{__make} \
108         OPT_FLAGS="-I/usr/lib/bootdisk%{_includedir} -Os" \
109         LDFLAGS="-nostdlib -s" \
110         LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc"
111 mv -f sh ash.BOOT
112 %{__make} clean
113
114 %{__make} OPT_FLAGS="%{?debug:-O0 -g}%{!?debug:$RPM_OPT_FLAGS}" \
115         LDFLAGS="-static %{!?debug:-s}"
116 mv -f sh ash.static
117 %{__make} OPT_FLAGS="%{?debug:-O0 -g}%{!?debug:$RPM_OPT_FLAGS}" \
118         LDFLAGS="%{!?debug:-s}"
119
120
121
122 %install
123 rm -rf $RPM_BUILD_ROOT
124 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
125 install -d $RPM_BUILD_ROOT/usr/lib/bootdisk/%{_bindir}
126
127 install sh $RPM_BUILD_ROOT%{_bindir}/ash
128 install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static
129 #install sh-BOOT $RPM_BUILD_ROOT/usr/lib/bootdisk/%{_bindir}/ash
130 install -s ash.BOOT $RPM_BUILD_ROOT/usr/lib/bootdisk/%{_bindir}/ash
131
132 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
133 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
134 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
135
136 %post
137 if [ ! -f /etc/shells ]; then
138         echo "%{_bindir}/ash" > /etc/shells
139         echo "%{_bindir}/bsh" >> /etc/shells
140 else
141         if ! grep '^%{_bindir}/ash$' /etc/shells > /dev/null; then
142                 echo "%{_bindir}/ash" >> /etc/shells
143         fi
144         if ! grep '^%{_bindir}/bsh$' /etc/shells > /dev/null; then
145                 echo "%{_bindir}/bsh" >> /etc/shells
146         fi
147 fi
148
149 %post static
150 if [ ! -f /etc/shells ]; then
151         echo "%{_bindir}/ash.static" >> /etc/shells
152 else
153         if ! grep '^%{_bindir}/ash.static$' /etc/shells > /dev/null; then
154                 echo "%{_bindir}/ash.static" >> /etc/shells
155         fi
156 fi
157
158 %preun
159 if [ "$0" = 0 ]; then
160         grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh | grep -v %{_bindir}/ash.static > /etc/shells.new
161         mv -f /etc/shells.new /etc/shells
162 fi
163
164 %preun static
165 if [ "$0" = 0 ]; then
166         grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh > /etc/shells.new
167         mv -f /etc/shells.new /etc/shells
168 fi
169
170 %verifyscript
171 for n in ash bsh ash.static; do
172     echo -n "Looking for $n in /etc/shells... "
173     if ! grep "^%{_bindir}/${n}\$" /etc/shells > /dev/null; then
174         echo "missing"
175         echo "${n} missing from /etc/shells" >&2
176     else
177         echo "found"
178     fi
179 done
180
181 %clean
182 rm -rf $RPM_BUILD_ROOT
183
184 %files
185 %defattr(644,root,root,755)
186 %attr(755,root,root) %{_bindir}/ash
187 %attr(755,root,root) %{_bindir}/bsh
188 %{_mandir}/man1/*
189
190 %files static
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{_bindir}/ash.static
193
194 %files BOOT
195 %defattr(644,root,root,755)
196 %attr(755,root,root) /usr/lib/bootdisk/%{_bindir}/ash
This page took 0.049381 seconds and 4 git commands to generate.