From: Jan Palus Date: Thu, 6 Aug 2020 10:58:36 +0000 (+0200) Subject: up to 3.3 X-Git-Tag: auto/th/nnn-3.3-1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fnnn.git;a=commitdiff_plain;h=a28b3c6186ea1843dd986b2ac99d2e95ed1eec83;ds=sidebyside up to 3.3 - enable pcre and 8 contexts - add build flags patch so Makefile can add useful flags too --- diff --git a/nnn-flags.patch b/nnn-flags.patch new file mode 100644 index 0000000..2305f2b --- /dev/null +++ b/nnn-flags.patch @@ -0,0 +1,33 @@ +--- nnn-3.3/Makefile.orig 2020-08-06 12:43:07.917453708 +0200 ++++ nnn-3.3/Makefile 2020-08-06 12:46:43.682792814 +0200 +@@ -41,7 +41,7 @@ + endif + + ifeq ($(O_PCRE),1) +- CPPFLAGS += -DPCRE ++ override CPPFLAGS += -DPCRE + LDLIBS += -lpcre + endif + +@@ -62,7 +62,7 @@ + endif + + ifeq ($(O_CTX8),1) +- CPPFLAGS += -DCTX8 ++ override CPPFLAGS += -DCTX8 + endif + + ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1) +@@ -75,9 +75,9 @@ + LDLIBS_CURSES ?= -lncurses + endif + +-CFLAGS += -std=c11 -Wall -Wextra -Wshadow +-CFLAGS += $(CFLAGS_OPTIMIZATION) +-CFLAGS += $(CFLAGS_CURSES) ++override CFLAGS += -std=c11 -Wall -Wextra -Wshadow ++override CFLAGS += $(CFLAGS_OPTIMIZATION) ++override CFLAGS += $(CFLAGS_CURSES) + + LDLIBS += $(LDLIBS_CURSES) + diff --git a/nnn.spec b/nnn.spec index 730e09e..0eae452 100644 --- a/nnn.spec +++ b/nnn.spec @@ -3,15 +3,17 @@ # Summary: The missing terminal file browser for X Name: nnn -Version: 2.1 +Version: 3.3 Release: 1 License: BSD Group: Applications/Console Source0: https://github.com/jarun/nnn/archive/v%{version}/%{name}-%{version}.tar.gz -# Source0-md5: 6c4094064a9e8edbc73c0f37c6d4ccf0 +# Source0-md5: 08c00d529ab824329b1f30968c3037b0 Patch0: %{name}-no-rebuild-on-install.patch +Patch1: %{name}-flags.patch URL: https://github.com/jarun/nnn BuildRequires: ncurses-devel +BuildRequires: pcre-devel BuildRequires: pkgconfig BuildRequires: readline-devel BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -87,13 +89,17 @@ Dopełnianie parametrów w zsh dla polecenia nnn. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %{__make} \ CC="%{__cc}" \ CFLAGS="%{rpmcflags}" \ + CFLAGS_OPTIMIZATION= \ CPPFLAGS="%{rpmcppflags}" \ - LDFLAGS="%{rpmldflags}" + LDFLAGS="%{rpmldflags}" \ + O_CTX8=1 \ + O_PCRE=1 %install rm -rf $RPM_BUILD_ROOT @@ -102,11 +108,11 @@ rm -rf $RPM_BUILD_ROOT PREFIX=%{_prefix} install -Dpm0644 -t $RPM_BUILD_ROOT%{bash_compdir} \ - scripts/auto-completion/bash/nnn-completion.bash + misc/auto-completion/bash/nnn-completion.bash install -Dpm0644 -t $RPM_BUILD_ROOT%{fish_compdir} \ - scripts/auto-completion/fish/nnn.fish + misc/auto-completion/fish/nnn.fish install -Dpm0644 -t $RPM_BUILD_ROOT%{zsh_compdir} \ - scripts/auto-completion/zsh/_nnn + misc/auto-completion/zsh/_nnn %clean rm -rf $RPM_BUILD_ROOT