Adapt the rpm automated build system of bootstrap (pass 1)

This commit is contained in:
Jean-Paul Chaput 2015-04-08 00:13:27 +02:00
parent 71e1c188ea
commit 9e672ffaa8
7 changed files with 324 additions and 134 deletions

View File

@ -2,15 +2,15 @@
# -*- 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
prefix = /usr
DESTDIR =
BUILD_DESTDIR = $(shell pwd)/install.dir
BOOTSTRAP_TOP = $(prefix)
IMPORTEDS_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
.PHONY: build install FORCE
@ -31,6 +31,17 @@ build: FORCE
"x86_64") cmakeArgs="-D LIB_SUFFIX:STRING=64";; \
*) cmakeArgs="";; \
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 \
echo "** Building tool $${tool}"; \
mkdir -p build.dir/$$tool; \

View File

@ -48,7 +48,7 @@ projects = [ { 'name' : "importeds"
]
package = { 'name' : 'coriolis2'
, 'version' : '1.0'
, 'version' : '2.1'
, 'excludes': [ 'vlsisapd/src/openChams'
, 'vlsisapd/doc/openChams'
, 'vlsisapd/examples/openChams'
@ -69,8 +69,6 @@ package = { 'name' : 'coriolis2'
, 'unicorn/doc/html'
, 'unicorn/doc/latex'
]
, 'projects': [ 'bootstrap'
, 'vlsisapd'
, 'coriolis'
, 'projects': [ 'coriolis'
]
}

View File

@ -82,24 +82,12 @@ class Builder:
return self.__dict__[attribute]
#def _guessGitHash ( self, project ):
# revisionPattern = re.compile ( r"^Revision:\s*(?P<revision>\d+)" )
# projectSvnDir = os.path.join ( self.svnMethod+project.getRepository() )
#
# os.chdir( )
# command = [ 'git', 'log', '--pretty="%h"', '-n', '1']
# 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 _guessGitHash ( self, project ):
self.gitHash = 'x'
os.chdir ( self.sourceDir+'/'+project.getName() )
command = [ 'git', 'log', '--pretty=format:%h', '-n', '1']
self.gitHash = subprocess.Popen ( command, stdout=subprocess.PIPE ).stdout.readlines()[0]
return
def _configure ( self, fileIn, file ):
@ -111,8 +99,9 @@ class Builder:
substituted0 = line
while not stable:
substituted1 = re.sub ( r"@svntag@" , self.gitHash, substituted0 )
substituted1 = re.sub ( r"@coriolisTop@", "/opt/coriolis2" , substituted1 )
substituted1 = re.sub ( r"@revdate@" , self.revDate, substituted0 )
substituted1 = re.sub ( r"@githash@" , self.gitHash, substituted1 )
substituted1 = re.sub ( r"@coriolisTop@", "/usr" , substituted1 )
if substituted0 == substituted1: stable = True
else: substituted0 = substituted1
@ -291,37 +280,49 @@ class Builder:
# self._execute ( command, "svn checkout %s" % tool )
# print
# return
#
#
#def _svnExport ( self, tool ):
# project = self._conf.getToolProject ( tool )
# if not project:
# print ErrorMessage( 0, "Tool \"%s\" is not part of any project."%tool
# , "Cannot guess the SVN repository.")
# return
# if not project.getRepository ():
# print ErrorMessage( 0, "Project \"%s\" isn't associated to a repository."%project.getName() )
# return
#
# toolSvnTrunkDir = os.path.join ( self.svnMethod+project.getRepository(), tool, "trunk" )
#
# if not os.path.isdir ( self.archiveDir ):
# os.mkdir ( self.archiveDir )
# os.chdir ( self.archiveDir )
#
# toolExportDir = os.path.join ( self.archiveDir, tool )
# if os.path.isdir ( toolExportDir ):
# print "Removing tool export (tarball) directory: \"%s\"." % toolExportDir
# command = [ "/bin/rm", "-r", toolExportDir ]
# self._execute ( command, "Removing tool export (tarball) directory" )
#
# print "Doing a SVN export of tool: ", tool
# command = [ "svn", "export", toolSvnTrunkDir, toolExportDir ]
# if self.gitHash != "x":
# command += [ "--revision", self.gitHash ]
# self._execute ( command, "svn export %s" % toolExportDir )
# print
# return
def gitExport ( self, projectName ):
rawArchive = self.tarballDir+'/'+projectName+'.tar'
os.chdir ( self.sourceDir+'/'+projectName )
command = [ 'git'
, 'archive'
, '--prefix=%s/' % projectName
, '--output=%s' % rawArchive
, 'devel'
]
self._execute ( command, "git archive of project %s" % projectName )
if not os.path.isdir ( self.archiveDir ):
os.mkdir ( self.archiveDir )
os.chdir ( self.archiveDir )
command = [ 'tar', 'xf', rawArchive ]
self._execute ( command, "unpacking raw archive %s" % rawArchive )
# Hard-coded export of Coloquinte.
coloquinteRawArchive = self.tarballDir+'/coloquinte.tar'
os.chdir ( self.sourceDir+'/importeds/Coloquinte')
command = [ 'git'
, 'archive'
, '--prefix=%s/' % 'importeds/Coloquinte/'
, '--output=%s' % coloquinteRawArchive
, 'master'
]
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 ):
@ -421,24 +422,24 @@ class Builder:
#def svnExport ( self, tools, projects ):
# self._commandTemplate ( tools, projects, "_svnExport" )
# return
#
#
#def svnTarball ( self, tools, projects ):
# if self.gitHash == "x":
# self._guessGitHash ( self.getProject(projects[0]) )
#
# self._doSpec ()
def gitTarball ( self, tools, projects ):
if self.gitHash == "x":
self._guessGitHash ( self.getProject(projects[0]) )
self._doSpec ()
# self._doDebChangelog ()
#
# if os.path.isdir(self.tarballDir):
# print "Removing previous tarball directory: \"%s\"." % self.tarballDir
# command = [ "/bin/rm", "-rf", self.tarballDir ]
# self._execute ( command, "Removing top export (tarball) directory" )
#
# print "Creating tarball directory: \"%s\"." % self.tarballDir
# os.makedirs ( self.tarballDir )
# self.svnExport ( tools, projects )
#
if os.path.isdir(self.tarballDir):
print "Removing previous tarball directory: \"%s\"." % self.tarballDir
command = [ "/bin/rm", "-rf", self.tarballDir ]
self._execute ( command, "Removing top export (tarball) directory" )
print "Creating tarball directory: \"%s\"." % self.tarballDir
os.makedirs ( self.tarballDir )
self.gitExport ( projects[0] )
# # Remove unpublisheds (yet) tools/files.
# for item in self.packageExcludes:
# 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
# command = [ "/bin/rm", "-rf", self.archiveDir ]
# self._execute ( command, "Removing archive export (tarball) directory" )
#
# return
return
def userTarball ( self, tools, projects ):
@ -501,7 +502,7 @@ class Builder:
def doRpm ( self ):
self.svnTarball ( [], self.packageProjects )
self.gitTarball ( [], self.packageProjects )
for rpmDir in [ "SOURCES", "SPECS", "BUILD", "tmp"
, "SRPMS", "RPMS/i386", "RPMS/i686", "RPMS/x86_64" ]:
@ -509,25 +510,25 @@ class Builder:
if not os.path.isdir(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 )
sourceFile = os.path.join ( self.tarballDir, self.sourceTarBz2 )
#if os.path.isfile ( rpmSpecFile ):
# os.unlink ( rpmSpecFile )
#os.symlink ( self.specFile, rpmSpecFile )
sourceFile = os.path.join ( self.tarballDir , self.sourceTarBz2 )
if os.path.isfile ( rpmSpecFile ):
os.unlink ( rpmSpecFile )
os.symlink ( self.specFile, rpmSpecFile )
if not os.path.islink ( rpmSourceFile ):
os.symlink ( sourceFile, rpmSourceFile )
os.chdir ( self.rpmbuildDir )
command = [ "/usr/bin/rpmbuild"
, "--define", "_topdir %s" % self.rpmbuildDir
, "--define", "_tmppath %s" % self.tmppathDir
, "--define", "_enable_debug_packages 0"
, "-ta", "--with", "binarytar", rpmSourceFile ]
, "-ba", "--with", "binarytar", rpmSpecFile ]
self._execute ( command, "Rebuild rpm packages" )
return

View File

@ -28,16 +28,16 @@ from Project import Project
class Configuration ( object ):
PrimaryNames = \
[ 'confFile', 'projects', 'standalones'
, 'gitHash', 'gitMethod'
, 'projectDir', 'rootDir'
, 'packageName', 'packageVersion', 'packageExcludes', 'packageProject'
, 'osType', 'libSuffix', 'buildMode', 'libMode', 'enableShared'
[ 'confFile' , 'projects', 'standalones'
, 'gitHash' , 'gitMethod', 'revDate'
, 'projectDir' , 'rootDir'
, 'packageName', 'packageVersion', 'packageExcludes', 'packageProjects'
, 'osType' , 'libSuffix', 'buildMode', 'libMode', 'enableShared'
]
SecondaryNames = \
[ 'rpmbuildDir' , 'debbuildDir' , 'tmppathDir' , 'tarballDir'
, 'archiveDir' , 'sourceDir' , 'osDir' , 'buildDir'
, 'installDir' , 'bootstrapDir' , 'specFileIn' , 'specFile'
, 'installDir' , 'bootstrapDir' , 'specFileIn' , 'specFile'
, 'debianDir' , 'debChangelogIn', 'debChangelog', 'sourceTarBz2'
, 'binaryTarBz2', 'distribPatch'
]
@ -46,6 +46,7 @@ class Configuration ( object ):
self._confFile = None
self._projects = []
self._standalones = []
self._revDate = datetime.date.today().strftime('%Y%m%d')
self._gitHash = "x"
self._gitMethod = None
self._projectDir = 'coriolis-2.x'
@ -97,9 +98,9 @@ class Configuration ( object ):
self._debbuildDir = os.path.join ( self._rootDir , "debbuild" )
self._tmppathDir = os.path.join ( self._rpmbuildDir, "tmp" )
self._tarballDir = os.path.join ( self._rootDir , "tarball" )
self._archiveDir = os.path.join ( self._tarballDir , "%s-%s.%s" % (self._packageName
,self._packageVersion
,self._gitHash) )
self._archiveDir = os.path.join ( self._tarballDir , "%s-%s.git%s" % (self._packageName
,self._packageVersion
,self._gitHash) )
self._sourceDir = os.path.join ( self._rootDir , "src" )
self._bootstrapDir = os.path.join ( self._sourceDir , "coriolis/bootstrap" )
self._osDir = os.path.join ( self._rootDir
@ -113,7 +114,7 @@ class Configuration ( object ):
self._debianDir = os.path.join ( self._bootstrapDir, "debian" )
self._debChangelogIn = os.path.join ( self._debianDir , "changelog.in" )
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._distribPatch = os.path.join ( self._sourceDir, "bootstrap", "%s-for-distribution.patch"%self._packageName )
return
@ -223,8 +224,6 @@ class Configuration ( object ):
locations = [ os.path.abspath(os.path.dirname(sys.argv[0]))
, os.environ['HOME']+'/coriolis-2.x/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'
, self._rootDir+'/src/coriolis/bootstrap'
]

193
bootstrap/coriolis2.spec Normal file
View File

@ -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).

View File

@ -1,10 +1,9 @@
%define coriolisVersion 1.0
%define coriolisVersion 2.1
%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 '
import os.path
import distutils.sysconfig
@ -22,11 +21,11 @@ print os.path.join ( pathes[-2], pathes[-1] )
Name: coriolis2
Summary: Coriolis 2 VLSI CAD System
Version: %{coriolisVersion}.%{svntag}
Release: 1%{dist}
Version: %{coriolisVersion}
Release: 1.%{revdate}.git%{githash}%{dist}
License: BSD/LGPL/GPL/FLUTE
Group: Applications/Engineering
Source: %{name}-%{version}.tar.bz2
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
@ -58,27 +57,33 @@ Development files for the Coriolis 2 package.
%prep
%setup
%setup -n %{name}-%{version}.git%{githash}
%build
if [ -d %{buildroot} ]; then rm -r %{buildroot}; fi
BOOTSTRAP_TOP=%{coriolisTop}; export BOOTSTRAP_TOP
VLSISAPD_TOP=%{coriolisTop}; export VLSISAPD_TOP
CORIOLIS_TOP=%{coriolisTop}; export CORIOLIS_TOP
CORIOLIS_TOP=%{coriolisTop}; export CORIOLIS_TOP
IMPORTEDS_TOP=%{coriolisTop}; export IMPORTEDS_TOP
# 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
BOOTSTRAP_TOP=%{coriolisTop}; export BOOTSTRAP_TOP
VLSISAPD_TOP=%{coriolisTop}; export VLSISAPD_TOP
CORIOLIS_TOP=%{coriolisTop}; export CORIOLIS_TOP
IMPORTEDS_TOP=%{coriolisTop}; export IMPORTEDS_TOP
CORIOLIS_TOP=%{coriolisTop}; export CORIOLIS_TOP
# 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.
cp bootstrap/debian/copyright %{buildroot}%{_datadir}/doc/coriolis2/COPYRIGHT
@ -88,20 +93,6 @@ Development files for the Coriolis 2 package.
# Removing undistributed binaries.
#%__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
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}/stratus
%{coriolisTop}/bin/*
%if %{with_staticlink}
%{coriolisTop}/%{_lib}/*.a
%else
%{coriolisTop}/%{_lib}/*.so.*
%endif
%{coriolisTop}/%{python_sitedir}/*.so
%{coriolisTop}/%{python_sitedir}/cumulus/*.py*
%{coriolisTop}/%{python_sitedir}/stratus/*.py*

View File

@ -7,3 +7,4 @@
install ( DIRECTORY scmos_deep_018 DESTINATION ${SYS_CONF_DIR}/coriolis2 )
install ( DIRECTORY scn6m_deep_09 DESTINATION ${SYS_CONF_DIR}/coriolis2 )
install ( DIRECTORY hcmos9gp DESTINATION ${SYS_CONF_DIR}/coriolis2 )