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