dropped cmake for src dist

This commit is contained in:
Nick Bolton 2011-05-07 14:08:05 +00:00
parent 710e3a1967
commit ab045a1b8e
2 changed files with 27 additions and 42 deletions

View File

@ -321,13 +321,6 @@ if (CONF_CPACK)
# both 32-bit and 64-bit processors.
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
# For source code, use .tar.gz on Unix, and .zip on Windows
if (UNIX)
set(CPACK_SOURCE_GENERATOR TGZ)
else (UNIX)
set(CPACK_SOURCE_GENERATOR ZIP)
endif()
set(CPACK_PACKAGE_NAME "synergy")
set(CPACK_PACKAGE_VENDOR "The Synergy Project")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Synergy server and client")
@ -339,39 +332,6 @@ if (CONF_CPACK)
set(CPACK_RESOURCE_FILE_LICENSE "${cmake_dir}/License.rtf")
set(CPACK_RESOURCE_FILE_README "${cmake_dir}/Readme.txt")
# files to exclude from src package (regex patterns)
# to escape, use 4 backslashes (\\\\) -- yuck!
set(CPACK_SOURCE_IGNORE_FILES
# temp output dirs in root
"/build/"
"/bin/"
"/lib/"
# generated config.h file
"/config\\\\.h$"
# buildbot stuff
"\\\\.buildbot\\\\-sourcedata$"
# qt temp build dir
"/gui/tmp/.*"
# qt make file
"/gui/Makefile$"
# qt generated ui headers
"/gui/ui_.*\\\\.h$"
# compiled python files
".*\\\\.pyc$"
# subversion caches (all dirs)
".*/\\\\.svn/.*"
# emacs temporary files
".*~$"
)
# Must be last (since it relies of CPACK_ vars).
include(CPack)

View File

@ -465,8 +465,7 @@ class InternalCommands:
elif type == 'src':
if sys.platform in ['linux2', 'darwin']:
self.dist_run('make package_source', unixTarget)
moveExt = 'tar.gz'
self.distSrc()
else:
package_unsupported = True
@ -509,6 +508,32 @@ class InternalCommands:
("Package type, '%s' is not supported for platform, '%s'")
% (type, sys.platform))
def distSrc(self):
version = self.getVersionFromCmake()
name = (self.project + '-' + version + '-Source')
exportPath = self.build_dir + '/' + name
if os.path.exists(exportPath):
print "Removing existing export..."
import shutil
shutil.rmtree(exportPath)
print 'Exporting repository to: ' + exportPath
err = os.system('svn export . ' + exportPath)
if err != 0:
raise Exception('Repository export failed: ' + str(err))
packagePath = '../' + self.bin_dir + '/' + name + '.tar.gz'
try:
self.try_chdir(self.build_dir)
print 'Packaging to: ' + packagePath
err = os.system('tar cfvz ' + packagePath + ' ' + name)
if err != 0:
raise Exception('Package failed: ' + str(err))
finally:
self.restore_chdir()
def unixMove(self, source, dest):
print 'Moving ' + source + ' to ' + dest
err = os.system('mv ' + source + ' ' + dest)