Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] rpmbuild defining opt install path
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2012-06-27 13:12:00


On Jun 26, 2012, at 2:40 PM, Lloyd Brown wrote:

> Is there an easy way with the .spec file and the rpmbuild command, for
> me to override the path the OpenMPI RPM installs into, in /opt?
> Basically, I'm already doing something like this:

I think all you need to do is override the RPM-builtin names, like _prefix (and possibly some others). For example, I did this in RHEL 6.2:

rpmbuild --rebuild --define '_prefix /tmp/bogus' \
     /home/jsquyres/RPMS/SRPMS/openmpi-1.6-1.src.rpm

Which resulted in:

+ ./configure --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/tmp/bogus --exec-prefix=/tmp/bogus --bindir=/tmp/bogus/bin --sbindir=/tmp/bogus/sbin --sysconfdir=/tmp/bogus/etc --datadir=/tmp/bogus/share --includedir=/tmp/bogus/include --libdir=/tmp/bogus/lib64 --libexecdir=/tmp/bogus/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info

For some reason, this didn't override localstatedir, sharedstatedir, mandir, and infodir (gotta love RPM! :-) ), so I did:

rpmbuild --rebuild --define '_prefix /tmp/bogus' --define '_localstatedir /tmp/bogus/var' --define '_sharedstatedir /tmp/bogus/var/lib' --define '_mandir /tmp/bogus/share/man' --define '_infodir /tmp/bogus/share/info' /home/jsquyres/RPMS/SRPMS/openmpi-1.6-1.src.rpm

When then gave me what I think you want:

+ ./configure --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/tmp/bogus --exec-prefix=/tmp/bogus --bindir=/tmp/bogus/bin --sbindir=/tmp/bogus/sbin --sysconfdir=/tmp/bogus/etc --datadir=/tmp/bogus/share --includedir=/tmp/bogus/include --libdir=/tmp/bogus/lib64 --libexecdir=/tmp/bogus/libexec --localstatedir=/tmp/bogus/var --sharedstatedir=/tmp/bogus/var/lib --mandir=/tmp/bogus/share/man --infodir=/tmp/bogus/share/info

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/