]> git.pld-linux.org Git - packages/ash.git/blob - ash.spec
- release 17: use new rpm automation.
[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:        27
9 License:        BSD
10 Group:          Applications/Shells
11 Group(de):      Applikationen/Shells
12 Group(pl):      Aplikacje/Pow³oki
13 Source0:        ftp://sunsite.unc.edu/pub/Linux/system/shells/%{name}-linux-%{version}.tar.gz
14 Patch0:         %{name}-make.patch
15 Patch1:         %{name}-mknodes.patch
16 Patch2:         %{name}-fd.patch
17 Patch3:         %{name}-exit.patch
18 Patch4:         %{name}-echo.patch
19 Patch5:         %{name}-mksyntax.patch
20 Patch6:         %{name}-linux-sighup.patch
21 Patch7:         %{name}-linux-mkinit.patch
22 Prereq:         fileutils
23 Prereq:         grep
24 BuildRequires:  glibc-static
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 Conflicts:      mkinitrd <= 1.7
27
28 %define         _bindir         /bin
29
30 %description
31 ash is a bourne shell clone from Berkeley. It supports all of the
32 standard Bourne shell commands and has the advantage of supporting
33 them while remaining considerably smaller than bash.
34
35 %description -l de
36 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
37 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
38 weniger Platz beansprucht als bash.
39
40 %description -l fr
41 ash est un clone Berkeley du shell Bourne. Il gère toutes les
42 commandes standard du shell Bourne et a l'avantage de les gérer tout
43 en restant considérablement plus petit que bash.
44
45 %description -l pl
46 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
47 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
48
49 %description -l tr
50 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
51 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
52 avantajýna sahiptir.
53
54 %package static
55 Summary:        Small bourne shell from Berkeley
56 Summary(de):    Kleine Bourne-Shell von Berkeley
57 Summary(fr):    Shell Bourne réduit de Berkeley
58 Summary(pl):    Ma³y shell bourne'a 
59 Summary(tr):    Ufak bir bourne kabuðu
60 Group:          Applications/Shells
61 Group(de):      Applikationen/Shells
62 Group(pl):      Aplikacje/Pow³oki
63 Prereq:         fileutils
64 Prereq:         grep
65 Conflicts:      mkinitrd <= 1.7
66
67 %description static
68 ash is a bourne shell clone from Berkeley. It supports all of the
69 standard Bourne shell commands and has the advantage of supporting
70 them while remaining considerably smaller than bash.
71
72 %description static -l de
73 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
74 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
75 weniger Platz beansprucht als bash.
76
77 %description static -l fr
78 ash est un clone Berkeley du shell Bourne. Il gère toutes les
79 commandes standard du shell Bourne et a l'avantage de les gérer tout
80 en restant considérablement plus petit que bash.
81
82 %description static -l pl
83 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
84 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
85
86 %description static -l tr
87 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
88 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
89 avantajýna sahiptir.
90
91 %prep
92 %setup -q -n ash-linux-%{version}
93 %patch0 -p1
94 %patch1 -p1
95 %patch2 -p1
96 %patch3 -p1
97 %patch4 -p1
98 %patch5 -p1
99 %patch6 -p1
100 %patch7 -p1
101
102 %build
103 %{__make} OPT_FLAGS="%{!?debug:$RPM_OPT_FLAGS}%{?debug:-O -g}" STATIC=-static
104 mv -f sh ash.static
105 %{__make} OPT_FLAGS="%{!?debug:$RPM_OPT_FLAGS}%{?debug:-O -g}"
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
110
111 install sh $RPM_BUILD_ROOT%{_bindir}/ash
112 install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static
113 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
114 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
115 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
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.087203 seconds and 4 git commands to generate.