Patch19: %{name}-freebsd.patch
Patch20: %{name}-sighup.patch
Patch21: %{name}-dietlibc.patch
-PreReq: fileutils
-PreReq: grep
%{!?_without_static:BuildRequires: glibc-static}
%{?_with_dietlibc:BuildRequires: dietlibc-static}
-BuildRequires: flex
BuildRequires: byacc
+BuildRequires: flex
+Requires(post,preun,verify): grep
+Requires(preun): fileutils
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Conflicts: mkinitrd <= 1.7
Summary(pl): Ma³y shell bourne'a
Summary(tr): Ufak bir bourne kabuðu
Group: Applications/Shells
-PreReq: fileutils
-PreReq: grep
+Requires(post,preun,verify): grep
+Requires(preun): fileutils
Conflicts: mkinitrd <= 1.7
%description static
echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
+%clean
+rm -rf $RPM_BUILD_ROOT
+
%post
+umask 022
if [ ! -f /etc/shells ]; then
echo "%{_bindir}/ash" > /etc/shells
echo "%{_bindir}/bsh" >> /etc/shells
fi
fi
+%preun
+if [ "$1" = 0 ]; then
+ umask 022
+ grep -v '^%{_bindir}/ash$' /etc/shells | grep -v '^%{_bindir}/bsh$' > /etc/shells.new
+ mv -f /etc/shells.new /etc/shells
+fi
+
%post static
+umask 022
if [ ! -f /etc/shells ]; then
echo "%{_bindir}/ash.static" >> /etc/shells
else
fi
fi
-%preun
-if [ "$1" = 0 ]; then
- grep -v '^%{_bindir}/ash$' /etc/shells | grep -v '^%{_bindir}/bsh$' > /etc/shells.new
- mv -f /etc/shells.new /etc/shells
-fi
-
%preun static
if [ "$1" = 0 ]; then
+ umask 022
grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
mv -f /etc/shells.new /etc/shells
fi
echo "found"
fi
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/ash