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