[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r9631 - trunk/gnue-common/packaging/osx
From: |
johannes |
Subject: |
[gnue] r9631 - trunk/gnue-common/packaging/osx |
Date: |
Sun, 27 May 2007 06:14:25 -0500 (CDT) |
Author: johannes
Date: 2007-05-27 06:14:25 -0500 (Sun, 27 May 2007)
New Revision: 9631
Added:
trunk/gnue-common/packaging/osx/Description.plist
trunk/gnue-common/packaging/osx/Info.plist
Removed:
trunk/gnue-common/packaging/osx/create-image
trunk/gnue-common/packaging/osx/dist/
trunk/gnue-common/packaging/osx/gnue-common.pmproj
trunk/gnue-common/packaging/osx/scripts/
Modified:
trunk/gnue-common/packaging/osx/HOWTO-Build
trunk/gnue-common/packaging/osx/create-build
Log:
Changed scripts so all steps are done from one script without the need of using
PackageMaker's GUI.
Added: trunk/gnue-common/packaging/osx/Description.plist
===================================================================
--- trunk/gnue-common/packaging/osx/Description.plist 2007-05-26 15:26:15 UTC
(rev 9630)
+++ trunk/gnue-common/packaging/osx/Description.plist 2007-05-27 11:14:25 UTC
(rev 9631)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IFPkgDescriptionDescription</key>
+ <string>GNU Enterprise Common Base http://www.gnuenterprise.org</string>
+ <key>IFPkgDescriptionTitle</key>
+ <string>GNU Enterprise Common</string>
+</dict>
+</plist>
Modified: trunk/gnue-common/packaging/osx/HOWTO-Build
===================================================================
--- trunk/gnue-common/packaging/osx/HOWTO-Build 2007-05-26 15:26:15 UTC (rev
9630)
+++ trunk/gnue-common/packaging/osx/HOWTO-Build 2007-05-27 11:14:25 UTC (rev
9631)
@@ -5,41 +5,16 @@
# How to build a disk image containing a native OS X installer package
-1. Grab the tarball you'd like to create a package for from
- http://www.gnuenterprise.org/downloads/
+Grab the tarball you'd like to create a package for from
+http://www.gnuenterprise.org/downloads/
- e.g. gnue-common-0.6.1.99-beta1.tar.gz
+e.g. gnue-common-0.6.8.tar.gz
-2. Unpack the tarball into this directory (packaging/osx)
- You'll get a subdirectory like 'gnue-common-0.6.1.99-beta1'
+and unpack the tarball. Change into the packaging/osx directory.
-3. Execute the script "create-build" with the package-directory previously
- created
+1. Execute the script "create-build" using sudo or being root.
- e.g. create-build gnue-common-0.6.1.99-beta1
+ e.g. sudo ./create-build
- This script creates a final build environment for the package. It will be
- located in the subdirectory 'build'
-
-4. Start the package manager (from /Developer/Tools) and load the package
- manager project file: gnue-common.pmproj
-
- In the 'Contents' tab click on the 'File permissions ...' button. There
- please click the button 'Apply Recommendations" and finally quit this dialog
- via Ok button.
-
- Now you can call "Project | Build" from the menu bar or by Cmd-B.
- Determine the name of the installer package
- (e.g. gnue-common-0.6.1.99-py23) and press the Save button. You'll be
- asked for the administrator password.
-
- After the build is finished and there were no errors you can quit the
- package manager. Another directory has been created - the package directory,
- e.g. gnue-common-0.6.1.99-py23.pkg
-
-5. Execute the script "create-image" with the package directory
- e.g. create-image gnue-common-0.6.1.99-py23.pkg
-
- This will create the disc image containing the installer package as well as
- the contents of the 'dist' subdirectory.
-
+ This script does all the dirty work of building the package environment,
+ creating the installler package and finally building the disk image.
Added: trunk/gnue-common/packaging/osx/Info.plist
===================================================================
--- trunk/gnue-common/packaging/osx/Info.plist 2007-05-26 15:26:15 UTC (rev
9630)
+++ trunk/gnue-common/packaging/osx/Info.plist 2007-05-27 11:14:25 UTC (rev
9631)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleGetInfoString</key>
+ <string>0.6.8, GNUe (c) 2001-2007 Free Software Foundation</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.gnuenterprise.common</string>
+ <key>CFBundleShortVersionString</key>
+ <string>0.6.8</string>
+ <key>IFMajorVersion</key>
+ <integer>0</integer>
+ <key>IFMinorVersion</key>
+ <integer>6</integer>
+ <key>IFPkgFlagAllowBackRev</key>
+ <false/>
+ <key>IFPkgFlagAuthorizationAction</key>
+ <string>AdminAuthorization</string>
+ <key>IFPkgFlagBackgroundAlignment</key>
+ <string>topleft</string>
+ <key>IFPkgFlagBackgroundScaling</key>
+ <string>none</string>
+ <key>IFPkgFlagDefaultLocation</key>
+ <string>/</string>
+ <key>IFPkgFlagFollowLinks</key>
+ <true/>
+ <key>IFPkgFlagInstallFat</key>
+ <false/>
+ <key>IFPkgFlagInstalledSize</key>
+ <integer>4060</integer>
+ <key>IFPkgFlagIsRequired</key>
+ <false/>
+ <key>IFPkgFlagOverwritePermissions</key>
+ <false/>
+ <key>IFPkgFlagRelocatable</key>
+ <false/>
+ <key>IFPkgFlagRestartAction</key>
+ <string>NoRestart</string>
+ <key>IFPkgFlagRootVolumeOnly</key>
+ <false/>
+ <key>IFPkgFlagUpdateInstalledLanguages</key>
+ <false/>
+ <key>IFPkgFormatVersion</key>
+ <real>0.10000000149011612</real>
+</dict>
+</plist>
Modified: trunk/gnue-common/packaging/osx/create-build
===================================================================
--- trunk/gnue-common/packaging/osx/create-build 2007-05-26 15:26:15 UTC
(rev 9630)
+++ trunk/gnue-common/packaging/osx/create-build 2007-05-27 11:14:25 UTC
(rev 9631)
@@ -1,12 +1,19 @@
#!/bin/bash
#
-# Create the build environment for gnue-common
-# Usage: create-build <package-directory>
+# Create a disk image containing an installer package of gnue-common
+#
+# Usage: create-build
-packagedir=$1
+if [ $UID -ne 0 ];
+then
+ echo "Please run this script as admin (or sudo)"
+ exit 1
+fi
+
+packagedir="../.."
if [ ! -d "$packagedir" ];
then
- echo "Usage: $0 <package-directory>"
+ echo "Usage: $0"
exit 1
fi
@@ -17,11 +24,110 @@
exit 1
fi
-test -d "build" || mkdir "build"
+# ---------------------------------------------------------------------------
+# Get the package-name and version from the PKG-INFO file
+# ---------------------------------------------------------------------------
+pkgvers=`grep "^Version" ../../PKG-INFO | cut -d" " -f2`
+pkgname=`grep "^Name" ../../PKG-INFO | cut -d" " -f2`
+volname="$pkgname-$pkgvers-py23"
+package="$pkgname-$pkgvers-py23.pkg"
+
+if [ "$package" = "--py23.pkg" ];
+then
+ echo "Cannot determine package and version"
+ exit 1
+fi
+
+# ---------------------------------------------------------------------------
+# Populate the package environment
+# ---------------------------------------------------------------------------
+
curdir=`pwd`
+destdir="$curdir/build-env/pkg-root"
+resdir="$curdir/build-env/Resources"
+test -d "$destdir" || mkdir "$destdir"
+
cd "$packagedir"
-python setup.py install --prefix=/usr --root=../build --no-compile
+python setup.py install --prefix=/usr --root=$destdir --no-compile
-cd "$curdir"
+# ---------------------------------------------------------------------------
+# Make sure to have a gnue.pth file in the Framework
+# ---------------------------------------------------------------------------
+# TODO: Check if this isn't better placed in a postflight script
+cd "$destdir"
+syslnk="System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages"
+mkdir -p $syslnk
+echo "/usr/lib/python2.3/site-packages" > "$syslnk/gnue.pth"
+
+# ---------------------------------------------------------------------------
+# Apply the proper permissions to all files of the package
+# ---------------------------------------------------------------------------
+cd "$destdir"
+out="$curdir/out.log"
+
+echo "Applying permissions ..."
+
+for i in `find . -print`
+do
+ real="/$i"
+ echo "$i" >> $out
+ if [ -e $real ];
+ then
+ data=`stat -f "%u %g %p" $real`
+ uid=`echo $data | cut -f1 -d" "`
+ gid=`echo $data | cut -f2 -d" "`
+ mod=`echo $data | cut -f3 -d" "`
+
+ chmod $mod $i
+ chgrp $gid $i
+ chown $uid $i
+ else
+ chown root $i
+ chgrp admin $i
+
+ if [ -d $i ];
+ then
+ chmod 775 $i
+ fi
+
+ if [ -f $i ];
+ then
+ if [ -x $i ]; then
+ chmod 775 $i
+ else
+ chmod 664 $i
+ fi
+ fi
+ fi
+done
+
+cd $curdir
+
+# ---------------------------------------------------------------------------
+# Build the package
+# ---------------------------------------------------------------------------
+echo "Building the package ..."
+/Developer/Tools/packagemaker -build -p $package -f $destdir -ds -r $resdir -i
Info.plist -d Description.plist
+
+# ---------------------------------------------------------------------------
+# Get rid of the obsolte directories
+# ---------------------------------------------------------------------------
+
+rm -rf "$curdir/build-env"
+
+
+# ---------------------------------------------------------------------------
+# Create a disk image
+# ---------------------------------------------------------------------------
+
+echo "Creating disk image ..."
+hdiutil create -srcfolder $package -volname $volname temp.dmg
+
+# Convert the image
+echo "Converting disk image ..."
+hdiutil convert temp.dmg -format UDZO -o $volname.dmg
+
+rm -f temp.dmg
+rm -rf $package
Deleted: trunk/gnue-common/packaging/osx/create-image
===================================================================
--- trunk/gnue-common/packaging/osx/create-image 2007-05-26 15:26:15 UTC
(rev 9630)
+++ trunk/gnue-common/packaging/osx/create-image 2007-05-27 11:14:25 UTC
(rev 9631)
@@ -1,38 +0,0 @@
-#!/bin/bash
-#
-# Create a disk image containing an installer package as well as the contents
-# of the dist directory
-#
-
-srcDir="$1"
-bseName=`basename $srcDir`
-pkgName=`basename $srcDir .pkg`
-
-if [ ! -d "$srcDir" -o "$pkgName" == "$bseName" ]; then
- echo "Usage: $0 <installer-package>"
- exit 1
-fi
-
-tmpDir="tmp-img"
-test -d "$tmpDir" && rm -rf "$tmpDir"
-mkdir "$tmpDir"
-
-# Copy the contents of the dist-dir
-echo "Preparing disk image ..."
-if [ -d "dist" ]; then
- cp -R dist/* $tmpDir
-fi
-
-# Copy the package directory to the dist-dir
-cp -R `basename $srcDir` $tmpDir
-
-# Create an image
-echo "Creating disk image ..."
-hdiutil create -srcfolder $tmpDir -volname $pkgName temp.dmg
-
-# Convert the image
-echo "Converting disk image ..."
-hdiutil convert temp.dmg -format UDZO -o $pkgName.dmg
-
-rm -f temp.dmg
-rm -rf $tmpDir
Deleted: trunk/gnue-common/packaging/osx/gnue-common.pmproj
===================================================================
(Binary files differ)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r9631 - trunk/gnue-common/packaging/osx,
johannes <=