diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/RPMTools.py | 47 | ||||
-rwxr-xr-x | cpp/newmakebindist.py | 21 |
2 files changed, 50 insertions, 18 deletions
diff --git a/cpp/RPMTools.py b/cpp/RPMTools.py index dbd36d8edb1..2e585ddea4a 100644 --- a/cpp/RPMTools.py +++ b/cpp/RPMTools.py @@ -99,10 +99,26 @@ class Package: ofile.write("\n") + def writePostInstall(self, ofile, version, intVersion): + for perm, f in self.filelist: + if perm == "dll": + ofile.write("cd /usr ; gacutil -i " + f + " ; cd - \n") + + def writePostUninstall(self, ofile, version, intVersion): + for perm, f in self.filelist: + if perm == "dll": + ofile.write("\n") + def writeFiles(self, ofile, version, intVersion): ofile.write("%files\n") self.writeFileList(ofile, version, intVersion) + ofile.write("%post\n") + self.writePostInstall(ofile, version, intVersion) + + ofile.write("%postun\n") + self.writePostUninstall(ofile, version, intVersion) + def addPrepGenerator(self, gen): if self.prepTextGen == None: self.prepTextGen = [] @@ -139,6 +155,12 @@ class Subpackage(Package): ofile.write("%files " + self.name + "\n") self.writeFileList(ofile, version, intVersion) + ofile.write("%post " + self.name + "\n") + self.writePostInstall(ofile, version, intVersion) + + ofile.write("%postun " + self.name + "\n") + self.writePostUninstall(ofile, version, intVersion) + # # NOTE: File transforms should be listed before directory transforms. # @@ -147,6 +169,8 @@ transforms = [ ("file", "lib/Ice.jar", "lib/Ice-%version%/Ice.jar" ), ("dir", "ant", "lib/Ice-%version%/ant"), ("dir", "python", "lib/Ice-%version%/python"), ("dir", "doc", "share/doc/Ice-%version%"), + ("file", "README", "share/doc/Ice-%version%/README"), + ("file", "SOURCES", "share/doc/Ice-%version%/SOURCES"), ("file", "ICE_LICENSE", "share/doc/Ice-%version%/ICE_LICENSE"), ("file", "LICENSE", "share/doc/Ice-%version%/LICENSE") ] @@ -164,6 +188,8 @@ fileLists = [ "", [("doc", "share/doc/Ice-%version%/ICE_LICENSE"), ("doc", "share/doc/Ice-%version%/LICENSE"), + ("doc", "share/doc/Ice-%version%/README"), + ("doc", "share/doc/Ice-%version%/SOURCES"), ("exe", "bin/dumpdb"), ("exe", "bin/transformdb"), ("exe", "bin/glacier2router"), @@ -192,7 +218,7 @@ fileLists = [ ("lib", "lib/libSlice.so.VERSION"), ("dir", "share/slice"), ("dir", "share/doc/Ice-%version%/images"), - ("dir", "share/doc/Ice-%version%/manual"), + ("dir", "share/doc/Ice-%version%/reference"), ("xdir", "share/doc/Ice-%version%/config"), ("xdir", "share/doc/Ice-%version%/certs"), ("file", "share/doc/Ice-%version%/README.DEMOS")]), @@ -220,13 +246,8 @@ fileLists = [ ("dir", "share/doc/Ice-%version%/demo"), ("file", "share/doc/Ice-%version%/config/Make.rules"), ("file", "share/doc/Ice-%version%/config/makedepend.py"), - ("file", "share/doc/Ice-%version%/config/makecerts"), ("file", "share/doc/Ice-%version%/config/makeprops.py"), ("file", "share/doc/Ice-%version%/config/Make.rules.Linux"), - ("file", "share/doc/Ice-%version%/config/server.cnf"), - ("file", "share/doc/Ice-%version%/config/client.cnf"), - ("file", "share/doc/Ice-%version%/config/generic.cnf"), - ("file", "share/doc/Ice-%version%/config/ice_ca.cnf"), ("file", "share/doc/Ice-%version%/certs/cacert.pem"), ("file", "share/doc/Ice-%version%/certs/c_dh1024.pem"), ("file", "share/doc/Ice-%version%/certs/client_sslconfig.xml"), @@ -245,10 +266,13 @@ fileLists = [ "Development/Libraries Development/Tools", "", "", - [("lib", "lib/glacier2cs.dll"), ("lib", "lib/icecs.dll"), ("lib", "lib/icepackcs.dll"), - ("lib", "lib/icepatch2cs.dll"), ("lib", "lib/icestormcs.dll")]), + [("dll", "bin/glacier2cs.dll"), + ("dll", "bin/icecs.dll"), + ("dll", "bin/icepackcs.dll"), + ("dll", "bin/icepatch2cs.dll"), + ("dll", "bin/icestormcs.dll")]), Subpackage("csharp-devel", - "ice-csharp = %version%, mono-devel >= 1.0.6, mono-devel < 1.1", + "ice-dotnet = %version%, mono-devel >= 1.0.6, mono-devel < 1.1", "Ice tools for developing Ice applications in C\#", "Development/Libraries Development/Tools", "", @@ -268,9 +292,6 @@ fileLists = [ ("file", "share/doc/Ice-%version%/certs/certs.jks"), ("file", "share/doc/Ice-%version%/certs/client.jks"), ("file", "share/doc/Ice-%version%/certs/server.jks"), - ("file", "share/doc/Ice-%version%/certs/makecerts"), - ("dir", "share/doc/Ice-%version%/certs/openssl"), - ("dir", "share/doc/Ice-%version%/certs/cpp"), ("file", "share/doc/Ice-%version%/config/build.properties"), ("file", "share/doc/Ice-%version%/config/common.xml"), ("dir", "share/doc/Ice-%version%/demoj")]), @@ -483,7 +504,7 @@ gmake ICE_HOME=$RPM_BUILD_DIR/Ice-%{version} RPM_BUILD_ROOT=$RPM_BUILD_ROOT/usr cd $RPM_BUILD_DIR/IceCS-%{version} export PATH=$RPM_BUILD_DIR/Ice-%{version}/bin:$PATH export LD_LIBRARY_PATH=$RPM_BUILD_DIR/Ice-%{version}/lib:$LD_LIBRARY_PATH -gmake ICE_HOME=$RPM_BUILD_DIR/Ice-%{version} RPM_BUILD_ROOT=$RPM_BUILD_ROOT/usr install +gmake NOGAC=yes ICE_HOME=$RPM_BUILD_DIR/Ice-%{version} RPM_BUILD_ROOT=$RPM_BUILD_ROOT/usr install """) def writeTransformCommands(ofile, version): diff --git a/cpp/newmakebindist.py b/cpp/newmakebindist.py index e494cbbfebc..8f13d220e4f 100755 --- a/cpp/newmakebindist.py +++ b/cpp/newmakebindist.py @@ -104,8 +104,8 @@ def extractDemos(sources, buildDir, version, distro, demoDir): os.system("gzip -dc " + sources + "/" + distro + ".tar.gz | tar xf - " + distro + "/demo " + distro + "/config " \ + distro + "/certs") if demoDir == "": - os.system("gzip -dc " + sources + "/" + distro + ".tar.gz | tar xf - " + distro + "/install/rpm/README.DEMOS") - shutil.move(distro + "/install/rpm/README.DEMOS", buildDir + "/Ice-" + version + "-demos/README.DEMOS") + os.system("gzip -dc " + sources + "/" + distro + ".tar.gz | tar xf - " + distro + "/install/unix/README.DEMOS") + shutil.move(distro + "/install/unix/README.DEMOS", buildDir + "/Ice-" + version + "-demos/README.DEMOS") shutil.move(distro + "/demo", buildDir + "/Ice-" + version + "-demos/demo" + demoDir) @@ -121,6 +121,16 @@ def extractDemos(sources, buildDir, version, distro, demoDir): os.system("cp -pR " + distro + "/certs/* " + buildDir + "/Ice-" + version + "-demos/certs") + # + # Clean up some unwanted files. + # + if os.path.exists(buildDir + "/Ice-" + version + "-demos/certs/openssl"): + os.system("rm -rf " + buildDir + "/Ice-" + version + "-demos/certs/openssl") + if os.path.exists(buildDir + "/Ice-" + version + "-demos/certs/makecerts"): + os.system("rm " + buildDir + "/Ice-" + version + "-demos/certs/makecerts") + if os.path.exists(buildDir + "/Ice-" + version + "-demos/config/makecerts"): + os.system("rm " + buildDir + "/Ice-" + version + "-demos/config/makecerts") + # # C++ specific build modifications. # @@ -280,7 +290,7 @@ def makeInstall(sources, buildDir, installDir, distro, clean): os.system("perl -pi -e 's/^PYTHON.INCLUDE.DIR.*$/PYTHON_INCLUDE_DIR = \$\(PYTHON_HOME\)\/include\/\$\(PYTHON_VERSION\)/' config/Make.rules") os.system("perl -pi -e 's/^PYTHON.LIB.DIR.*$/PYTHON_LIB_DIR = \$\(PYTHON_HOME\)\/lib\/\$\(PYTHON_VERSION\)\/config/' config/Make.rules") - os.system("gmake OPTIMIZE=yes INSTALL_ROOT=" + installDir + " install") + os.system("gmake NOGAC=yes OPTIMIZE=yes INSTALL_ROOT=" + installDir + " install") os.chdir(cwd) def shlibExtensions(versionString, versionInt): @@ -298,8 +308,9 @@ def strip(files): if getPlatform() == "macosx": stripCmd = stripCmd + "-x " for f in files: - print "Stripping " + f - os.system(stripCmd + f) + if not f.endswith(".dll"): + print "Stripping " + f + os.system(stripCmd + f) def usage(): """Print usage/help information""" |