one specfile to build multiple packages linked against different versions of libraries

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

 



hi!

i'm faced with a challenging problem, and have found no 'clean' solution to it
so far. maybe you can help.

let's say i've got an application to build, that links against two libraries,
libfoo and libbar. the application supports libfoo in two (incompatible)
versions and libbar in, say, four. the application's build system of course
detects the versions of libfoo and libbar, so there really is no need for
separate specfiles, because they would all look the same.

using the versions of libfoo and libbar somewhere within the rpm's name, i can
build rpms for all possible combinations of versions, such as:
application_libfoo1_libbar1-<application-version>.rpm
application_libfoo1_libbar2-<application-version>.rpm
application_libfoo1_libbar3-<application-version>.rpm
application_libfoo1_libbar4-<application-version>.rpm
application_libfoo2_libbar1-<application-version>.rpm
application_libfoo2_libbar2-<application-version>.rpm
application_libfoo2_libbar3-<application-version>.rpm
application_libfoo2_libbar4-<application-version>.rpm

i currently do so by specifying the versions of libfoo and libbar within the
specfile as defines, and provide those to the application's build system,
to ensure that it links against the required libraries, such as:
./configure --with-libfoo=%{libfoo_version}

that works fine. now what i really aim for is to build all possible rpms from
this one specfile with one command. the only thing i can come up with is to
call the rpmbuild command with the appropriate --define parameters for every
combination of libraries that i wish to compile the application for. that's a
bit ugly.

it gets more ugly, because i don't just have one application to build, i've got
quite a number. some of them support libbar in the same versions as others, but
others support only versions of libbar not supported by any of the others.

confused? me too ;) let's say application1 supports the libraries in the
versions just as above. application2 does not know libfoo, and supports libbar
in the versions 4 and 5. application1 won't compile with version 5 of libbar,
though.

so... if i wanted to build all applications with all library combinations, i'd
have to do some scripting. unless one of you has a better solution to this sort
of problem?

thanks for the help,
    jens

-- 
Progress means replacing a theory that is wrong with one more subtly wrong.


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux