2010-09-04 20:55:29 +02:00
|
|
|
set(RPMBUILD_DIR ~/rpmbuild CACHE STRING "Rpmbuild directory, for the rpm target")
|
2011-11-30 19:52:37 +01:00
|
|
|
set(MOCK_COMMAND mock CACHE STRING "Command to use for running mock")
|
2010-09-04 20:55:29 +02:00
|
|
|
set(MOCK_CHROOT fedora-13-x86_64 CACHE STRING "Chroot to use when building an rpm with mock")
|
|
|
|
set(RPM_DISTRO fc13 CACHE STRING "Suffix of the rpm file")
|
2010-09-04 22:01:32 +02:00
|
|
|
set(RPM_ARCH x86_64 CACHE STRING "Architecture of the rpm file")
|
2010-09-04 20:55:29 +02:00
|
|
|
|
|
|
|
add_custom_target(rpm
|
|
|
|
COMMAND ${CMAKE_SOURCE_DIR}/dist/maketarball.sh
|
2011-12-02 20:06:53 +01:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy clementine-${CLEMENTINE_VERSION_SPARKLE}.tar.gz ${RPMBUILD_DIR}/SOURCES/
|
2010-09-04 20:55:29 +02:00
|
|
|
COMMAND rpmbuild -bs ${CMAKE_SOURCE_DIR}/dist/clementine.spec
|
2011-11-30 19:52:37 +01:00
|
|
|
COMMAND ${MOCK_COMMAND}
|
|
|
|
--verbose
|
|
|
|
--root=${MOCK_CHROOT}
|
|
|
|
--resultdir=${CMAKE_BINARY_DIR}/mock_result/
|
2011-12-02 15:47:25 +01:00
|
|
|
${RPMBUILD_DIR}/SRPMS/clementine-${CLEMENTINE_VERSION_RPM_V}-${CLEMENTINE_VERSION_RPM_R}.${RPM_DISTRO}.src.rpm
|
2011-11-30 19:52:37 +01:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
2011-12-02 15:47:25 +01:00
|
|
|
${CMAKE_BINARY_DIR}/mock_result/clementine-${CLEMENTINE_VERSION_RPM_V}-${CLEMENTINE_VERSION_RPM_R}.${RPM_DISTRO}.${RPM_ARCH}.rpm
|
|
|
|
${CMAKE_BINARY_DIR}/clementine-${CLEMENTINE_VERSION_RPM_V}-${CLEMENTINE_VERSION_RPM_R}.${RPM_DISTRO}.${RPM_ARCH}.rpm
|
2010-09-04 20:55:29 +02:00
|
|
|
)
|