-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 David Bolt wrote:
On Tue, 11 Oct 2005, Henne Vogelsang
wrote:- On an other level. Would it be possible to place a `standard` example at http://www.opensuse.org/SUSE_Build_Tutorial#Examples Something that would just require a configure, make and make install in real life. Thats pretty hard to do. Because once youre switching from packaging
On Tuesday, October 11, 2005 at 22:27:47, houghi wrote: scripts to packaging real binarys that you create during build you add a whole new level to the process. In your current spec you really only use
I second what Henne wrote here. Again.. participating is important, thanks for being interested in the topic, but do believe that it's not an easy task. There are no such things as GUI builders, automatic spec file creators, a one spec for all.. (I know you didn't mention GUI builders, but I had a discussion about that lately) Basically, all the tool support you can get is from a few nice templates, a few scripts that easy the task of building in your environment (chroots, whatever) + uploading and similar stuff, and an editor with some support for writing spec files. Personally, I use GNU Emacs + its rpm-mode. But others would be vim or kate (though they offer fewer capabilities for editing spec files). ...
But the most complicated section of an spec is mostly the %build section. Plus once youre building something in %build you have to make sure about the build environment.
Indeed. Requires and BuildRequires isn't trivial either, if you want to make your package "portable" across SUSE Linux versions (like I do) and give users more helpful messages when they're missing a dependency and don't use YaST2 to install a package (e.g. say it's missing openssl instead of libcrypto.so.x).
This is where I would use autoconf, automake and, if required, libtool. Most of the RPMs I build have a %build consisting of basically the following:
%build ./configure <any options that are required> make
Actually like this: - --->8---------------------------------------------- %prep %setup -q %{?suse_update_libdir:%{suse_update_libdir}} %{?suse_update_config:%{suse_update_config -f}} CFLAGS="%{optflags}" \ CXXFLAGS="%{optflags}" \ ./configure \ --prefix="%{_prefix}" \ --libdir="%{_libdir}" \ --sysconfdir="%{_sysconfdir}" \ --mandir="%{_mandir}" %build %__make - --->8----------------------------------------------
So far, with those I've built[0], that seems to have sufficed.
Did you try building/running them on x86_64 ? ;)
So there is no standard spec that is usefull i think...
Indeed.
Not a single all-encompassing one, I would agree, as it would probably include unnecessary options[1]. Slightly more specific examples could be useful. E.g. one showing how to add new libraries, or maybe one for building a package containing binary applications. As opensuse.org already has one example each for KDE, Gnome and Perl, a few new ones may come in handy for those just starting out and wanting to learn.
My templates are here:
http://linux01.gwdg.de/~pbleser/files/rpm/templates/
They're pretty much state-of-the-art ;))).
cheers
- --
-o) Pascal Bleser http://linux01.gwdg.de/~pbleser/
/\\