]> git.pld-linux.org Git - packages/ash.git/blobdiff - ash.spec
- make ash behaviour identical to tcsh on background processes that receive
[packages/ash.git] / ash.spec
index 96f4c17a83012a16edb4f482901ff6b2687bb4ef..84b8c9c60f8ad79fa8e71ccd5e7412d8d4bcfc7e 100644 (file)
--- a/ash.spec
+++ b/ash.spec
@@ -7,36 +7,40 @@ Summary(pl):  Ma
 Summary(tr):   Ufak bir bourne kabuðu
 Name:          ash
 Version:       0.4.0
-Release:       1
+Release:       2
 License:       BSD
 Group:         Applications/Shells
 Group(de):     Applikationen/Shells
 Group(pl):     Aplikacje/Pow³oki
-Source:        ash-%{version}.tar.gz
-Patch0:                ash-builtin.patch
-Patch1:                ash-echo.patch
-Patch2:                ash-getcwd.patch
-Patch3:                ash-getopt.patch
-Patch4:                ash-glob.patch
-Patch5:                ash-jobs.patch
-Patch6:                ash-kill.patch
-Patch7:                ash-makefile.patch
-Patch8:                ash-manpage.patch
-Patch9:                ash-hetio.patch
-Patch10:       ash-memout.patch
-Patch11:       ash-misc.patch
-Patch12:       ash-redir.patch
-Patch13:       ash-setmode.patch
-Patch14:       ash-syntax.patch
-Patch15:       ash-test.patch
-Patch16:       ash-times.patch
-Patch17:       ash-debian.patch
-Patch18:       ash-ppid.patch
-Patch19:       ash-freebsd.patch
+Source:        %{name}-%{version}.tar.gz
+Patch0:                %{name}-builtin.patch
+Patch1:                %{name}-echo.patch
+Patch2:                %{name}-getcwd.patch
+Patch3:                %{name}-getopt.patch
+Patch4:                %{name}-glob.patch
+Patch5:                %{name}-jobs.patch
+Patch6:                %{name}-kill.patch
+Patch7:                %{name}-makefile.patch
+Patch8:                %{name}-manpage.patch
+Patch9:                %{name}-hetio.patch
+Patch10:       %{name}-memout.patch
+Patch11:       %{name}-misc.patch
+Patch12:       %{name}-redir.patch
+Patch13:       %{name}-setmode.patch
+Patch14:       %{name}-syntax.patch
+Patch15:       %{name}-test.patch
+Patch16:       %{name}-times.patch
+Patch17:       %{name}-debian.patch
+Patch18:       %{name}-ppid.patch
+Patch19:       %{name}-freebsd.patch
 Prereq:                fileutils
 Prereq:                grep
 BuildRequires: glibc-static
-%{?BOOT:BuildRequires: uClibc-devel-BOOT}
+BuildRequires: flex
+BuildRequires: byacc
+%if %{?BOOT:1}%{!?BOOT:0}
+BuildRequires: uClibc-devel-BOOT >= 20000521
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Conflicts:     mkinitrd <= 1.7
 
@@ -123,7 +127,7 @@ Version for bootdisk
 %endif
 
 %prep
-%setup -q -n ash-%{version}
+%setup -q
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
@@ -134,7 +138,7 @@ Version for bootdisk
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
-%patch10 -p1
+#%patch10 -p1
 %patch11 -p1
 %patch12 -p1
 %patch13 -p1
@@ -149,18 +153,24 @@ Version for bootdisk
 %build
 # BOOT
 %if %{?BOOT:1}%{!?BOOT:0}
+# some of this utilities does not compile with uClibc
+# and it is not necessary
+%{__make} mksignames mkbuiltins mknodes mksignames mksyntax mktokens
 %{__make} \
-       OPT_FLAGS="-I/usr/lib/bootdisk%{_includedir} -Os" \
+       OPT_FLAGS="-m386 -I/usr/lib/bootdisk%{_includedir} -Os" \
        LDFLAGS="-nostdlib %{rpmldflags}" \
        LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc"
 mv -f sh ash.BOOT
 %{__make} clean
 %endif
 
+# this patch imposes memory buffers - uClibc lacks them
+patch -p1 <%{PATCH10}
+
 # other
-%{__make} OPT_FLAGS="%{rpmlclags}" LDFLAGS="-static %{rpmldflags}"
+%{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}"
 mv -f sh ash.static
-%{__make} OPT_FLAGS="%{rpmldflags}" LDFLAGS="%{rpmldflags}"
+%{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -168,8 +178,8 @@ rm -rf $RPM_BUILD_ROOT
 # BOOT
 %if %{?BOOT:1}%{!?BOOT:0}
 install -d $RPM_BUILD_ROOT/usr/lib/bootdisk/bin
-install ash.BOOT $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/ash
-ln -s ash $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/sh
+install -s ash.BOOT $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/ash
+ln -sf ash $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/sh
 %endif
 
 # other
@@ -185,10 +195,10 @@ if [ ! -f /etc/shells ]; then
         echo "%{_bindir}/ash" > /etc/shells
         echo "%{_bindir}/bsh" >> /etc/shells
 else
-        if ! grep '^%{_bindir}/ash$' /etc/shells > /dev/null; then
+        if ! grep -q '^%{_bindir}/ash$' /etc/shells ; then
                 echo "%{_bindir}/ash" >> /etc/shells
         fi
-        if ! grep '^%{_bindir}/bsh$' /etc/shells > /dev/null; then
+        if ! grep -q '^%{_bindir}/bsh$' /etc/shells ; then
                 echo "%{_bindir}/bsh" >> /etc/shells
         fi
 fi
@@ -197,27 +207,27 @@ fi
 if [ ! -f /etc/shells ]; then
         echo "%{_bindir}/ash.static" >> /etc/shells
 else
-        if ! grep '^%{_bindir}/ash.static$' /etc/shells > /dev/null; then
+        if ! grep -q '^%{_bindir}/ash.static$' /etc/shells ; then
                 echo "%{_bindir}/ash.static" >> /etc/shells
         fi
 fi
 
 %preun
-if [ "$0" = 0 ]; then
-        grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh | grep -v %{_bindir}/ash.static > /etc/shells.new
+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 [ "$0" = 0 ]; then
-        grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh > /etc/shells.new
+if [ "$1" = 0 ]; then
+        grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
         mv -f /etc/shells.new /etc/shells
 fi
 
 %verifyscript
-for n in ash bsh ash.static; do
+for n in ash bsh ; do
     echo -n "Looking for $n in /etc/shells... "
-    if ! grep "^%{_bindir}/${n}\$" /etc/shells > /dev/null; then
+    if ! grep -q "^%{_bindir}/${n}\$" /etc/shells ; then
        echo "missing"
        echo "${n} missing from /etc/shells" >&2
     else
@@ -225,6 +235,15 @@ for n in ash bsh ash.static; do
     fi
 done
 
+%verifyscript static
+echo -n "Looking for ash.static in /etc/shells... "
+if ! grep -q '^%{_bindir}/ash\.static$' /etc/shells ; then
+       echo "missing"
+       echo "ash.static missing from /etc/shells" >&2
+else
+       echo "found"
+fi
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
This page took 0.109224 seconds and 4 git commands to generate.