On Tue, 2009-01-13 at 12:58 +0000, Frank Schwidom wrote:
> Hi,
>
> im searching for a tool, which can create an ebuild of every download
> location. Is there any known tool?
Although your description itself is a bit ambiguous I'll assume you
meant: Given download location A is there a tool which I could pass A as
a parameter and have it automatically create an ebuild for it.
This requirement has a number of problems:
1. The tool has no way of knowing what the download is or does. It
could probably get that info from the README (if there is one),
but that's human-readable free text and is not easily
machine-readable.
2. The tool would need to know the license. Again this can kinda
be automated if there is a COPYING file, but you have the same
restrictions as above.
3. The tool would need to know compile-time and run-time
dependencies. Assuming you also want to automate that, the
system must at least know the download locations of its
dependencies. This is almost impossible to automate.
4. The tool would need to know how to build the package. There are
many ways to do this (autoconf, cmake, xmkmf, eggs, gems, etc.).
And all these utilities have their quirks which cannot be known
to an automated tool.
5. The system would need to know what patches, USE flags, CFLAGS,
configure options to use for the build process. The system must
also know how to "massage" these options so that they fit into
the overall Gentoo way of doing things.
6. The system must know what steps to perform in the "install" and
"post-install" process. This varies from package to package and
the only true way of knowing is through trial and error.
OTOH, portage comes with a lot of tools to help "automate" ebuild
writing. They have sandbox, the portage API, automagically unpacking
archives in many different formats, automated patching, the mirror://
syntax, .eclasse's for common tasks/schemes, etc. etc. All the stuff
that *can* be easily automated has already been automated.
So yes, one would write a tool to half-ass do what you want, and you
will spend as much time, if not more, wrangling with the
automated .ebuild to actually get it to work. That's why package
maintainers make the big bucks ;-)
-a