]> git.pld-linux.org Git - packages/ash.git/blob - ash.spec
- spec adapterized.
[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.2
8 Release:        18
9 License:        BSD
10 Group:          Shells
11 Group(pl):      Pow³oki
12 Source0:        ftp://sunsite.unc.edu/pub/Linux/system/shells/%{name}-linux-%{version}.tar.gz
13 Patch0:         ash-make.patch
14 Patch1:         ash-mknodes.patch
15 Prereq:         fileutils
16 Prereq:         grep
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 Conflicts:      mkinitrd <= 1.7
19
20 %description
21 ash is a bourne shell clone from Berkeley. It supports all of the
22 standard Bourne shell commands and has the advantage of supporting
23 them while remaining considerably smaller than bash.
24
25 %description -l de
26 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
27 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
28 weniger Platz beansprucht als bash.
29
30 %description -l fr
31 ash est un clone Berkeley du shell Bourne. Il gère toutes les
32 commandes standard du shell Bourne et a l'avantage de les gérer tout
33 en restant considérablement plus petit que bash.
34
35 %description -l pl
36 Ash jest klonem shell'a Bourne'a z Berkely. Obs³uguje standardowe
37 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
38
39 %description -l tr
40 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
41 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
42 avantajýna sahiptir.
43
44 %package static
45 Summary:        Small bourne shell from Berkeley
46 Summary(de):    Kleine Bourne-Shell von Berkeley
47 Summary(fr):    Shell Bourne réduit de Berkeley
48 Summary(pl):    Ma³y shell bourne'a 
49 Summary(tr):    Ufak bir bourne kabuðu
50 Group:          Shells
51 Group(pl):      Pow³oki
52 Prereq:         fileutils
53 Prereq:         grep
54 Conflicts:      mkinitrd <= 1.7
55
56 %description static
57 ash is a bourne shell clone from Berkeley. It supports all of the
58 standard Bourne shell commands and has the advantage of supporting
59 them while remaining considerably smaller than bash.
60
61 %description static -l de
62 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
63 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
64 weniger Platz beansprucht als bash.
65
66 %description static -l fr
67 ash est un clone Berkeley du shell Bourne. Il gère toutes les
68 commandes standard du shell Bourne et a l'avantage de les gérer tout
69 en restant considérablement plus petit que bash.
70
71 %description static -l pl
72 Ash jest klonem shell'a Bourne'a z Berkely. Obs³uguje standardowe
73 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
74
75 %description static -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 %prep
81 %setup  -q -n ash-linux-%{version}
82 %patch0 -p1
83 %patch1 -p1
84
85 %build
86 make
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90 install -d $RPM_BUILD_ROOT/{bin,%{_mandir}/man1}
91
92 install sh $RPM_BUILD_ROOT/bin/ash
93 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
94 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
95 ln -sf ash $RPM_BUILD_ROOT/bin/bsh
96
97 rm -f sh
98 make STATIC=-static
99
100 install sh $RPM_BUILD_ROOT/bin/ash.static
101
102 gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man1/*
103
104 %post
105 if [ ! -f /etc/shells ]; then
106         echo "/bin/ash" > /etc/shells
107         echo "/bin/bsh" >> /etc/shells
108 else
109         if ! grep '^/bin/ash$' /etc/shells > /dev/null; then
110                 echo "/bin/ash" >> /etc/shells
111         fi
112         if ! grep '^/bin/bsh$' /etc/shells > /dev/null; then
113                 echo "/bin/bsh" >> /etc/shells
114         fi
115 fi
116
117 %post static
118 if [ ! -f /etc/shells ]; then
119         echo "/bin/ash.static" >> /etc/shells
120 else
121         if ! grep '^/bin/ash.static$' /etc/shells > /dev/null; then
122                 echo "/bin/ash.static" >> /etc/shells
123         fi
124 fi
125
126 %preun
127 if [ "$0" = 0 ]; then
128         grep -v /bin/ash /etc/shells | grep -v /bin/bsh | grep -v /bin/ash.static > /etc/shells.new
129         mv /etc/shells.new /etc/shells
130 fi
131
132 %preun static
133 if [ "$0" = 0 ]; then
134         grep -v /bin/ash /etc/shells | grep -v /bin/bsh > /etc/shells.new
135         mv /etc/shells.new /etc/shells
136 fi
137
138 %verifyscript
139 for n in ash bsh ash.static; do
140     echo -n "Looking for $n in /etc/shells... "
141     if ! grep "^/bin/${n}\$" /etc/shells > /dev/null; then
142         echo "missing"
143         echo "${n} missing from /etc/shells" >&2
144     else
145         echo "found"
146     fi
147 done
148
149 %clean
150 rm -rf $RPM_BUILD_ROOT
151
152 %files
153 %defattr(644,root,root,755)
154 %attr(755,root,root) /bin/ash
155 /bin/bsh
156 %{_mandir}/man1/*
157
158 %files static
159 %defattr(644,root,root,755)
160 %attr(755,root,root) /bin/ash.static
This page took 0.103505 seconds and 4 git commands to generate.