BUG: Add support for destination directory during RPM builds
Building an RPM from the makefile included with the source fails to use the DESTDIR environment variable. This results in modifications to the primary file tree every time a package is built. This is problematic for several reasons, not the least of which is the previously installed binaries are clobbered during build attempts.
The attached patch to Makefile.in resolves the problem.
Test case
Environment
Motion version: |
3.1.18 |
ffmpeg version: |
|
Shared libraries: |
curl, xmlrpc, ffmpeg, mysql, postgresql |
Server OS: |
|
--
TWikiGuest - 11 Feb 2005
Follow up
I assume that is happening with no red hat / fedora system , because DESTDIR is not needed at all. Moreover the spec file
follows the usual layout of directories of most of the system , so if you want to change DESTDIR you can just modify the specfile, no needed to change Makefile.in .
--
AngelCarpintero - 12 Feb 2005
It may not be clear by what was meant by DESTDIR. This does NOT refer to the final destination where the files are installed. It refers to the temporary build root that is used while building the RPM. This is important for several reasons, two of which are:
1) You should be able to start with a clean file structure for the RPM. This is usually done by deleting/creating a BUILDROOT directory as part of the RPM build process.
2) The RPM build process should NOT overwrite files that belong to a a previously installed and running RPM.
Neither of these can be assured by simply setting DESTDIR in the spec file. In fact,
SuSE 9.2 will, by default, set DESTDIR to the BUILDROOT directory when executing the %makeinstall macro. However the Makefile needs to utilize the DESTDIR when installing the files that will thenbe used to make the binary RPM.
--
PaulBeltrani - 14 Feb 2005
Fix record
Yes Paul , you was right , sorry for the misunderstanding . Your patch has been added to be include in motion-3.1.19_snap2 Thanks.
--
AngelCarpintero - 14 Feb 2005