diff --git a/nano.spec b/nano.spec index b7f1f48..260506e 100644 --- a/nano.spec +++ b/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}