]> git.pld-linux.org Git - packages/mksh.git/blobdiff - mksh.spec
Revert "- behave as proper sh when invoked as /bin/sh, wothout fancy, incompatible...
[packages/mksh.git] / mksh.spec
index 084cc22226f2abebf9b7eda30b62eef3777a09d2..fd75e54c165ce47269588f88008c2f3a3303161f 100644 (file)
--- a/mksh.spec
+++ b/mksh.spec
@@ -1,15 +1,17 @@
-%bcond_without static
-%bcond_without tests
 #
+# Conditional build:
+%bcond_without static  # static version of mksh
+%bcond_without tests   # rtchecks and test.sh checks
+
 Summary:       MirBSD Korn Shell
 Summary(pl.UTF-8):     Powłoka Korna z MirBSD
 Name:          mksh
-Version:       42b
+Version:       50d
 Release:       1
 License:       BSD
 Group:         Applications/Shells
 Source0:       http://www.mirbsd.org/MirOS/dist/mir/mksh/%{name}-R%{version}.tgz
-# Source0-md5: 8b4b9182eb63b47390f164246959b661
+# Source0-md5: 1c3882c07a760b23df1ad94ad0b4ed2e
 Source1:       %{name}-mkshrc
 Patch0:                %{name}-mkshrc_support.patch
 Patch1:                %{name}-circumflex.patch
@@ -21,7 +23,7 @@ BuildRequires:        ed
 BuildRequires: perl-base
 %endif
 %{?with_static:BuildRequires:   glibc-static}
-BuildRequires: rpmbuild(macros) >= 1.462
+BuildRequires: rpmbuild(macros) >= 1.670
 # is needed for /etc directory existence
 Requires(pre): FHS
 Requires:      setup >= 2.4.6-2
@@ -80,7 +82,7 @@ W tym pakiecie jest mksh skonsolidowany statycznie.
 gzip -dc %{SOURCE0} | cpio -mid
 mv mksh/* .; rmdir mksh
 
-%patch0 -p0
+%patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
@@ -148,7 +150,7 @@ fi
 ./mksh rtchecks >rtchecks.got 2>&1
 if ! cmp --quiet rtchecks.got rtchecks.expected ; then
        echo "rtchecks failed"
-       diff -Naurp %{SOURCE3} rtchecks.got
+       diff -Naurp rtchecks.expected rtchecks.got
        exit 1
 fi
 ./test.sh -v $skip_tests
@@ -195,11 +197,13 @@ rm -rf $RPM_BUILD_ROOT
 %post   -p %add_etc_shells -p /bin/sh /bin/ksh /bin/mksh
 %preun  -p %remove_etc_shells -p /bin/sh /bin/ksh /bin/mksh
 
-%posttrans -p %add_etc_shells -p /bin/sh /bin/ksh
-
+%post  static -p %add_etc_shells -p /bin/mksh.static
+%preun static -p %remove_etc_shells -p /bin/mksh.static
 
-%post static -p %add_etc_shells -p /bin/mksh.static
-%preun static -p %remove_etc_shells -p /bin/mksh.static
+%triggerpostun -p <lua> -- pdksh
+if arg[2] ~= 0 then
+%lua_add_etc_shells /bin/sh /bin/ksh /bin/mksh
+end
 
 %files
 %defattr(644,root,root,755)
This page took 0.069568 seconds and 4 git commands to generate.