Adapt the rpm automated build system of bootstrap (pass 1)
This commit is contained in:
parent
71e1c188ea
commit
9e672ffaa8
|
@ -2,15 +2,15 @@
|
||||||
# -*- Makefile -*-
|
# -*- Makefile -*-
|
||||||
# Mimicking the behavior of a top-level autotool generated Makefile.
|
# Mimicking the behavior of a top-level autotool generated Makefile.
|
||||||
|
|
||||||
tools = bootstrap vlsisapd hurricane crlcore nimbus metis mauka knik katabatic kite \
|
tools = bootstrap vlsisapd hurricane crlcore etesian knik katabatic kite \
|
||||||
equinox solstice cumulus stratus1 unicorn documentation
|
equinox solstice cumulus stratus1 unicorn documentation
|
||||||
prefix = /usr
|
prefix = /usr
|
||||||
DESTDIR =
|
DESTDIR =
|
||||||
BUILD_DESTDIR = $(shell pwd)/install.dir
|
BUILD_DESTDIR = $(shell pwd)/install.dir
|
||||||
BOOTSTRAP_TOP = $(prefix)
|
IMPORTEDS_TOP = $(prefix)
|
||||||
CORIOLIS_TOP = $(prefix)
|
CORIOLIS_TOP = $(prefix)
|
||||||
|
|
||||||
environment = BOOTSTRAP_TOP=$(BOOTSTRAP_TOP); export BOOTSTRAP_TOP; \
|
environment = IMPORTEDS_TOP=$(IMPORTEDS_TOP); export IMPORTEDS_TOP; \
|
||||||
CORIOLIS_TOP=$(CORIOLIS_TOP); export CORIOLIS_TOP
|
CORIOLIS_TOP=$(CORIOLIS_TOP); export CORIOLIS_TOP
|
||||||
|
|
||||||
.PHONY: build install FORCE
|
.PHONY: build install FORCE
|
||||||
|
@ -31,6 +31,17 @@ build: FORCE
|
||||||
"x86_64") cmakeArgs="-D LIB_SUFFIX:STRING=64";; \
|
"x86_64") cmakeArgs="-D LIB_SUFFIX:STRING=64";; \
|
||||||
*) cmakeArgs="";; \
|
*) cmakeArgs="";; \
|
||||||
esac; \
|
esac; \
|
||||||
|
echo "** Building tool Coloquinte"; \
|
||||||
|
mkdir -p build.dir/Coloquinte; \
|
||||||
|
cmake -D CMAKE_BUILD_TYPE:STRING=RELEASE \
|
||||||
|
-D BUILD_SHARED_LIBS:STRING=ON \
|
||||||
|
-D BUILD_DOC:STRING=OFF \
|
||||||
|
-D CMAKE_INSTALL_PREFIX:STRING=$(CORIOLIS_TOP) \
|
||||||
|
-D DESTDIR:STRING=$(BUILD_DESTDIR) \
|
||||||
|
$${cmakeArgs} \
|
||||||
|
../../importeds/Coloquinte \
|
||||||
|
|| exit 1; \
|
||||||
|
cd ../..; \
|
||||||
for tool in $(tools); do \
|
for tool in $(tools); do \
|
||||||
echo "** Building tool $${tool}"; \
|
echo "** Building tool $${tool}"; \
|
||||||
mkdir -p build.dir/$$tool; \
|
mkdir -p build.dir/$$tool; \
|
||||||
|
|
|
@ -48,7 +48,7 @@ projects = [ { 'name' : "importeds"
|
||||||
]
|
]
|
||||||
|
|
||||||
package = { 'name' : 'coriolis2'
|
package = { 'name' : 'coriolis2'
|
||||||
, 'version' : '1.0'
|
, 'version' : '2.1'
|
||||||
, 'excludes': [ 'vlsisapd/src/openChams'
|
, 'excludes': [ 'vlsisapd/src/openChams'
|
||||||
, 'vlsisapd/doc/openChams'
|
, 'vlsisapd/doc/openChams'
|
||||||
, 'vlsisapd/examples/openChams'
|
, 'vlsisapd/examples/openChams'
|
||||||
|
@ -69,8 +69,6 @@ package = { 'name' : 'coriolis2'
|
||||||
, 'unicorn/doc/html'
|
, 'unicorn/doc/html'
|
||||||
, 'unicorn/doc/latex'
|
, 'unicorn/doc/latex'
|
||||||
]
|
]
|
||||||
, 'projects': [ 'bootstrap'
|
, 'projects': [ 'coriolis'
|
||||||
, 'vlsisapd'
|
|
||||||
, 'coriolis'
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,24 +82,12 @@ class Builder:
|
||||||
return self.__dict__[attribute]
|
return self.__dict__[attribute]
|
||||||
|
|
||||||
|
|
||||||
#def _guessGitHash ( self, project ):
|
def _guessGitHash ( self, project ):
|
||||||
# revisionPattern = re.compile ( r"^Revision:\s*(?P<revision>\d+)" )
|
self.gitHash = 'x'
|
||||||
# projectSvnDir = os.path.join ( self.svnMethod+project.getRepository() )
|
os.chdir ( self.sourceDir+'/'+project.getName() )
|
||||||
#
|
command = [ 'git', 'log', '--pretty=format:%h', '-n', '1']
|
||||||
# os.chdir( )
|
self.gitHash = subprocess.Popen ( command, stdout=subprocess.PIPE ).stdout.readlines()[0]
|
||||||
# command = [ 'git', 'log', '--pretty="%h"', '-n', '1']
|
return
|
||||||
# svnInfo = subprocess.Popen ( command, stdout=subprocess.PIPE )
|
|
||||||
#
|
|
||||||
# for line in svnInfo.stdout.readlines():
|
|
||||||
# m = revisionPattern.match ( line )
|
|
||||||
# if m:
|
|
||||||
# self.gitHash = m.group("revision")
|
|
||||||
# print "Latest revision of project %s is %s." % (project.getName(),self.gitHash)
|
|
||||||
# return
|
|
||||||
#
|
|
||||||
# print "[WARNING] Cannot guess revision for project \"%s\"." % project.getName()
|
|
||||||
# print " (using: \"x\")"
|
|
||||||
# return
|
|
||||||
|
|
||||||
|
|
||||||
def _configure ( self, fileIn, file ):
|
def _configure ( self, fileIn, file ):
|
||||||
|
@ -111,8 +99,9 @@ class Builder:
|
||||||
substituted0 = line
|
substituted0 = line
|
||||||
|
|
||||||
while not stable:
|
while not stable:
|
||||||
substituted1 = re.sub ( r"@svntag@" , self.gitHash, substituted0 )
|
substituted1 = re.sub ( r"@revdate@" , self.revDate, substituted0 )
|
||||||
substituted1 = re.sub ( r"@coriolisTop@", "/opt/coriolis2" , substituted1 )
|
substituted1 = re.sub ( r"@githash@" , self.gitHash, substituted1 )
|
||||||
|
substituted1 = re.sub ( r"@coriolisTop@", "/usr" , substituted1 )
|
||||||
if substituted0 == substituted1: stable = True
|
if substituted0 == substituted1: stable = True
|
||||||
else: substituted0 = substituted1
|
else: substituted0 = substituted1
|
||||||
|
|
||||||
|
@ -291,37 +280,49 @@ class Builder:
|
||||||
# self._execute ( command, "svn checkout %s" % tool )
|
# self._execute ( command, "svn checkout %s" % tool )
|
||||||
# print
|
# print
|
||||||
# return
|
# return
|
||||||
#
|
|
||||||
#
|
|
||||||
#def _svnExport ( self, tool ):
|
def gitExport ( self, projectName ):
|
||||||
# project = self._conf.getToolProject ( tool )
|
rawArchive = self.tarballDir+'/'+projectName+'.tar'
|
||||||
# if not project:
|
|
||||||
# print ErrorMessage( 0, "Tool \"%s\" is not part of any project."%tool
|
os.chdir ( self.sourceDir+'/'+projectName )
|
||||||
# , "Cannot guess the SVN repository.")
|
command = [ 'git'
|
||||||
# return
|
, 'archive'
|
||||||
# if not project.getRepository ():
|
, '--prefix=%s/' % projectName
|
||||||
# print ErrorMessage( 0, "Project \"%s\" isn't associated to a repository."%project.getName() )
|
, '--output=%s' % rawArchive
|
||||||
# return
|
, 'devel'
|
||||||
#
|
]
|
||||||
# toolSvnTrunkDir = os.path.join ( self.svnMethod+project.getRepository(), tool, "trunk" )
|
self._execute ( command, "git archive of project %s" % projectName )
|
||||||
#
|
|
||||||
# if not os.path.isdir ( self.archiveDir ):
|
if not os.path.isdir ( self.archiveDir ):
|
||||||
# os.mkdir ( self.archiveDir )
|
os.mkdir ( self.archiveDir )
|
||||||
# os.chdir ( self.archiveDir )
|
|
||||||
#
|
os.chdir ( self.archiveDir )
|
||||||
# toolExportDir = os.path.join ( self.archiveDir, tool )
|
command = [ 'tar', 'xf', rawArchive ]
|
||||||
# if os.path.isdir ( toolExportDir ):
|
self._execute ( command, "unpacking raw archive %s" % rawArchive )
|
||||||
# print "Removing tool export (tarball) directory: \"%s\"." % toolExportDir
|
|
||||||
# command = [ "/bin/rm", "-r", toolExportDir ]
|
# Hard-coded export of Coloquinte.
|
||||||
# self._execute ( command, "Removing tool export (tarball) directory" )
|
coloquinteRawArchive = self.tarballDir+'/coloquinte.tar'
|
||||||
#
|
|
||||||
# print "Doing a SVN export of tool: ", tool
|
os.chdir ( self.sourceDir+'/importeds/Coloquinte')
|
||||||
# command = [ "svn", "export", toolSvnTrunkDir, toolExportDir ]
|
command = [ 'git'
|
||||||
# if self.gitHash != "x":
|
, 'archive'
|
||||||
# command += [ "--revision", self.gitHash ]
|
, '--prefix=%s/' % 'importeds/Coloquinte/'
|
||||||
# self._execute ( command, "svn export %s" % toolExportDir )
|
, '--output=%s' % coloquinteRawArchive
|
||||||
# print
|
, 'master'
|
||||||
# return
|
]
|
||||||
|
self._execute ( command, "git archive of project %s" % 'Coloquinte' )
|
||||||
|
|
||||||
|
os.chdir ( self.archiveDir )
|
||||||
|
command = [ 'tar', 'xf', coloquinteRawArchive ]
|
||||||
|
self._execute ( command, "unpacking raw archive %s" % coloquinteRawArchive )
|
||||||
|
|
||||||
|
absSourceTarBz2 = '%s/%s' % (self.tarballDir,self.sourceTarBz2)
|
||||||
|
os.chdir ( self.tarballDir )
|
||||||
|
command = [ 'tar', 'jcf', absSourceTarBz2, os.path.basename(self.archiveDir) ]
|
||||||
|
self._execute ( command, "Creating composite archive %s" % absSourceTarBz2 )
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
def _setEnvironment ( self, systemVariable, userVariable ):
|
def _setEnvironment ( self, systemVariable, userVariable ):
|
||||||
|
@ -421,24 +422,24 @@ class Builder:
|
||||||
#def svnExport ( self, tools, projects ):
|
#def svnExport ( self, tools, projects ):
|
||||||
# self._commandTemplate ( tools, projects, "_svnExport" )
|
# self._commandTemplate ( tools, projects, "_svnExport" )
|
||||||
# return
|
# return
|
||||||
#
|
|
||||||
#
|
|
||||||
#def svnTarball ( self, tools, projects ):
|
def gitTarball ( self, tools, projects ):
|
||||||
# if self.gitHash == "x":
|
if self.gitHash == "x":
|
||||||
# self._guessGitHash ( self.getProject(projects[0]) )
|
self._guessGitHash ( self.getProject(projects[0]) )
|
||||||
#
|
|
||||||
# self._doSpec ()
|
self._doSpec ()
|
||||||
# self._doDebChangelog ()
|
# self._doDebChangelog ()
|
||||||
#
|
|
||||||
# if os.path.isdir(self.tarballDir):
|
if os.path.isdir(self.tarballDir):
|
||||||
# print "Removing previous tarball directory: \"%s\"." % self.tarballDir
|
print "Removing previous tarball directory: \"%s\"." % self.tarballDir
|
||||||
# command = [ "/bin/rm", "-rf", self.tarballDir ]
|
command = [ "/bin/rm", "-rf", self.tarballDir ]
|
||||||
# self._execute ( command, "Removing top export (tarball) directory" )
|
self._execute ( command, "Removing top export (tarball) directory" )
|
||||||
#
|
|
||||||
# print "Creating tarball directory: \"%s\"." % self.tarballDir
|
print "Creating tarball directory: \"%s\"." % self.tarballDir
|
||||||
# os.makedirs ( self.tarballDir )
|
os.makedirs ( self.tarballDir )
|
||||||
# self.svnExport ( tools, projects )
|
self.gitExport ( projects[0] )
|
||||||
#
|
|
||||||
# # Remove unpublisheds (yet) tools/files.
|
# # Remove unpublisheds (yet) tools/files.
|
||||||
# for item in self.packageExcludes:
|
# for item in self.packageExcludes:
|
||||||
# command = [ "/bin/rm", "-rf", os.path.join(self.archiveDir,item) ]
|
# command = [ "/bin/rm", "-rf", os.path.join(self.archiveDir,item) ]
|
||||||
|
@ -471,8 +472,8 @@ class Builder:
|
||||||
# print "Cleanup SVN export tarball archive directory: \"%s\"." % self.archiveDir
|
# print "Cleanup SVN export tarball archive directory: \"%s\"." % self.archiveDir
|
||||||
# command = [ "/bin/rm", "-rf", self.archiveDir ]
|
# command = [ "/bin/rm", "-rf", self.archiveDir ]
|
||||||
# self._execute ( command, "Removing archive export (tarball) directory" )
|
# self._execute ( command, "Removing archive export (tarball) directory" )
|
||||||
#
|
|
||||||
# return
|
return
|
||||||
|
|
||||||
|
|
||||||
def userTarball ( self, tools, projects ):
|
def userTarball ( self, tools, projects ):
|
||||||
|
@ -501,7 +502,7 @@ class Builder:
|
||||||
|
|
||||||
|
|
||||||
def doRpm ( self ):
|
def doRpm ( self ):
|
||||||
self.svnTarball ( [], self.packageProjects )
|
self.gitTarball ( [], self.packageProjects )
|
||||||
|
|
||||||
for rpmDir in [ "SOURCES", "SPECS", "BUILD", "tmp"
|
for rpmDir in [ "SOURCES", "SPECS", "BUILD", "tmp"
|
||||||
, "SRPMS", "RPMS/i386", "RPMS/i686", "RPMS/x86_64" ]:
|
, "SRPMS", "RPMS/i386", "RPMS/i686", "RPMS/x86_64" ]:
|
||||||
|
@ -509,25 +510,25 @@ class Builder:
|
||||||
if not os.path.isdir(rpmFullDir):
|
if not os.path.isdir(rpmFullDir):
|
||||||
os.makedirs ( rpmFullDir )
|
os.makedirs ( rpmFullDir )
|
||||||
|
|
||||||
#rpmSpecFile = os.path.join ( self.rpmbuildDir, "SPECS" , "coriolis2.spec" )
|
rpmSpecFile = os.path.join ( self.rpmbuildDir, "SPECS" , "coriolis2.spec" )
|
||||||
rpmSourceFile = os.path.join ( self.rpmbuildDir, "SOURCES", self.sourceTarBz2 )
|
rpmSourceFile = os.path.join ( self.rpmbuildDir, "SOURCES", self.sourceTarBz2 )
|
||||||
sourceFile = os.path.join ( self.tarballDir, self.sourceTarBz2 )
|
sourceFile = os.path.join ( self.tarballDir , self.sourceTarBz2 )
|
||||||
|
|
||||||
#if os.path.isfile ( rpmSpecFile ):
|
if os.path.isfile ( rpmSpecFile ):
|
||||||
# os.unlink ( rpmSpecFile )
|
os.unlink ( rpmSpecFile )
|
||||||
#os.symlink ( self.specFile, rpmSpecFile )
|
os.symlink ( self.specFile, rpmSpecFile )
|
||||||
|
|
||||||
if not os.path.islink ( rpmSourceFile ):
|
if not os.path.islink ( rpmSourceFile ):
|
||||||
os.symlink ( sourceFile, rpmSourceFile )
|
os.symlink ( sourceFile, rpmSourceFile )
|
||||||
|
|
||||||
os.chdir ( self.rpmbuildDir )
|
os.chdir ( self.rpmbuildDir )
|
||||||
|
|
||||||
command = [ "/usr/bin/rpmbuild"
|
command = [ "/usr/bin/rpmbuild"
|
||||||
, "--define", "_topdir %s" % self.rpmbuildDir
|
, "--define", "_topdir %s" % self.rpmbuildDir
|
||||||
, "--define", "_tmppath %s" % self.tmppathDir
|
, "--define", "_tmppath %s" % self.tmppathDir
|
||||||
, "--define", "_enable_debug_packages 0"
|
, "--define", "_enable_debug_packages 0"
|
||||||
, "-ta", "--with", "binarytar", rpmSourceFile ]
|
, "-ba", "--with", "binarytar", rpmSpecFile ]
|
||||||
|
|
||||||
self._execute ( command, "Rebuild rpm packages" )
|
self._execute ( command, "Rebuild rpm packages" )
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
|
@ -28,16 +28,16 @@ from Project import Project
|
||||||
class Configuration ( object ):
|
class Configuration ( object ):
|
||||||
|
|
||||||
PrimaryNames = \
|
PrimaryNames = \
|
||||||
[ 'confFile', 'projects', 'standalones'
|
[ 'confFile' , 'projects', 'standalones'
|
||||||
, 'gitHash', 'gitMethod'
|
, 'gitHash' , 'gitMethod', 'revDate'
|
||||||
, 'projectDir', 'rootDir'
|
, 'projectDir' , 'rootDir'
|
||||||
, 'packageName', 'packageVersion', 'packageExcludes', 'packageProject'
|
, 'packageName', 'packageVersion', 'packageExcludes', 'packageProjects'
|
||||||
, 'osType', 'libSuffix', 'buildMode', 'libMode', 'enableShared'
|
, 'osType' , 'libSuffix', 'buildMode', 'libMode', 'enableShared'
|
||||||
]
|
]
|
||||||
SecondaryNames = \
|
SecondaryNames = \
|
||||||
[ 'rpmbuildDir' , 'debbuildDir' , 'tmppathDir' , 'tarballDir'
|
[ 'rpmbuildDir' , 'debbuildDir' , 'tmppathDir' , 'tarballDir'
|
||||||
, 'archiveDir' , 'sourceDir' , 'osDir' , 'buildDir'
|
, 'archiveDir' , 'sourceDir' , 'osDir' , 'buildDir'
|
||||||
, 'installDir' , 'bootstrapDir' , 'specFileIn' , 'specFile'
|
, 'installDir' , 'bootstrapDir' , 'specFileIn' , 'specFile'
|
||||||
, 'debianDir' , 'debChangelogIn', 'debChangelog', 'sourceTarBz2'
|
, 'debianDir' , 'debChangelogIn', 'debChangelog', 'sourceTarBz2'
|
||||||
, 'binaryTarBz2', 'distribPatch'
|
, 'binaryTarBz2', 'distribPatch'
|
||||||
]
|
]
|
||||||
|
@ -46,6 +46,7 @@ class Configuration ( object ):
|
||||||
self._confFile = None
|
self._confFile = None
|
||||||
self._projects = []
|
self._projects = []
|
||||||
self._standalones = []
|
self._standalones = []
|
||||||
|
self._revDate = datetime.date.today().strftime('%Y%m%d')
|
||||||
self._gitHash = "x"
|
self._gitHash = "x"
|
||||||
self._gitMethod = None
|
self._gitMethod = None
|
||||||
self._projectDir = 'coriolis-2.x'
|
self._projectDir = 'coriolis-2.x'
|
||||||
|
@ -97,9 +98,9 @@ class Configuration ( object ):
|
||||||
self._debbuildDir = os.path.join ( self._rootDir , "debbuild" )
|
self._debbuildDir = os.path.join ( self._rootDir , "debbuild" )
|
||||||
self._tmppathDir = os.path.join ( self._rpmbuildDir, "tmp" )
|
self._tmppathDir = os.path.join ( self._rpmbuildDir, "tmp" )
|
||||||
self._tarballDir = os.path.join ( self._rootDir , "tarball" )
|
self._tarballDir = os.path.join ( self._rootDir , "tarball" )
|
||||||
self._archiveDir = os.path.join ( self._tarballDir , "%s-%s.%s" % (self._packageName
|
self._archiveDir = os.path.join ( self._tarballDir , "%s-%s.git%s" % (self._packageName
|
||||||
,self._packageVersion
|
,self._packageVersion
|
||||||
,self._gitHash) )
|
,self._gitHash) )
|
||||||
self._sourceDir = os.path.join ( self._rootDir , "src" )
|
self._sourceDir = os.path.join ( self._rootDir , "src" )
|
||||||
self._bootstrapDir = os.path.join ( self._sourceDir , "coriolis/bootstrap" )
|
self._bootstrapDir = os.path.join ( self._sourceDir , "coriolis/bootstrap" )
|
||||||
self._osDir = os.path.join ( self._rootDir
|
self._osDir = os.path.join ( self._rootDir
|
||||||
|
@ -113,7 +114,7 @@ class Configuration ( object ):
|
||||||
self._debianDir = os.path.join ( self._bootstrapDir, "debian" )
|
self._debianDir = os.path.join ( self._bootstrapDir, "debian" )
|
||||||
self._debChangelogIn = os.path.join ( self._debianDir , "changelog.in" )
|
self._debChangelogIn = os.path.join ( self._debianDir , "changelog.in" )
|
||||||
self._debChangelog = os.path.join ( self._debianDir , "changelog" )
|
self._debChangelog = os.path.join ( self._debianDir , "changelog" )
|
||||||
self._sourceTarBz2 = "%s-%s.%s.tar.bz2" % (self._packageName,self._packageVersion,self._gitHash)
|
self._sourceTarBz2 = "%s-%s.git%s.tar.bz2" % (self._packageName,self._packageVersion,self._gitHash)
|
||||||
self._binaryTarBz2 = "%s-binary-%s.%s-1.slsoc6.tar.bz2" % (self._packageName,self._packageVersion,self._gitHash)
|
self._binaryTarBz2 = "%s-binary-%s.%s-1.slsoc6.tar.bz2" % (self._packageName,self._packageVersion,self._gitHash)
|
||||||
self._distribPatch = os.path.join ( self._sourceDir, "bootstrap", "%s-for-distribution.patch"%self._packageName )
|
self._distribPatch = os.path.join ( self._sourceDir, "bootstrap", "%s-for-distribution.patch"%self._packageName )
|
||||||
return
|
return
|
||||||
|
@ -223,8 +224,6 @@ class Configuration ( object ):
|
||||||
locations = [ os.path.abspath(os.path.dirname(sys.argv[0]))
|
locations = [ os.path.abspath(os.path.dirname(sys.argv[0]))
|
||||||
, os.environ['HOME']+'/coriolis-2.x/src/coriolis/bootstrap'
|
, os.environ['HOME']+'/coriolis-2.x/src/coriolis/bootstrap'
|
||||||
, os.environ['HOME']+'/coriolis/src/coriolis/bootstrap'
|
, os.environ['HOME']+'/coriolis/src/coriolis/bootstrap'
|
||||||
, os.environ['HOME']+'/chams-2.x/src/coriolis/bootstrap'
|
|
||||||
, os.environ['HOME']+'/chams/src/coriolis/bootstrap'
|
|
||||||
, '/users/outil/coriolis/coriolis-2.x/src/coriolis/bootstrap'
|
, '/users/outil/coriolis/coriolis-2.x/src/coriolis/bootstrap'
|
||||||
, self._rootDir+'/src/coriolis/bootstrap'
|
, self._rootDir+'/src/coriolis/bootstrap'
|
||||||
]
|
]
|
||||||
|
|
|
@ -0,0 +1,193 @@
|
||||||
|
|
||||||
|
%define coriolisVersion 2.1
|
||||||
|
%define coriolisTop %{_prefix}
|
||||||
|
%define githash 71e1c18
|
||||||
|
%define revdate 20150407
|
||||||
|
|
||||||
|
%define python_sitedir %{_lib}/%(python -c '
|
||||||
|
import os.path
|
||||||
|
import distutils.sysconfig
|
||||||
|
|
||||||
|
pathes = distutils.sysconfig.get_python_lib().split("/")
|
||||||
|
print os.path.join ( pathes[-2], pathes[-1] )
|
||||||
|
')
|
||||||
|
|
||||||
|
%if 0%{?rhel} > 5 || 0%{?fedora} > 10
|
||||||
|
%define qt4 qt
|
||||||
|
%else
|
||||||
|
%define qt4 qt4
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
Name: coriolis2
|
||||||
|
Summary: Coriolis 2 VLSI CAD System
|
||||||
|
Version: %{coriolisVersion}
|
||||||
|
Release: 1.%{revdate}.git%{githash}%{dist}
|
||||||
|
License: BSD/LGPL/GPL/FLUTE
|
||||||
|
Group: Applications/Engineering
|
||||||
|
Source: %{name}-%{version}.git%{githash}.tar.bz2
|
||||||
|
URL: http://www-asim.lip6.fr/
|
||||||
|
Packager: Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||||
|
Requires(post): ldconfig
|
||||||
|
Requires: boost >= 1.33.1
|
||||||
|
Requires: %{qt4} >= 4.5.0
|
||||||
|
BuildRequires: boost-devel >= 1.33.1
|
||||||
|
BuildRequires: %{qt4}-devel >= 4.5.0
|
||||||
|
BuildRoot: %{_tmppath}/root-%{name}
|
||||||
|
|
||||||
|
|
||||||
|
%description
|
||||||
|
Coriolis is the new CAD tool suite intended to replace the
|
||||||
|
physical backend flow of Alliance.
|
||||||
|
|
||||||
|
The Knik global router makes use of FLUTE, which is redistributed
|
||||||
|
under is own license. FLUTE is copyrighted by Dr. Chris C. N. Chu
|
||||||
|
from the Iowa State University <http://home.eng.iastate.edu/~cnchu>.
|
||||||
|
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Coriolis 2 VLSI CAD Sytem - Development
|
||||||
|
Group: Applications/Engineering
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Requires: %{qt4}-devel >= 4.5.0
|
||||||
|
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
Development files for the Coriolis 2 package.
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -n %{name}-%{version}.git%{githash}
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
if [ -d %{buildroot} ]; then rm -r %{buildroot}; fi
|
||||||
|
|
||||||
|
CORIOLIS_TOP=%{coriolisTop}; export CORIOLIS_TOP
|
||||||
|
IMPORTEDS_TOP=%{coriolisTop}; export IMPORTEDS_TOP
|
||||||
|
|
||||||
|
# Do build & install in one step, except for documentation.
|
||||||
|
cd coriolis
|
||||||
|
make -f bootstrap/Makefile.package \
|
||||||
|
DESTDIR=%{buildroot} \
|
||||||
|
BUILD_DESTDIR=%{_builddir}/%{buildsubdir}/install.dir \
|
||||||
|
%{_smp_mflags} build
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
IMPORTEDS_TOP=%{coriolisTop}; export IMPORTEDS_TOP
|
||||||
|
CORIOLIS_TOP=%{coriolisTop}; export CORIOLIS_TOP
|
||||||
|
|
||||||
|
# Install & build documentation, in -j1.
|
||||||
|
cd coriolis
|
||||||
|
make -f bootstrap/Makefile.package \
|
||||||
|
DESTDIR=%{buildroot} -f bootstrap/Makefile.package \
|
||||||
|
BUILD_DESTDIR=%{_builddir}/%{buildsubdir}/install.dir \
|
||||||
|
-j1 install
|
||||||
|
|
||||||
|
# Copy the license from the Debian package directory.
|
||||||
|
cp bootstrap/debian/copyright %{buildroot}%{_datadir}/doc/coriolis2/COPYRIGHT
|
||||||
|
|
||||||
|
#%__rm -rf %{buildroot}%{coriolisTop}/share/doc/coriolis2
|
||||||
|
|
||||||
|
# Removing undistributed binaries.
|
||||||
|
#%__rm -f %{buildroot}%{coriolisTop}/bin/{cx2y,kite-text}
|
||||||
|
|
||||||
|
|
||||||
|
%clean
|
||||||
|
if [ -d %{buildroot} ]; then rm -r %{buildroot}; fi
|
||||||
|
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc %{_datadir}/doc/coriolis2
|
||||||
|
%dir %{_sysconfdir}/coriolis2
|
||||||
|
%dir %{coriolisTop}/share/coriolis2/flute-3.1
|
||||||
|
%dir %{coriolisTop}/bin
|
||||||
|
%dir %{coriolisTop}/%{_lib}
|
||||||
|
%dir %{coriolisTop}/%{python_sitedir}
|
||||||
|
%dir %{coriolisTop}/%{python_sitedir}/crlcore
|
||||||
|
%dir %{coriolisTop}/%{python_sitedir}/crlcore/helpers
|
||||||
|
%dir %{coriolisTop}/%{python_sitedir}/cumulus
|
||||||
|
%dir %{coriolisTop}/%{python_sitedir}/stratus
|
||||||
|
%{coriolisTop}/bin/*
|
||||||
|
%{coriolisTop}/%{_lib}/*.so.*
|
||||||
|
%{coriolisTop}/%{python_sitedir}/*.so
|
||||||
|
%{coriolisTop}/%{python_sitedir}/cumulus/*.py*
|
||||||
|
%{coriolisTop}/%{python_sitedir}/stratus/*.py*
|
||||||
|
%{coriolisTop}/%{python_sitedir}/crlcore/*.py*
|
||||||
|
%{coriolisTop}/%{python_sitedir}/crlcore/helpers/*.py*
|
||||||
|
#%config(noreplace) %{_sysconfdir}/ld.so.conf.d/*
|
||||||
|
%config(noreplace) %{_sysconfdir}/coriolis2/*.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/coriolis2/*.xml
|
||||||
|
%config(noreplace) %{_sysconfdir}/coriolis2/*.sh
|
||||||
|
%config(noreplace) %{_sysconfdir}/coriolis2/*.py*
|
||||||
|
%config(noreplace) %{_sysconfdir}/coriolis2/stratus.vim
|
||||||
|
%config(noreplace) %{coriolisTop}/share/coriolis2/flute-3.1/*.dat
|
||||||
|
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%dir %{coriolisTop}/%{_lib}
|
||||||
|
%dir %{coriolisTop}/share/cmake/Modules
|
||||||
|
%dir %{coriolisTop}/include
|
||||||
|
%dir %{coriolisTop}/include/vlsisapd
|
||||||
|
%dir %{coriolisTop}/include/vlsisapd/agds
|
||||||
|
%dir %{coriolisTop}/include/vlsisapd/cif
|
||||||
|
%dir %{coriolisTop}/include/vlsisapd/spice
|
||||||
|
%dir %{coriolisTop}/include/vlsisapd/liberty
|
||||||
|
%dir %{coriolisTop}/include/vlsisapd/bookshelf
|
||||||
|
%dir %{coriolisTop}/include/vlsisapd/configuration
|
||||||
|
#%dir %{coriolisTop}/include/vlsisapd/dtr
|
||||||
|
#%dir %{coriolisTop}/include/vlsisapd/openChams
|
||||||
|
%dir %{coriolisTop}/include/coriolis2/hurricane
|
||||||
|
%dir %{coriolisTop}/include/coriolis2/hurricane/viewer
|
||||||
|
%dir %{coriolisTop}/include/coriolis2/hurricane/isobar
|
||||||
|
%dir %{coriolisTop}/include/coriolis2
|
||||||
|
%dir %{coriolisTop}/include/coriolis2/crlcore
|
||||||
|
%dir %{coriolisTop}/include/coriolis2/nimbus
|
||||||
|
%dir %{coriolisTop}/include/coriolis2/etesian
|
||||||
|
%dir %{coriolisTop}/include/coriolis2/metis
|
||||||
|
%dir %{coriolisTop}/include/coriolis2/mauka
|
||||||
|
%dir %{coriolisTop}/include/coriolis2/knik
|
||||||
|
%dir %{coriolisTop}/include/coriolis2/katabatic
|
||||||
|
%dir %{coriolisTop}/include/coriolis2/kite
|
||||||
|
%dir %{coriolisTop}/include/coriolis2/equinox
|
||||||
|
%dir %{coriolisTop}/include/coriolis2/solstice
|
||||||
|
%dir %{coriolisTop}/include/coriolis2/unicorn
|
||||||
|
%{coriolisTop}/%{_lib}/*.so
|
||||||
|
%{coriolisTop}/share/cmake/Modules/*.cmake
|
||||||
|
%{coriolisTop}/include/vlsisapd/agds/*.h
|
||||||
|
%{coriolisTop}/include/vlsisapd/cif/*.h
|
||||||
|
%{coriolisTop}/include/vlsisapd/spice/*.h
|
||||||
|
%{coriolisTop}/include/vlsisapd/liberty/*.h
|
||||||
|
%{coriolisTop}/include/vlsisapd/bookshelf/*.h
|
||||||
|
%{coriolisTop}/include/vlsisapd/configuration/*.h
|
||||||
|
#%{coriolisTop}/include/vlsisapd/dtr/*.h
|
||||||
|
#%{coriolisTop}/include/vlsisapd/openChams/*.h
|
||||||
|
%{coriolisTop}/include/coriolis2/hurricane/*.h
|
||||||
|
%{coriolisTop}/include/coriolis2/hurricane/viewer/*.h
|
||||||
|
%{coriolisTop}/include/coriolis2/hurricane/isobar/*.h
|
||||||
|
%{coriolisTop}/include/coriolis2/crlcore/*.h
|
||||||
|
%{coriolisTop}/include/coriolis2/nimbus/*.h
|
||||||
|
%{coriolisTop}/include/coriolis2/metis/*.h
|
||||||
|
%{coriolisTop}/include/coriolis2/mauka/*.h
|
||||||
|
%{coriolisTop}/include/coriolis2/knik/*.h
|
||||||
|
%{coriolisTop}/include/coriolis2/katabatic/*.h
|
||||||
|
%{coriolisTop}/include/coriolis2/kite/*.h
|
||||||
|
%{coriolisTop}/include/coriolis2/equinox/*.h
|
||||||
|
%{coriolisTop}/include/coriolis2/solstice/*.h
|
||||||
|
%{coriolisTop}/include/coriolis2/unicorn/*.h
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Feb 2 2011 Jean-Paul.Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||||
|
- Second release, all tools from Coriolis 1 have been ported.
|
||||||
|
(nimbus, mauka, metis, cumulus, stratus1)
|
||||||
|
|
||||||
|
* Sun May 16 2010 Jean-Paul.Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||||
|
- Initial packaging for svn release 1322 (alpha stage).
|
|
@ -1,10 +1,9 @@
|
||||||
|
|
||||||
%define coriolisVersion 1.0
|
%define coriolisVersion 2.1
|
||||||
%define coriolisTop %{_prefix}
|
%define coriolisTop %{_prefix}
|
||||||
%define svntag @svntag@
|
%define githash @githash@
|
||||||
|
%define revdate @revdate@
|
||||||
|
|
||||||
%define with_binarytar %{?_with_binarytar:1}%{!?_with_binarytar:0}
|
|
||||||
%define with_staticlink %{?_with_staticlink:1}%{!?_with_staticlink:0}
|
|
||||||
%define python_sitedir %{_lib}/%(python -c '
|
%define python_sitedir %{_lib}/%(python -c '
|
||||||
import os.path
|
import os.path
|
||||||
import distutils.sysconfig
|
import distutils.sysconfig
|
||||||
|
@ -22,11 +21,11 @@ print os.path.join ( pathes[-2], pathes[-1] )
|
||||||
|
|
||||||
Name: coriolis2
|
Name: coriolis2
|
||||||
Summary: Coriolis 2 VLSI CAD System
|
Summary: Coriolis 2 VLSI CAD System
|
||||||
Version: %{coriolisVersion}.%{svntag}
|
Version: %{coriolisVersion}
|
||||||
Release: 1%{dist}
|
Release: 1.%{revdate}.git%{githash}%{dist}
|
||||||
License: BSD/LGPL/GPL/FLUTE
|
License: BSD/LGPL/GPL/FLUTE
|
||||||
Group: Applications/Engineering
|
Group: Applications/Engineering
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source: %{name}-%{version}.git%{githash}.tar.bz2
|
||||||
URL: http://www-asim.lip6.fr/
|
URL: http://www-asim.lip6.fr/
|
||||||
Packager: Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
Packager: Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||||
Requires(post): ldconfig
|
Requires(post): ldconfig
|
||||||
|
@ -58,27 +57,33 @@ Development files for the Coriolis 2 package.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup
|
%setup -n %{name}-%{version}.git%{githash}
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
if [ -d %{buildroot} ]; then rm -r %{buildroot}; fi
|
if [ -d %{buildroot} ]; then rm -r %{buildroot}; fi
|
||||||
|
|
||||||
BOOTSTRAP_TOP=%{coriolisTop}; export BOOTSTRAP_TOP
|
CORIOLIS_TOP=%{coriolisTop}; export CORIOLIS_TOP
|
||||||
VLSISAPD_TOP=%{coriolisTop}; export VLSISAPD_TOP
|
IMPORTEDS_TOP=%{coriolisTop}; export IMPORTEDS_TOP
|
||||||
CORIOLIS_TOP=%{coriolisTop}; export CORIOLIS_TOP
|
|
||||||
|
|
||||||
# Do build & install in one step, except for documentation.
|
# Do build & install in one step, except for documentation.
|
||||||
make DESTDIR=%{buildroot} BUILD_DESTDIR=%{_builddir}/%{buildsubdir}/install.dir %{_smp_mflags} build
|
cd coriolis
|
||||||
|
make -f bootstrap/Makefile.package \
|
||||||
|
DESTDIR=%{buildroot} \
|
||||||
|
BUILD_DESTDIR=%{_builddir}/%{buildsubdir}/install.dir \
|
||||||
|
%{_smp_mflags} build
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
BOOTSTRAP_TOP=%{coriolisTop}; export BOOTSTRAP_TOP
|
IMPORTEDS_TOP=%{coriolisTop}; export IMPORTEDS_TOP
|
||||||
VLSISAPD_TOP=%{coriolisTop}; export VLSISAPD_TOP
|
CORIOLIS_TOP=%{coriolisTop}; export CORIOLIS_TOP
|
||||||
CORIOLIS_TOP=%{coriolisTop}; export CORIOLIS_TOP
|
|
||||||
|
|
||||||
# Install & build documentation, in -j1.
|
# Install & build documentation, in -j1.
|
||||||
make DESTDIR=%{buildroot} BUILD_DESTDIR=%{_builddir}/%{buildsubdir}/install.dir -j1 install
|
cd coriolis
|
||||||
|
make -f bootstrap/Makefile.package \
|
||||||
|
DESTDIR=%{buildroot} -f bootstrap/Makefile.package \
|
||||||
|
BUILD_DESTDIR=%{_builddir}/%{buildsubdir}/install.dir \
|
||||||
|
-j1 install
|
||||||
|
|
||||||
# Copy the license from the Debian package directory.
|
# Copy the license from the Debian package directory.
|
||||||
cp bootstrap/debian/copyright %{buildroot}%{_datadir}/doc/coriolis2/COPYRIGHT
|
cp bootstrap/debian/copyright %{buildroot}%{_datadir}/doc/coriolis2/COPYRIGHT
|
||||||
|
@ -88,20 +93,6 @@ Development files for the Coriolis 2 package.
|
||||||
# Removing undistributed binaries.
|
# Removing undistributed binaries.
|
||||||
#%__rm -f %{buildroot}%{coriolisTop}/bin/{cx2y,kite-text}
|
#%__rm -f %{buildroot}%{coriolisTop}/bin/{cx2y,kite-text}
|
||||||
|
|
||||||
# %{__mkdir} -p %{buildroot}%{_sysconfdir}/ld.so.conf.d/
|
|
||||||
# cat > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf << EOF
|
|
||||||
# Coriolis 2 VLSI design system
|
|
||||||
#%{coriolisTop}/%{_lib}
|
|
||||||
#%{coriolisTop}/%{_lib}/python
|
|
||||||
#EOF
|
|
||||||
|
|
||||||
#%if %{with_binarytar}
|
|
||||||
# cd %{buildroot}%{coriolisTop}
|
|
||||||
# tar --exclude "*/cmake_modules*" \
|
|
||||||
# -jcf %{_sourcedir}/%{name}-binary-%{version}-%{release}.%{_arch}.tar.bz2 \
|
|
||||||
# bin %{_lib} share
|
|
||||||
#%endif
|
|
||||||
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
if [ -d %{buildroot} ]; then rm -r %{buildroot}; fi
|
if [ -d %{buildroot} ]; then rm -r %{buildroot}; fi
|
||||||
|
@ -124,11 +115,7 @@ Development files for the Coriolis 2 package.
|
||||||
%dir %{coriolisTop}/%{python_sitedir}/cumulus
|
%dir %{coriolisTop}/%{python_sitedir}/cumulus
|
||||||
%dir %{coriolisTop}/%{python_sitedir}/stratus
|
%dir %{coriolisTop}/%{python_sitedir}/stratus
|
||||||
%{coriolisTop}/bin/*
|
%{coriolisTop}/bin/*
|
||||||
%if %{with_staticlink}
|
|
||||||
%{coriolisTop}/%{_lib}/*.a
|
|
||||||
%else
|
|
||||||
%{coriolisTop}/%{_lib}/*.so.*
|
%{coriolisTop}/%{_lib}/*.so.*
|
||||||
%endif
|
|
||||||
%{coriolisTop}/%{python_sitedir}/*.so
|
%{coriolisTop}/%{python_sitedir}/*.so
|
||||||
%{coriolisTop}/%{python_sitedir}/cumulus/*.py*
|
%{coriolisTop}/%{python_sitedir}/cumulus/*.py*
|
||||||
%{coriolisTop}/%{python_sitedir}/stratus/*.py*
|
%{coriolisTop}/%{python_sitedir}/stratus/*.py*
|
||||||
|
|
|
@ -7,3 +7,4 @@
|
||||||
install ( DIRECTORY scmos_deep_018 DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
install ( DIRECTORY scmos_deep_018 DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||||
install ( DIRECTORY scn6m_deep_09 DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
install ( DIRECTORY scn6m_deep_09 DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||||
install ( DIRECTORY hcmos9gp DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
install ( DIRECTORY hcmos9gp DESTINATION ${SYS_CONF_DIR}/coriolis2 )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue