I am trying to rebuild nano rpm package on CentOS 8 so after installing it I will be able to run nano using command newnano.
After some googling I came to the conclusion that I need to change .spec file and build package using command rpmbuild -ba nano.spec
.
Here is what I've already tried:
Summary: A small text editor
Name: newnano
...
Bad exit status from '/var/tmp/rpm-tmp.DSP7dc (%prep)
cd newnano-2.9.8
but there is no such directory.%install
cd build
%make install
rm -f %{buildroot}%{_infodir}/dir
alias newnano="nano"
...
%description
and before %prep
in original .spec this: %package -n newnano
Summary: test
%description -n newnano
test
-n newnano
to %files
section. Building and installation was successful but new command was not added.So how I have to change .spec file to achieve my goal?
There is a very simpe way to do it via rpmrebuild
and .rpm
nano
package.
rpmrebuild -enp nano.rpm
.spec
file (it will open after previous comand) you should do these:
Name: nano
with Name: newnano
(optional, but recommended)mv /usr/bin/nano /usr/bin/newnano
before the first exit 0
line. This section you can find before %changelog
.rpm
that you will see after you close vim
.rpm
via rpm -i
command