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