]> TLD Linux GIT Repositories - packages/mksh.git/blobdiff - mksh.spec
- merged 50c from PLD
[packages/mksh.git] / mksh.spec
index 5eff6c15a0ef9bd4c671f08a1dae0d90a318166b..7732b7e8ca21931330dcd842452a6192252c8b26 100644 (file)
--- a/mksh.spec
+++ b/mksh.spec
@@ -1,20 +1,17 @@
 #
-# TODO: https://bugs.launchpad.net/mksh/+bug/1179287
-#
 # 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:       47
+Version:       50c
 Release:       1
 License:       BSD
 Group:         Applications/Shells
 Source0:       http://www.mirbsd.org/MirOS/dist/mir/mksh/%{name}-R%{version}.tgz
-# Source0-md5: 71c7cbcd78306897801b8b6691091e66
+# Source0-md5: 263512ebbb06c92e6128da97b2eae17c
 Source1:       %{name}-mkshrc
 Patch0:                %{name}-mkshrc_support.patch
 Patch1:                %{name}-circumflex.patch
@@ -26,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
@@ -85,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
@@ -95,10 +92,10 @@ sed -i -e 's|\(#define.*MKSH_VERSION.*\)"|\1 @DISTRO@"|g' sh.h
 sed -i -e 's|\(@(#)MIRBSD KSH.*\)|\1 @DISTRO@|g' check.t
 
 # fill distro
-sed -i -e 's#@DISTRO@#PLD/Linux 3.0#g' check.t sh.h
+sed -i -e 's#@DISTRO@#TLD/Linux 3.0#g' check.t sh.h
 # sanity checks
-grep PLD/Linux check.t || exit 1
-grep PLD/Linux sh.h || exit 1
+grep TLD/Linux check.t || exit 1
+grep TLD/Linux sh.h || exit 1
 
 # we'll need this later due to -DMKSH_GCC55009
 cat >rtchecks <<'EOF'
@@ -200,11 +197,14 @@ 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 /bin/mksh
-
 %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)
 %doc dot.mkshrc