- 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
This commit is contained in:
parent
b37813ed9b
commit
65727d3bf9
@ -1,31 +0,0 @@
|
|||||||
From db109be8a28f1556495979ee7d1967e982cca6fd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andrew Borodin <aborodin@vmail.ru>
|
|
||||||
Date: Mon, 23 May 2022 20:52:30 +0300
|
|
||||||
Subject: [PATCH] Ticket #4374: fix file sort by version.
|
|
||||||
|
|
||||||
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
|
|
||||||
---
|
|
||||||
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;
|
|
||||||
}
|
|
48
mc.spec
48
mc.spec
@ -1,3 +1,4 @@
|
|||||||
|
# NOTE: disabled sftp (needs to be ported to use libssh instead of libssh2)
|
||||||
%bcond_without slang
|
%bcond_without slang
|
||||||
|
|
||||||
Summary: User-friendly text console file manager and visual shell
|
Summary: User-friendly text console file manager and visual shell
|
||||||
@ -5,33 +6,30 @@ Name: mc
|
|||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 4.8.28
|
Version: 4.8.28
|
||||||
Release: 3%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv3+
|
License: GPL-3.0-or-later
|
||||||
URL: http://www.midnight-commander.org/
|
URL: http://www.midnight-commander.org/
|
||||||
Source0: https://github.com/MidnightCommander/mc/archive/%{version}.tar.gz
|
VCS: https://github.com/MidnightCommander/mc/
|
||||||
Patch1: %{name}-spec.syntax.patch
|
Source: %{VCS}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
Patch3: %{name}-python3.patch
|
Patch: %{name}-spec.syntax.patch
|
||||||
Patch4: %{name}-default_setup.patch
|
Patch: %{name}-python3.patch
|
||||||
Patch5: %{name}-tmpdir.patch
|
Patch: %{name}-default_setup.patch
|
||||||
Patch6: https://github.com/MidnightCommander/mc/commit/34d3726b79d35481e96f5fabe8e34e3439e6d9d9.patch
|
Patch: %{name}-tmpdir.patch
|
||||||
# deps for autogen.sh
|
Patch: %{VCS}/commit/34d3726b.patch#/%{name}-Ticket-4374-fix-file-sort-by-version.patch
|
||||||
BuildRequires: make
|
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: gettext-devel
|
|
||||||
BuildRequires: libtool
|
|
||||||
# other build deps
|
|
||||||
BuildRequires: e2fsprogs-devel
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: gettext-devel
|
||||||
BuildRequires: gpm-devel
|
BuildRequires: gpm-devel
|
||||||
BuildRequires: groff-base
|
BuildRequires: groff-base
|
||||||
# disabled (needs to be ported to use libssh instead of libssh2)
|
BuildRequires: libtool
|
||||||
#BuildRequires: libssh2-devel >= 1.2.5
|
BuildRequires: make
|
||||||
# (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: perl-generators
|
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
|
Suggests: mc-python
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -53,11 +51,13 @@ Midnight Commander s3+ and UC1541 EXTFS backend scripts.
|
|||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%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
|
./autogen.sh
|
||||||
%configure \
|
%configure \
|
||||||
PYTHON=%{__python3} \
|
PYTHON=%{__python3} \
|
||||||
--disable-rpath \
|
--disable-rpath \
|
||||||
|
--disable-vfs-sftp \
|
||||||
|
--disable-vfs-smb \
|
||||||
--enable-charset \
|
--enable-charset \
|
||||||
--enable-largefile \
|
--enable-largefile \
|
||||||
--enable-vfs-cpio \
|
--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-fish \
|
||||||
--enable-vfs-ftp \
|
--enable-vfs-ftp \
|
||||||
--enable-vfs-sfs \
|
--enable-vfs-sfs \
|
||||||
--disable-vfs-sftp \
|
|
||||||
--disable-vfs-smb \
|
|
||||||
--enable-vfs-tar \
|
--enable-vfs-tar \
|
||||||
--with-x \
|
|
||||||
--with-gpm-mouse \
|
--with-gpm-mouse \
|
||||||
--with-screen=%{?with_slang:slang}%{!?with_slang:ncurses} \
|
--with-screen=%[%{?with_slang}?"slang":"ncurses"] \
|
||||||
|
--with-x \
|
||||||
%{nil}
|
%{nil}
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user