mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-23 19:12:14 +03:00
dropped cmake for src dist
This commit is contained in:
parent
710e3a1967
commit
ab045a1b8e
@ -321,13 +321,6 @@ if (CONF_CPACK)
|
|||||||
# both 32-bit and 64-bit processors.
|
# both 32-bit and 64-bit processors.
|
||||||
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
|
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_NAME "synergy")
|
||||||
set(CPACK_PACKAGE_VENDOR "The Synergy Project")
|
set(CPACK_PACKAGE_VENDOR "The Synergy Project")
|
||||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Synergy server and client")
|
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_LICENSE "${cmake_dir}/License.rtf")
|
||||||
set(CPACK_RESOURCE_FILE_README "${cmake_dir}/Readme.txt")
|
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).
|
# Must be last (since it relies of CPACK_ vars).
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
|
||||||
|
@ -465,8 +465,7 @@ class InternalCommands:
|
|||||||
|
|
||||||
elif type == 'src':
|
elif type == 'src':
|
||||||
if sys.platform in ['linux2', 'darwin']:
|
if sys.platform in ['linux2', 'darwin']:
|
||||||
self.dist_run('make package_source', unixTarget)
|
self.distSrc()
|
||||||
moveExt = 'tar.gz'
|
|
||||||
else:
|
else:
|
||||||
package_unsupported = True
|
package_unsupported = True
|
||||||
|
|
||||||
@ -509,6 +508,32 @@ class InternalCommands:
|
|||||||
("Package type, '%s' is not supported for platform, '%s'")
|
("Package type, '%s' is not supported for platform, '%s'")
|
||||||
% (type, sys.platform))
|
% (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):
|
def unixMove(self, source, dest):
|
||||||
print 'Moving ' + source + ' to ' + dest
|
print 'Moving ' + source + ' to ' + dest
|
||||||
err = os.system('mv ' + source + ' ' + dest)
|
err = os.system('mv ' + source + ' ' + dest)
|
||||||
|
Loading…
Reference in New Issue
Block a user