From 65727d3bf91047ad7e5669cb1719e51b54f22de4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 16 Dec 2022 15:30:30 +0000 Subject: [PATCH] - move License to SPDX format - add use VCS, unnumbered Patch and Source - more macros - use pkgconfig(foo) dependencies in all cases where where it is used - cleanups --- ...726b79d35481e96f5fabe8e34e3439e6d9d9.patch | 31 ------------ mc.spec | 50 +++++++++---------- 2 files changed, 24 insertions(+), 57 deletions(-) delete mode 100644 34d3726b79d35481e96f5fabe8e34e3439e6d9d9.patch diff --git a/34d3726b79d35481e96f5fabe8e34e3439e6d9d9.patch b/34d3726b79d35481e96f5fabe8e34e3439e6d9d9.patch deleted file mode 100644 index 292ab0b..0000000 --- a/34d3726b79d35481e96f5fabe8e34e3439e6d9d9.patch +++ /dev/null @@ -1,31 +0,0 @@ -From db109be8a28f1556495979ee7d1967e982cca6fd Mon Sep 17 00:00:00 2001 -From: Andrew Borodin -Date: Mon, 23 May 2022 20:52:30 +0300 -Subject: [PATCH] Ticket #4374: fix file sort by version. - -Signed-off-by: Andrew Borodin ---- - src/filemanager/dir.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/src/filemanager/dir.c b/src/filemanager/dir.c -index 5862da6f9c..65a80cf12f 100644 ---- a/src/filemanager/dir.c -+++ b/src/filemanager/dir.c -@@ -358,7 +358,15 @@ sort_vers (file_entry_t * a, file_entry_t * b) - int bd = MY_ISDIR (b); - - if (ad == bd || panels_options.mix_all_files) -- return filevercmp (a->fname->str, b->fname->str) * reverse; -+ { -+ int result; -+ -+ result = filevercmp (a->fname->str, b->fname->str); -+ if (result != 0) -+ return result * reverse; -+ -+ return sort_name (a, b); -+ } - - return bd - ad; - } diff --git a/mc.spec b/mc.spec index 482d77f..49c46b0 100644 --- a/mc.spec +++ b/mc.spec @@ -1,37 +1,35 @@ +# NOTE: disabled sftp (needs to be ported to use libssh instead of libssh2) %bcond_without slang Summary: User-friendly text console file manager and visual shell Name: mc Epoch: 1 -Version: 4.8.28 +Version: 4.8.28 Release: 3%{?dist} -License: GPLv3+ +License: GPL-3.0-or-later URL: http://www.midnight-commander.org/ -Source0: https://github.com/MidnightCommander/mc/archive/%{version}.tar.gz -Patch1: %{name}-spec.syntax.patch -Patch3: %{name}-python3.patch -Patch4: %{name}-default_setup.patch -Patch5: %{name}-tmpdir.patch -Patch6: https://github.com/MidnightCommander/mc/commit/34d3726b79d35481e96f5fabe8e34e3439e6d9d9.patch -# deps for autogen.sh -BuildRequires: make +VCS: https://github.com/MidnightCommander/mc/ +Source: %{VCS}/archive/%{version}/%{name}-%{version}.tar.gz +Patch: %{name}-spec.syntax.patch +Patch: %{name}-python3.patch +Patch: %{name}-default_setup.patch +Patch: %{name}-tmpdir.patch +Patch: %{VCS}/commit/34d3726b.patch#/%{name}-Ticket-4374-fix-file-sort-by-version.patch BuildRequires: autoconf BuildRequires: automake -BuildRequires: gettext-devel -BuildRequires: libtool -# other build deps -BuildRequires: e2fsprogs-devel BuildRequires: gcc -BuildRequires: glib2-devel +BuildRequires: gettext-devel BuildRequires: gpm-devel BuildRequires: groff-base -# disabled (needs to be ported to use libssh instead of libssh2) -#BuildRequires: libssh2-devel >= 1.2.5 -# (configure line was also changed from --enable-vfs-sftp to --disable-vfs-sftp -# - this is the only part of mc which uses libssh2) -BuildRequires: %{?with_slang:slang-devel}%{!?with_slang:ncurses-devel} -BuildRequires: pkgconfig +BuildRequires: libtool +BuildRequires: make BuildRequires: perl-generators +BuildRequires: pkgconfig +BuildRequires: pkgconfig(ext2fs) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gmodule-2.0) >= 2.30 +#BuildRequires: pkgconfig(libssh2) >= 1.2.8 +BuildRequires: %[%{?with_slang}?"pkgconfig(slang)= 2.0)":"ncurses-devel"] Suggests: mc-python %description @@ -53,11 +51,13 @@ Midnight Commander s3+ and UC1541 EXTFS backend scripts. %autosetup -p1 %build -sed -i "s,PREV_MC_VERSION=\"unknown\",PREV_MC_VERSION=\"%{version}\"," version.sh +%__sed -i "s,PREV_MC_VERSION=\"unknown\",PREV_MC_VERSION=\"%{version}\"," version.sh ./autogen.sh %configure \ PYTHON=%{__python3} \ --disable-rpath \ + --disable-vfs-sftp \ + --disable-vfs-smb \ --enable-charset \ --enable-largefile \ --enable-vfs-cpio \ @@ -65,12 +65,10 @@ sed -i "s,PREV_MC_VERSION=\"unknown\",PREV_MC_VERSION=\"%{version}\"," version.s --enable-vfs-fish \ --enable-vfs-ftp \ --enable-vfs-sfs \ - --disable-vfs-sftp \ - --disable-vfs-smb \ --enable-vfs-tar \ - --with-x \ --with-gpm-mouse \ - --with-screen=%{?with_slang:slang}%{!?with_slang:ncurses} \ + --with-screen=%[%{?with_slang}?"slang":"ncurses"] \ + --with-x \ %{nil} %make_build