up to 3.3 auto/th/nnn-3.3-1
authorJan Palus <atler@pld-linux.org>
Thu, 6 Aug 2020 10:58:36 +0000 (12:58 +0200)
committerJan Palus <atler@pld-linux.org>
Thu, 6 Aug 2020 10:58:36 +0000 (12:58 +0200)
- enable pcre and 8 contexts
- add build flags patch so Makefile can add useful flags too

nnn-flags.patch [new file with mode: 0644]
nnn.spec

diff --git a/nnn-flags.patch b/nnn-flags.patch
new file mode 100644 (file)
index 0000000..2305f2b
--- /dev/null
@@ -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)
index 730e09e0cc64a087f4fdb073c4ab45ed81a762ec..0eae45243f2b0a3e31206c7dd85c124b47290892 100644 (file)
--- a/nnn.spec
+++ b/nnn.spec
@@ -3,15 +3,17 @@
 #
 Summary:       The missing terminal file browser for X
 Name:          nnn
 #
 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
 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
 Patch0:                %{name}-no-rebuild-on-install.patch
+Patch1:                %{name}-flags.patch
 URL:           https://github.com/jarun/nnn
 BuildRequires: ncurses-devel
 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)
 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
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__make} \
        CC="%{__cc}" \
        CFLAGS="%{rpmcflags}" \
 
 %build
 %{__make} \
        CC="%{__cc}" \
        CFLAGS="%{rpmcflags}" \
+       CFLAGS_OPTIMIZATION= \
        CPPFLAGS="%{rpmcppflags}" \
        CPPFLAGS="%{rpmcppflags}" \
-       LDFLAGS="%{rpmldflags}"
+       LDFLAGS="%{rpmldflags}" \
+       O_CTX8=1 \
+       O_PCRE=1
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %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} \
        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} \
 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} \
 install -Dpm0644 -t $RPM_BUILD_ROOT%{zsh_compdir} \
-  scripts/auto-completion/zsh/_nnn
+  misc/auto-completion/zsh/_nnn
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
This page took 0.137435 seconds and 4 git commands to generate.