Page 1 of 1

Compile external packages?

PostPosted: Sun Nov 15, 2009 2:36
by bg3075
Again, I am migrating from Fedora to sabayon, and would like to compile Avast Antivirus (in order to scan files which I may share with my other partition of Windows). I have installed it on Fedora, because Avast has an .rpm package for Fedora. The only download I could figure would be appropriate for sabayon is their tar gz package in the Linux downloads. I have used emerge and equo already, but cannot figure out how to compile this download. I extracted it to /opt, but it does not
Code: Select all
./configure
when ran from within the directory (as root). See the attached Linux download options for Avast.

Re: Compile external packages?

PostPosted: Sun Nov 15, 2009 7:05
by Fitzcarraldo
Well, if you know how to install packages using a local overlay (see SL Wiki and various SL Forum threads for examples of how to do this: SL Forum Search keywords "local ebuild" or "local overlay" should find you a few threads) then there is a local ebuild for Avast Antivirus in the Gentoo Bugzilla that you could try (Gentoo Bugzilla Report No. 277503).

Less ideal than using a local ebuild, you could try installing the RPM package directly using the rpm command. See my post on installing the RPM package JAOLT (Re: Installing JAOLT) for an example of how to do this. I don't know whether it will work for Avast Antivirus, but you could give it a try. I would only suggest doing that if the local ebuild does not work, as ebuilds are the proper way for installing source packages in Gentoo/SL.

Re: Compile external packages?

PostPosted: Sun Nov 15, 2009 22:53
by bg3075
Thanks Fitzcarraldo, you are a wealth of sabayon knowledge. So what do you think/prefer... is it best to always ebuild a package from /urs/portage/<appropriate_directory>?

Also, I am still a bit confused on the process to ebuild. Though, it appears to me that you must first do something like this, in Terminal:
Code: Select all
 ebuild <yourpackagename.ebuild> manifest
and then
Code: Select all
emerge <yourpackagename>
from the same directory saved the .ebuild to (possibly as above). Is this right?

Re: Compile external packages?

PostPosted: Sun Nov 15, 2009 23:50
by bg3075
Yes, I was able to install Avast Antivirus Home Edition from rpm following your guidance. The steps taken are below.

Downloaded avast4workstation-1.3.0-1.i586.rpm to my Desktop then did the following as the root user in a Terminal window:

Code: Select all
    equo install rpm
    rpm -ihv --nodeps /home/barry/Desktop/avast4workstation-1.3.0-1.i586.rpm

i = install
h = display hashes to indicate progress as the package is installed
v = verbose

The --nodeps is needed otherwise the rpm command fails because it cannot find the dependencies listed in the RPM Database, which is understandable as SL is not an RPM-based distribution. - Fitzcarraldo

To run it, under my normal user account entered the following command in a Terminal window:

Code: Select all
 /usr/bin/avastgui

As I noticed the /usr/bin/ directory included "avast", "avastgui", and "avast-update"; "avast" just runs the antivirus scanner (it appears with some sort of defaults); "avastgui" brings up the program gui (of course), and "avast-update" updates the antivirus definition file (but can also be run from "avastgui").

Now, if someone uses this process for Avast Antivirus Home Edition, even though it is free, make sure you register it from a link on their site, http://www.avast.com/eng/home-registration.php, as you will need to enter the key emailed to you anyway, on first run.

Therefore, I created a desktop shortcut, by right-clicking my desktop, and simply entered the command, above, to run the gui. - Thanks a bunch. I have saved your post as future reference.

Re: Compile external packages?

PostPosted: Mon Nov 16, 2009 7:22
by Fitzcarraldo
bg3075 wrote:Also, I am still a bit confused on the process to ebuild. Though, it appears to me that you must first do something like this, in Terminal:
Code: Select all
 ebuild <yourpackagename.ebuild> manifest
and then
Code: Select all
emerge <yourpackagename>
from the same directory saved the .ebuild to (possibly as above). Is this right?

To create the manifest you don't have to do it from the ebuild directory: you can use the full path name in the command:

ebuild /full/path/to/the/<package>.ebuild manifest

but you do have to be the root user. To merge (install) the package, you also don't need to do it from the ebuild directory, but you do need to be the root user:

emerge <package>
or
emerge =<package>-<version>

See the SL Wiki articles on the Portage source package manager (the link to the SL Wiki is at the top right of this page). Also read the chapter on Portage in the Gentoo Handbook.