-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, 02 Oct 2003 12:42:37 -0500, Thomas Dodd wrote:
Add macros to the spec near the begining for the distros/version
_you_support. Then include usage in the instruction on building your
opackage. so they need only '--define RHL7.3=1' , '--define RHEL3=1',
or '--define MDK9=1'. That give you the same result of using
redhat-release, package or file, and the ability to support more
distributions at the same time.
The spec file should not be doing RPM querries or checking files.
Perhaps I want to build a RHL7.3 RPM on my RHL9 box?
With the added problem of how to automate the builds? And what if a
user doesn't define any variable at all? Would the build fail or
default to the wrong target platform? I still think the better
approach is to move conditional code as much as possible out of the
spec file. Instead of building a binary rpm with --define RHEL3=1, you
would set BUILD_RHEL3=1 and "rpmbuild --rebuild foo.src.rpm" as usual.
The spec file would call an external script that either evaluates the
BUILD_RHEL3 variable or falls back to evaluating /etc/redhat-release
as a default.
- --
Michael, who doesn't reply to top posts and complete quotes anymore.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQE/fIfC0iMVcrivHFQRAtVFAJ0V/eEErCZdNbzQNUZ5aAQVwtdPigCfdnty
Mn7voxQr/GCwyJH0ge/ZpvQ=
=oBND
-----END PGP SIGNATURE-----