Add glib to the list of packages with debugging symbols.
[mono.git] / packaging / MacSDK / profile.py
index 53df4f1fa80ccc87ae66b8d0e12de6fcfece54ee..3ad4c05c8008d4f72cccf410e22233ea2e7dd7a0 100755 (executable)
@@ -100,13 +100,15 @@ class MonoReleaseProfile(DarwinProfile):
         self.env.set('PANGO_SYSCONFDIR', '%{staged_prefix}/etc')
         self.env.set('PANGO_LIBDIR', '%{staged_prefix}/lib')
         # self.env.set ('MONO_PATH', '%{staged_prefix}/lib/mono/4.0')
-        self.debug_info = ['gtk+', 'cairo',
+        self.debug_info = ['gtk+', 'cairo', 'glib',
                            'pango', 'mono', 'llvm', 'libgdiplus']
         self.cache_host = None
 
     def setup_release(self):
         self.mono_package = self.release_packages['mono']
-        self.mono_package.fetch()
+        dest = os.path.join(self.bockbuild.build_root, self.mono_package.source_dir_name)
+        self.mono_package.fetch(dest)
+
 
         verbose('Mono version: %s' % self.mono_package.version)
         self.RELEASE_VERSION = self.mono_package.version
@@ -117,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']
@@ -132,14 +136,12 @@ class MonoReleaseProfile(DarwinProfile):
         self.verify_binaries()
 
         working = self.setup_working_dir()
-        uninstall_script = os.path.join(working, "uninstallMono.sh")
 
         # make the MDK
         self.apply_blacklist(working, 'mdk_blacklist.sh')
         self.make_updateinfo(working, self.MDK_GUID)
         mdk_pkg = self.run_pkgbuild(working, "MDK")
         title(mdk_pkg)
-        # self.make_dmg(mdk_dmg, title, mdk_pkg, uninstall_script)
 
         shutil.rmtree(working)
 
@@ -170,7 +172,6 @@ class MonoReleaseProfile(DarwinProfile):
 
     # creates and returns the path to a working directory containing:
     #   PKGROOT/ - this root will be bundled into the .pkg and extracted at /
-    #   uninstallMono.sh - copied onto the DMG
     #   Info{_sdk}.plist - used by packagemaker to make the installer
     #   resources/ - other resources used by packagemaker for the installer
     def setup_working_dir(self):
@@ -201,7 +202,7 @@ class MonoReleaseProfile(DarwinProfile):
         print "Setting up temporary package directory:", tmpdir
 
         # setup metadata
-        self.packaging_dir = os.path.join(self.path, "packaging")
+        self.packaging_dir = os.path.join(self.directory, "packaging")
         run_shell('rsync -aPq %s/* %s' % (self.packaging_dir, tmpdir), False)
 
         packages_list = string.join(
@@ -240,7 +241,7 @@ class MonoReleaseProfile(DarwinProfile):
     def run_pkgbuild(self, working_dir, package_type):
         print 'Running pkgbuild & productbuild...',
         info = self.package_info(package_type)
-        output = os.path.join(self.resource_path, info["filename"])
+        output = os.path.join(self.directory, info["filename"])
         identifier = "com.xamarin.mono-" + info["type"] + ".pkg"
         resources_dir = os.path.join(working_dir, "resources")
         distribution_xml = os.path.join(resources_dir, "distribution.xml")
@@ -279,6 +280,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
@@ -391,4 +396,4 @@ class MonoReleaseProfile(DarwinProfile):
 
         subprocess.call(['bash', '-c', path])
 
-MonoReleaseProfile()
\ No newline at end of file
+MonoReleaseProfile()