Hi All, We (TSP developers) have done a CMake macro which helps in building RPM package. You'll find the CMake macro file attached.
The usage is simple:
1) put the macro file in your CMAKE_MODULE_PATH
2) Then add something like this to your CMakeLists.txt
INCLUDE(CPack)
INCLUDE(UseRPMTools)
IF(RPMTools_FOUND)
RPMTools_ADD_RPM_TARGETS(packagename)
ENDIF(RPMTools_FOUND)
then you inherit 2 new top-level targets named
packagename_rpm
packagename_srpm
you may call to build RPM or Source RPM.
The macro generate a MINIMAL spec file, but if you
want to tailor you own spec file you may provide one
to the macro:
RPMTools_ADD_RPM_TARGETS(packagename ${CMAKE_SOURCE_DIR}/package.spec)
You will get the same target but using your custom spec files.
If your custom spec file need to be CONFIGUREd then
name it with ".in" extension and the macro will process the
file accordingly.
RPMTools_ADD_RPM_TARGETS(packagename ${CMAKE_SOURCE_DIR}/package.spec.in)
This is a preliminary version but it should work as expected.
--
Erk
UseRPMTools.cmake
Description: Binary data
_______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
