On Mon, Sep 8, 2008 at 1:30 PM, Chris Evich <cevich redhat com>
wrote:
> Hi,
>
> Hopefully this is the right mailing list :)
>
> Project rpmbuilder aims to provide a template-based approach to packaging. In
> other words, it removes responsibility from developer to produce an RPM spec
> file the "right" way. Instead, the package developer just feeds in his
> project's particulars, and a template-driven engine puts the pieces together
> and spits out a "sane" RPM and SRPM.
>
>
https://fedorahosted.org/rpmbuilder
Personally I would rather see Fedora heavily invest in reducing all
the overhead that currently exists in packaging and putting more
intelligence into the core of the system, rather than generating spec
files. Editing spec files is already painful enough; editing
generated ones sounds even less fun. Essentially if the build system
knows about things like the Ruby gem specs, Python setup.py, Java's
Maven,
freedesktop.org autotools-based desktop packages, etc., then
you don't need to autogenerate a lot of spec boilerplate.
Actually, I completely agree, and this project is intended to address the
hand-editing you describe. The templates rpmbuilder uses will be shipped
_with it_, I'm not suggesting yet-another-thing-to-edit-when-packaging :)
Then, different templates may be specified at packaging time depending on the
"thing" to be packaged.
For example, I could envision a template for packaging python "stuff" that
uses a setup.py when resolving a python-rpmbuilder template. In other words,
it should be as simple as:
# rpmbuilder --mode=python --pkgname=MyRPMPackageName
--version=1.2.3 --release=4 --sourcedir=. --destdir=.
The result would be, ./MyRPMPackageName-1.2.4-4.noarch.rpm and/or
./MyRPMPackageName-1.2.4-4.noarch.srpm are written to CWD.
Though this could easily extend to other scripting languages / build
environments as well. All that's needed is someone to develop a template once.