move generating of /etc/nanorc to %build
This commit is contained in:
parent
b8b385e3ea
commit
fbf84ec489
23
nano.spec
23
nano.spec
@ -31,25 +31,26 @@ cd build
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
cd build
|
||||
%make_install
|
||||
rm -f %{buildroot}%{_infodir}/dir
|
||||
cp %{SOURCE2} ./nanorc
|
||||
|
||||
# downstream changes to /etc/nanorc
|
||||
# generate default /etc/nanorc
|
||||
# - disable line wrapping by default
|
||||
# - set hunspell as the default spell-checker
|
||||
# - enable syntax highlighting by default (#1270712)
|
||||
sed -e 's/# set nowrap/set nowrap/' \
|
||||
-e 's/^#.*set speller.*$/set speller "hunspell"/' \
|
||||
-e 's|^# \(include "/usr/share/nano/\*.nanorc"\)|\1|' \
|
||||
doc/sample.nanorc >> ./nanorc
|
||||
mkdir -p %{buildroot}%{_sysconfdir}
|
||||
install -m 644 ./nanorc %{buildroot}%{_sysconfdir}/nanorc
|
||||
%{SOURCE2} doc/sample.nanorc > ./nanorc
|
||||
|
||||
%install
|
||||
cd build
|
||||
%make_install
|
||||
rm -f %{buildroot}%{_infodir}/dir
|
||||
|
||||
# remove installed HTML documentation
|
||||
rm -f "%{buildroot}%{_docdir}"/nano/{nano,nano.1,nanorc.5,rnano.1}.html
|
||||
rm -f %{buildroot}%{_docdir}/nano/{nano,nano.1,nanorc.5,rnano.1}.html
|
||||
|
||||
# install default /etc/nanorc
|
||||
mkdir -p %{buildroot}%{_sysconfdir}
|
||||
install -m 0644 ./nanorc %{buildroot}%{_sysconfdir}/nanorc
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user