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