]> git.pld-linux.org Git - packages/ash.git/blob - ash.spec
- release 21
[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:        21
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:         %{name}-make.patch
14 Patch1:         %{name}-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 %define         _prefix         /
22
23 %description
24 ash is a bourne shell clone from Berkeley. It supports all of the
25 standard Bourne shell commands and has the advantage of supporting
26 them while remaining considerably smaller than bash.
27
28 %description -l de
29 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
30 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
31 weniger Platz beansprucht als bash.
32
33 %description -l fr
34 ash est un clone Berkeley du shell Bourne. Il gère toutes les
35 commandes standard du shell Bourne et a l'avantage de les gérer tout
36 en restant considérablement plus petit que bash.
37
38 %description -l pl
39 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
40 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
41
42 %description -l tr
43 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
44 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
45 avantajýna sahiptir.
46
47 %package static
48 Summary:        Small bourne shell from Berkeley
49 Summary(de):    Kleine Bourne-Shell von Berkeley
50 Summary(fr):    Shell Bourne réduit de Berkeley
51 Summary(pl):    Ma³y shell bourne'a 
52 Summary(tr):    Ufak bir bourne kabuðu
53 Group:          Shells
54 Group(pl):      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 %patch0 -p1
86 %patch1 -p1
87
88 %build
89 %{__make} OPT_FLAGS="$RPM_OPT_FLAGS" STATIC=-static
90 mv -f sh ash.static
91 %{__make} OPT_FLAGS="$RPM_OPT_FLAGS"
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 gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man1/*
104
105 %post
106 if [ ! -f /etc/shells ]; then
107         echo "%{_bindir}/ash" > /etc/shells
108         echo "%{_bindir}/bsh" >> /etc/shells
109 else
110         if ! grep '^%{_bindir}/ash$' /etc/shells > /dev/null; then
111                 echo "%{_bindir}/ash" >> /etc/shells
112         fi
113         if ! grep '^%{_bindir}/bsh$' /etc/shells > /dev/null; then
114                 echo "%{_bindir}/bsh" >> /etc/shells
115         fi
116 fi
117
118 %post static
119 if [ ! -f /etc/shells ]; then
120         echo "%{_bindir}/ash.static" >> /etc/shells
121 else
122         if ! grep '^%{_bindir}/ash.static$' /etc/shells > /dev/null; then
123                 echo "%{_bindir}/ash.static" >> /etc/shells
124         fi
125 fi
126
127 %preun
128 if [ "$0" = 0 ]; then
129         grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh | grep -v %{_bindir}/ash.static > /etc/shells.new
130         mv -f /etc/shells.new /etc/shells
131 fi
132
133 %preun static
134 if [ "$0" = 0 ]; then
135         grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh > /etc/shells.new
136         mv -f /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 "^%{_bindir}/${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) %{_bindir}/ash
156 %attr(755,root,root) %{_bindir}/bsh
157 %{_mandir}/man1/*
158
159 %files static
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_bindir}/ash.static
This page took 0.040439 seconds and 3 git commands to generate.