]> git.pld-linux.org Git - packages/mksh.git/blobdiff - mksh.spec
rel 3; drop builtin cat and sleep
[packages/mksh.git] / mksh.spec
index 815fdb3e9ac03b2ae0bde6be08e26d0fb768fdf8..2ee61f353b31269af4c1801e8ddb5518391ee5e1 100644 (file)
--- a/mksh.spec
+++ b/mksh.spec
@@ -1,23 +1,25 @@
 #
 # Conditional build:
+%bcond_with    lto     # enable link time optimisations (breaks tests)
 %bcond_without static  # static version of mksh
 %bcond_without tests   # rtchecks and test.sh checks
 
+%define                vernr   %(echo %{version} | tr -d 'a-z')
+
 Summary:       MirBSD Korn Shell
 Summary(pl.UTF-8):     Powłoka Korna z MirBSD
 Name:          mksh
-Version:       51
+Version:       59c
 Release:       3
 License:       BSD
 Group:         Applications/Shells
 Source0:       https://www.mirbsd.org/MirOS/dist/mir/mksh/%{name}-R%{version}.tgz
-# Source0-md5: 8e522475da795c60f35a6f8035481baf
+# Source0-md5: 99f8ac3c1d8a30b913d509f1969a4aaa
 Source1:       %{name}-mkshrc
 Source2:       get-source.sh
 Patch0:                %{name}-mkshrc_support.patch
 Patch1:                %{name}-circumflex.patch
-Patch2:                %{name}-no_stop_alias.patch
-Patch3:                %{name}-cmdline-length.patch
+Patch2:         drop-builtins.patch
 URL:           https://www.mirbsd.org/mksh.htm
 %if %{with tests}
 BuildRequires: ed
@@ -80,16 +82,17 @@ W tym pakiecie jest mksh skonsolidowany statycznie.
 
 %prep
 %setup -qc
-mv mksh/* .; rmdir mksh
+%{__mv} mksh/* .; rmdir mksh
 
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
+
+sed -i -e 's|fgrep|grep -F|g' check.t
 
 # sed rules instead of patch (needed update for every release)
 sed -i -e 's|\(#define.*MKSH_VERSION.*\)"|\1 @DISTRO@"|g' sh.h
-sed -i -e 's|\(@(#)MIRBSD KSH.*\)|\1 @DISTRO@|g' check.t
+sed -i -e 's|\(KSH R%{vernr}.*\)|\1 @DISTRO@|g' check.t
 
 # fill distro
 sed -i -e 's#@DISTRO@#PLD/Linux 3.0#g' check.t sh.h
@@ -139,7 +142,7 @@ CC="%{__cc}" \
 CFLAGS="%{rpmcflags} -DMKSH_GCC55009" \
 LDFLAGS="%{rpmldflags}" \
 CPPFLAGS="%{rpmcppflags}" \
-sh ./Build.sh -Q -r -j -c lto
+sh ./Build.sh -Q -r -j %{?with_lto:-c lto}
 
 # skip some tests if not on terminal
 if ! tty -s; then
@@ -162,7 +165,7 @@ CC="%{__cc}" \
 CFLAGS="%{rpmcflags} -DMKSH_GCC55009" \
 LDFLAGS="%{rpmldflags} -static" \
 CPPFLAGS="%{rpmcppflags}" \
-sh ./Build.sh -Q -r -j -c lto
+sh ./Build.sh -Q -r -j %{?with_lto:-c lto}
 
 %if %{with tests}
 ./test.sh -v $skip_tests
@@ -208,7 +211,7 @@ end
 %files
 %defattr(644,root,root,755)
 %doc dot.mkshrc
-%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/mkshrc
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mkshrc
 %attr(755,root,root) %{_bindir}/mksh
 %attr(755,root,root) %{_bindir}/ksh
 %attr(755,root,root) %{_bindir}/sh
This page took 0.032981 seconds and 4 git commands to generate.