The better way to use %install section

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys,

I'm packing a third party software and this third party software is a
tarball with a install.sh and other binaries.

For example:

$ tar xvzf myprogram.tar.gz
$ cd myprogram
$ ls
bin1
bin2
install.sh

To install this software I just need to run (as root) install.sh and
myprogram runs fine.

After finishing installation I have all the files installed as the
following example:

/usr/bin/bin1
/usr/bin/bin2

What's the better way to install these files?

Do I need to run install.sh on the %install section inside
myprogram.spec? Something like this:

%install
sh install.sh

Or do I need to copy all install.sh commands inside %install section?
Something like this:

%install
install -o root -w root -m 0755 bin1 %{_installdir}/bin1
install -o root -w root -m 0755 bin2 %{_installdir}/bin2

And one question just to confirm: do I need to list all bin* files
inside %files in both case, right?

Thanks in advance.

-- 
Murilo Opsfelder Araújo
mopsfelder@xxxxxxxxx
{murilo,panda}@bsd.com.br

--
Fedora-packaging mailing list
Fedora-packaging@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux