My apologies if my use of terminology caused confusion. I did set the CPACK_SOURCE_GENERATOR to "RPM". It appears that when you do this cpack sets the Prefix: to the set CPACK_PACKAGING_INSTALL_PREFIX, but then creates the entire %files section using absolute paths.
Ben ________________________________________ From: Eric Noulard [[email protected]] Sent: Saturday, November 10, 2012 2:44 AM To: Levine, Ben Cc: [email protected] Subject: Re: [CMake] cpack source RPM not setting install path 2012/11/10 Ben Levine <[email protected]>: > It presents a make package_source option. And using this does create a > (mostly) reasonable spec file. I'm actually just looking to deploy > source code via this method rather then create a "true" source RPM. OK then I guess (please confirm) you did that set(CPACK_SOURCE_GENERATOR "RPM") and then you do make package_source. if this is the case be sure the resulting RPM is nothing near far a real source RPM. A source RPM is supposed to contains a tarball (tar.gz, tar.xz etc..) and the **source** spec file which makes it possible to build the binary RPM. The source RPM may contains other files like post/pre install scripts and may be some patches etc... The RPM generated by CPack with the previous method is in fact a binary RPM which happens to contains sources file and not a source RPM. i.e. it does not have the structure of a source RPM. Concerning the spec file, CPack RPM generates a "short-cutted" spec file precisely because it is not meant to build source RPM. Have a look at the %prep step and the purposely missing %build step. It may be possible to build a real source RPM with CPack but as it has been discussed (on the mailing list) for source DEB package it is not so sure it would be useful. The main issue being that "normally" the spec file is the very same spec file for the source and binary RPM. WIth the choice made currently for binary CPack RPM (short-cutted spec file ) this is not possible. -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org ________________________________ Confidentiality Notice The information transmitted in this electronic mail (e-mail) is the property of Belvedere Trading LLC. This e-mail is intended only for the person or entity to which it is addressed and may contain material that is confidential, privileged or otherwise protected by law. Any review, retention, retransmission, dissemination or other use of, or taking any action in reliance upon, this information by persons or entities other than the intended recipient is STRICTLY PROHIBITED. If you received this e-mail in error, please alert the sender by reply e-mail and then delete this e-mail and any attachments in their entirety, whether in electronic or hard copy format. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. Emails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by email. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
