]> git.pld-linux.org Git - packages/ash.git/blob - ash.spec
Uprgaded to 0.3.1
[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 %prep
84 %setup -q -n ash-linux-%{version}
85
86 %build
87 %{__make} OPT_FLAGS="%{?debug:-O -g}%{!?debug:$RPM_OPT_FLAGS}" \
88         LDFLAGS="-static %{!?debug:-s}"
89 mv -f sh ash.static
90 %{__make} OPT_FLAGS="%{?debug:-O -g}%{!?debug:$RPM_OPT_FLAGS}" \
91         LDFLAGS="%{!?debug:-s}"
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
96
97 install sh $RPM_BUILD_ROOT%{_bindir}/ash
98 install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static
99 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
100 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
101 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
102
103 %post
104 if [ ! -f /etc/shells ]; then
105         echo "%{_bindir}/ash" > /etc/shells
106         echo "%{_bindir}/bsh" >> /etc/shells
107 else
108         if ! grep '^%{_bindir}/ash$' /etc/shells > /dev/null; then
109                 echo "%{_bindir}/ash" >> /etc/shells
110         fi
111         if ! grep '^%{_bindir}/bsh$' /etc/shells > /dev/null; then
112                 echo "%{_bindir}/bsh" >> /etc/shells
113         fi
114 fi
115
116 %post static
117 if [ ! -f /etc/shells ]; then
118         echo "%{_bindir}/ash.static" >> /etc/shells
119 else
120         if ! grep '^%{_bindir}/ash.static$' /etc/shells > /dev/null; then
121                 echo "%{_bindir}/ash.static" >> /etc/shells
122         fi
123 fi
124
125 %preun
126 if [ "$0" = 0 ]; then
127         grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh | grep -v %{_bindir}/ash.static > /etc/shells.new
128         mv -f /etc/shells.new /etc/shells
129 fi
130
131 %preun static
132 if [ "$0" = 0 ]; then
133         grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh > /etc/shells.new
134         mv -f /etc/shells.new /etc/shells
135 fi
136
137 %verifyscript
138 for n in ash bsh ash.static; do
139     echo -n "Looking for $n in /etc/shells... "
140     if ! grep "^%{_bindir}/${n}\$" /etc/shells > /dev/null; then
141         echo "missing"
142         echo "${n} missing from /etc/shells" >&2
143     else
144         echo "found"
145     fi
146 done
147
148 %clean
149 rm -rf $RPM_BUILD_ROOT
150
151 %files
152 %defattr(644,root,root,755)
153 %attr(755,root,root) %{_bindir}/ash
154 %attr(755,root,root) %{_bindir}/bsh
155 %{_mandir}/man1/*
156
157 %files static
158 %defattr(644,root,root,755)
159 %attr(755,root,root) %{_bindir}/ash.static
This page took 0.070144 seconds and 4 git commands to generate.