From: Alexis Christoforides Date: Mon, 13 Feb 2017 08:55:16 +0000 (-0500) Subject: [MacSDK] Use full Mono version, incl. build number in build X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=eedeb428d604e37fbe2934c2299be6166e903049 [MacSDK] Use full Mono version, incl. build number in build Also add a VERSION file in the package. --- diff --git a/packaging/MacSDK/mono.py b/packaging/MacSDK/mono.py index 63bf814d923..ed9de817484 100644 --- a/packaging/MacSDK/mono.py +++ b/packaging/MacSDK/mono.py @@ -46,11 +46,16 @@ class MonoMasterPackage(Package): self.configure = './autogen.sh --prefix="%{package_prefix}"' self.extra_stage_files = ['etc/mono/config'] + self.custom_version_str = None def build(self): self.make = '%s EXTERNAL_MCS=%s EXTERNAL_RUNTIME=%s' % ( self.make, self.profile.env.system_mcs, self.profile.env.system_mono) - Package.build(self) + Package.configure(self) + + if self.custom_version_str is not None: + replace_in_file(os.path.join (self.workspace, 'config.h'), {self.version : self.custom_version_str}) + Package.make(self) def prep(self): Package.prep(self) diff --git a/packaging/MacSDK/profile.py b/packaging/MacSDK/profile.py index 119678f9e75..270b70d0254 100755 --- a/packaging/MacSDK/profile.py +++ b/packaging/MacSDK/profile.py @@ -119,6 +119,8 @@ class MonoReleaseProfile(DarwinProfile): error('Prefix %s exists, and may interfere with the staged build. Please remove and try again.' % self.prefix) self.calculate_updateid() + + self.mono_package.custom_version_str = self.FULL_VERSION trace(self.package_info('MDK')) self.dont_optimize = ['pixman'] @@ -281,6 +283,10 @@ class MonoReleaseProfile(DarwinProfile): working_dir, "PKGROOT", self.prefix[1:], "updateinfo") with open(updateinfo, "w") as updateinfo: updateinfo.write(guid + ' ' + self.updateid + "\n") + version_file = os.path.join( + working_dir, "PKGROOT", self.prefix[1:], "VERSION") + with open(version_file, "w") as version_file: + version_file.write(self.FULL_VERSION + "\n") def package_info(self, pkg_type): arch = self.bockbuild.cmd_options.arch