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