• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2set(PACKAGING_FILES
3debian.control
4debian.rules
5debian.compat
6libfruit.dsc
7libfruit.install
8libfruit.spec
9)
10
11# This places configured files (build files with @FRUIT_VERSION@ replaced) in build/extras/packaging/built
12
13foreach(F ${PACKAGING_FILES})
14  configure_file(${F} built/${F} @ONLY)
15endforeach(F)
16
17configure_file(PKGBUILD PKGBUILD-template @ONLY)
18
19add_custom_target(fruit-${FRUIT_VERSION}.tar.gz ALL
20                  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/PKGBUILD-template
21                  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../..
22                  COMMAND git archive -o ${CMAKE_CURRENT_BINARY_DIR}/built/fruit-${FRUIT_VERSION}.tar.gz --prefix=fruit-${FRUIT_VERSION}/ HEAD
23                  COMMAND md5sum ${CMAKE_CURRENT_BINARY_DIR}/built/fruit-${FRUIT_VERSION}.tar.gz | awk '{print $$1}' >${CMAKE_CURRENT_BINARY_DIR}/tarball-md5
24                  COMMAND sed "\"s/.*md5sums.*/md5sums=(`cat" "${CMAKE_CURRENT_BINARY_DIR}/tarball-md5`)/\"" <${CMAKE_CURRENT_BINARY_DIR}/PKGBUILD-template >${CMAKE_CURRENT_BINARY_DIR}/built/PKGBUILD)
25