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