]>
Commit | Line | Data |
---|---|---|
1764ae3d AG |
1 | # TODO: |
2 | # - package rest of scripts/ | |
3 | # | |
4 | Summary: The missing terminal file browser for X | |
5 | Name: nnn | |
5b10cffe | 6 | Version: 3.6 |
c1461ecf | 7 | Release: 2 |
1764ae3d AG |
8 | License: BSD |
9 | Group: Applications/Console | |
10 | Source0: https://github.com/jarun/nnn/archive/v%{version}/%{name}-%{version}.tar.gz | |
5b10cffe | 11 | # Source0-md5: bf4e723f4d60b24f97c9a0c98602d8de |
1764ae3d | 12 | Patch0: %{name}-no-rebuild-on-install.patch |
a28b3c61 | 13 | Patch1: %{name}-flags.patch |
1764ae3d AG |
14 | URL: https://github.com/jarun/nnn |
15 | BuildRequires: ncurses-devel | |
a28b3c61 | 16 | BuildRequires: pcre-devel |
1764ae3d AG |
17 | BuildRequires: pkgconfig |
18 | BuildRequires: readline-devel | |
9a2886cd | 19 | Suggests: archivemount |
1764ae3d AG |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
21 | ||
22 | %description | |
23 | nnn is probably the fastest and most resource-sensitive (with all its | |
24 | capabilities) file browser you have ever used. It's extremely flexible | |
25 | too - integrates with your DE and favourite GUI utilities, works with | |
26 | the desktop opener, supports bookmarks, has smart navigation | |
27 | shortcuts, navigate-as-you-type mode, disk usage analyzer mode, | |
28 | comprehensive file details and much more. nnn was initially forked | |
29 | from noice but is significantly different today. | |
30 | ||
31 | Cool things you can do with nnn: | |
32 | ||
33 | - open any file in the default desktop application or a custom one | |
34 | - navigate-as-you-type (search-as-you-type enabled even on directory | |
35 | switch) | |
36 | - check disk usage with number of files in current directory tree | |
37 | - run desktop search utility (gnome-search-tool or catfish) in any | |
38 | directory | |
39 | - copy absolute file paths to clipboard, spawn a terminal and use the | |
40 | paths | |
41 | - navigate instantly using shortcuts like ~, -, & or handy bookmarks | |
42 | - use cd ..... at chdir prompt to go to a parent directory | |
43 | - detailed file stats, media info, list and extract archives | |
44 | - pin a directory you may need to revisit and jump to it anytime | |
45 | - lock the current terminal after a specified idle time | |
46 | - change directory on exit | |
47 | ||
48 | %package -n bash-completion-nnn | |
49 | Summary: bash-completion for nnn | |
50 | Summary(pl.UTF-8): bashowe uzupełnianie nazw dla nnn | |
51 | Group: Applications/Shells | |
52 | Requires: %{name} = %{version}-%{release} | |
53 | Requires: bash-completion >= 2.0 | |
1764ae3d | 54 | BuildArch: noarch |
1764ae3d AG |
55 | |
56 | %description -n bash-completion-nnn | |
57 | This package provides bash-completion for nnn. | |
58 | ||
59 | %description -n bash-completion-nnn -l pl.UTF-8 | |
60 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla nnn. | |
61 | ||
62 | %package -n fish-completion-nnn | |
63 | Summary: Fish completion for nnn command | |
64 | Summary(pl.UTF-8): Dopełnianie parametrów w fish dla polecenia nnn | |
65 | Group: Applications/Shells | |
66 | Requires: fish | |
67 | Requires: nnn = %{version}-%{release} | |
c1461ecf | 68 | BuildArch: noarch |
1764ae3d AG |
69 | |
70 | %description -n fish-completion-nnn | |
71 | Fish completion for nnn command. | |
72 | ||
73 | %description -n fish-completion-nnn -l pl.UTF-8 | |
74 | Dopełnianie parametrów w fish dla polecenia nnn. | |
75 | ||
76 | %package -n zsh-completion-nnn | |
77 | Summary: Zsh completion for nnn command | |
78 | Summary(pl.UTF-8): Dopełnianie parametrów w zsh dla polecenia nnn | |
79 | Group: Applications/Shells | |
80 | Requires: nnn = %{version}-%{release} | |
81 | Requires: zsh | |
c1461ecf | 82 | BuildArch: noarch |
1764ae3d AG |
83 | |
84 | %description -n zsh-completion-nnn | |
85 | Zsh completion for nnn command. | |
86 | ||
87 | %description -n zsh-completion-nnn -l pl.UTF-8 | |
88 | Dopełnianie parametrów w zsh dla polecenia nnn. | |
89 | ||
90 | %prep | |
91 | %setup -q | |
92 | %patch0 -p1 | |
a28b3c61 | 93 | %patch1 -p1 |
1764ae3d AG |
94 | |
95 | %build | |
96 | %{__make} \ | |
97 | CC="%{__cc}" \ | |
98 | CFLAGS="%{rpmcflags}" \ | |
a28b3c61 | 99 | CFLAGS_OPTIMIZATION= \ |
1764ae3d | 100 | CPPFLAGS="%{rpmcppflags}" \ |
a28b3c61 JP |
101 | LDFLAGS="%{rpmldflags}" \ |
102 | O_CTX8=1 \ | |
103 | O_PCRE=1 | |
1764ae3d AG |
104 | |
105 | %install | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | %{__make} install \ | |
108 | DESTDIR=$RPM_BUILD_ROOT \ | |
109 | PREFIX=%{_prefix} | |
110 | ||
111 | install -Dpm0644 -t $RPM_BUILD_ROOT%{bash_compdir} \ | |
a28b3c61 | 112 | misc/auto-completion/bash/nnn-completion.bash |
1764ae3d | 113 | install -Dpm0644 -t $RPM_BUILD_ROOT%{fish_compdir} \ |
a28b3c61 | 114 | misc/auto-completion/fish/nnn.fish |
1764ae3d | 115 | install -Dpm0644 -t $RPM_BUILD_ROOT%{zsh_compdir} \ |
a28b3c61 | 116 | misc/auto-completion/zsh/_nnn |
1764ae3d AG |
117 | |
118 | %clean | |
119 | rm -rf $RPM_BUILD_ROOT | |
120 | ||
121 | %files | |
122 | %defattr(644,root,root,755) | |
123 | %doc CHANGELOG LICENSE README.md | |
124 | %attr(755,root,root) %{_bindir}/%{name} | |
125 | %{_mandir}/man1/%{name}.1* | |
126 | ||
127 | %files -n bash-completion-nnn | |
128 | %defattr(644,root,root,755) | |
129 | %{bash_compdir}/nnn-completion.bash | |
130 | ||
131 | %files -n fish-completion-%{name} | |
132 | %defattr(644,root,root,755) | |
133 | %{fish_compdir}/nnn.fish | |
134 | ||
135 | %files -n zsh-completion-%{name} | |
136 | %defattr(644,root,root,755) | |
137 | %{zsh_compdir}/_nnn |