Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial work on macosx/ (gh-1, gh-70)

  • Loading branch information...
commit 605e2701449a529688c1237481b1ddd2a5f3011a 1 parent fe18b03
@joshmoore joshmoore authored
View
131 macosx/make.sh
@@ -1,13 +1,13 @@
#!/bin/sh
set -e
+set -x
-PMPROJ_TMPL="pytables-@VER@-@LIC@-py@PYVER@.pmproj"
-WELCOME_TMPL="welcome-@VER@-@LIC@-py@PYVER@.rtf"
+PMPROJ_TMPL="pytables-@VER@-py@PYVER@.pmproj"
+WELCOME_TMPL="welcome-@VER@-py@PYVER@.rtf"
BACKGROUND="background.tif"
SUBPKGS="hdf5-1.6.7.pkg numpy-1.0.4"
VER=$(cat ../VERSION)
-VERNP=${VER%pro}
WELCOME_EXT=$(echo "$WELCOME_TMPL" | sed -ne 's/.*\.\(.*\)/\1/p')
SUBPKGS="SELF $SUBPKGS"
@@ -22,82 +22,75 @@ else
fi
fi
-LICENSES="$(ls ../LICENSE-*.txt | sed -e 's#.*-\([a-z]*\).txt$#\1#')"
-if [ ! "$LICENSES" ]; then
- echo "No available licenses." > /dev/stderr
- exit 1
-fi
packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
-for LIC in $LICENSES; do
- for PYVER in $PYVERS; do
- PMPROJ=$(echo "$PMPROJ_TMPL" | sed -e "s/@VER@/$VER/" -e "s/@VERNP@/$VERNP/" -e "s/@LIC@/$LIC/" -e "s/@PYVER@/$PYVER/")
- WELCOME=$(echo "$WELCOME_TMPL" | sed -e "s/@VER@/$VER/" -e "s/@VERNP@/$VERNP/" -e "s/@LIC@/$LIC/" -e "s/@PYVER@/$PYVER/")
- MPKG="PyTables $VERNP ($LIC) for Python $PYVER.mpkg"
- LICENSE="$MPKG/Contents/Resources/License.txt"
- DMGDIR="PyTables $VERNP $LIC (py$PYVER)"
- DMG="PyTablesPro-${VERNP}-${LIC}.macosxppc-py${PYVER}.dmg"
+for PYVER in $PYVERS; do
+ PMPROJ=$(echo "$PMPROJ_TMPL" | sed -e "s/@VER@/$VER/" -e "s/@PYVER@/$PYVER/")
+ WELCOME=$(echo "$WELCOME_TMPL" | sed -e "s/@VER@/$VER/" -e "s/@PYVER@/$PYVER/")
+ MPKG="PyTables $VER for Python $PYVER.mpkg"
+ LICENSE="$MPKG/Contents/Resources/License.txt"
+ DMGDIR="PyTables $VER (py$PYVER)"
+ DMG="PyTables-${VER}.macosxppc-py${PYVER}.dmg"
- if [ $cleaning ]; then
- rm -rf "$WELCOME" "$PMPROJ" "$MPKG" "$DMGDIR" "$DMG" *.bak
- continue
- fi
+ if [ $cleaning ]; then
+ rm -rf "$WELCOME" "$PMPROJ" "$MPKG" "$DMGDIR" "$DMG" *.bak
+ continue
+ fi
- echo "Creating $WELCOME..."
- sed -e "s/@VER@/$VER/g" -e "s/@VERNP@/$VERNP/g" -e "s/@LIC@/$LIC/g" -e "s/@PYVER@/$PYVER/g" < "$WELCOME_TMPL" > "$WELCOME"
+ echo "Creating $WELCOME..."
+ sed -e "s/@VER@/$VER/g" -e "s/@PYVER@/$PYVER/g" < "$WELCOME_TMPL" > "$WELCOME"
- echo "Creating $PMPROJ..."
- plutil -convert xml1 -o "$PMPROJ" "$PMPROJ_TMPL"
- sed -i .bak -e "s/@VER@/$VER/g" -e "s/@VERNP@/$VERNP/g" -e "s/@LIC@/$LIC/g" -e "s/@PYVER@/$PYVER/g" "$PMPROJ"
+ echo "Creating $PMPROJ..."
+ plutil -convert xml1 -o "$PMPROJ" "$PMPROJ_TMPL"
+ sed -e "s/@VER@/$VER/g" -e "s/@PYVER@/$PYVER/g" "$PMPROJ"
- echo "Building $MPKG..."
- # Avoiding the verbose flag makes building fail! ;(
- $packagemaker -build -proj "$PMPROJ" -p "$MPKG" -v
+ echo "Building $MPKG..."
+ # Avoiding the verbose flag makes building fail! ;(
+ $packagemaker -i pytables -build -proj "$PMPROJ" -p "$MPKG" -v
- echo "Fixing $MPKG..."
- cp "$WELCOME" "$MPKG/Contents/Resources/Welcome.$WELCOME_EXT"
- cp "$BACKGROUND" "$MPKG/Contents/Resources"
+ echo "Fixing $MPKG..."
+ cp "$WELCOME" "$MPKG/Contents/Resources/Welcome.$WELCOME_EXT"
+ cp "$BACKGROUND" "$MPKG/Contents/Resources"
- echo -n "Adding subpackages..."
- true > "$LICENSE"
- for SUBPKG in $SUBPKGS; do
- echo -n " $SUBPKG"
- if [ "$SUBPKG" = "SELF" ]; then
- PKGSRC="$(echo ../dist/tables-$VER-py$PYVER*pkg)"
- elif [ $(expr "$SUBPKG" : ".*\.pkg") != 0 ]; then
- PKGSRC="../../$SUBPKG"
- else
- PKGSRC="$(echo ../../$SUBPKG/dist/$SUBPKG-py$PYVER*pkg)"
- fi
- cp -R "$PKGSRC" "$MPKG/Contents/Packages"
+ echo -n "Adding subpackages..."
+ true > "$LICENSE"
+ for SUBPKG in $SUBPKGS; do
+ echo -n " $SUBPKG"
+ if [ "$SUBPKG" = "SELF" ]; then
+ PKGSRC="$(echo ../dist/tables-$VER-py$PYVER*pkg)"
+ elif [ $(expr "$SUBPKG" : ".*\.pkg") != 0 ]; then
+ PKGSRC="../../$SUBPKG"
+ else
+ PKGSRC="$(echo ../../$SUBPKG/dist/$SUBPKG-py$PYVER*pkg)"
+ fi
+ cp -R "$PKGSRC" "$MPKG/Contents/Packages"
- PKGRES="$PKGSRC/Contents/Resources"
- if [ "$SUBPKG" = "SELF" ]; then
- # Place the proper license in all PyTables packages.
- PKGDST="$MPKG/Contents/Packages/$(basename $PKGSRC)"
- find "$PKGDST" -path "*/Contents/Resources" -type d \
- -exec cp "../LICENSE-$LIC.txt" '{}/License.txt' ';'
- cat "../LICENSE-$LIC.txt" >> "$LICENSE"
- elif test -f "$PKGRES/License.txt"; then
- cat $_ >> "$LICENSE"
- else
- cat "$PKGRES/English.lproj/License.txt" >> "$LICENSE"
- fi
- echo -e "\n--------------------------------\n" >> "$LICENSE"
- done
- echo
+ PKGRES="$PKGSRC/Contents/Resources"
+ if [ "$SUBPKG" = "SELF" ]; then
+ # Place the proper license in all PyTables packages.
+ PKGDST="$MPKG/Contents/Packages/$(basename $PKGSRC)"
+ find "$PKGDST" -path "*/Contents/Resources" -type d \
+ -exec cp "../LICENSE-$LIC.txt" '{}/License.txt' ';'
+ cat "../LICENSE-$LIC.txt" >> "$LICENSE"
+ elif test -f "$PKGRES/License.txt"; then
+ cat $_ >> "$LICENSE"
+ else
+ cat "$PKGRES/English.lproj/License.txt" >> "$LICENSE"
+ fi
+ echo -e "\n--------------------------------\n" >> "$LICENSE"
+ done
+ echo
- echo "Building $DMG..."
- mkdir -p "$DMGDIR"
- cp "$LICENSE" "$DMGDIR/License.txt"
- mv "$MPKG" "$DMGDIR"
- cp ../README.txt "$DMGDIR/ReadMe.txt"
- mkdir -p "$DMGDIR/Examples"
- cp -R ../examples/* "$DMGDIR/Examples/"
- cp ../doc/usersguide.pdf "$DMGDIR/User's Guide.pdf"
- cp -R ../doc/html "$DMGDIR/User's Guide (HTML)"
- hdiutil create -srcfolder "$DMGDIR" -anyowners -format UDZO -imagekey zlib-level=9 "$DMG"
- done
+ echo "Building $DMG..."
+ mkdir -p "$DMGDIR"
+ cp "$LICENSE" "$DMGDIR/License.txt"
+ mv "$MPKG" "$DMGDIR"
+ cp ../README.txt "$DMGDIR/ReadMe.txt"
+ mkdir -p "$DMGDIR/Examples"
+ cp -R ../examples/* "$DMGDIR/Examples/"
+ cp ../doc/usersguide.pdf "$DMGDIR/User's Guide.pdf"
+ cp -R ../doc/html "$DMGDIR/User's Guide (HTML)"
+ hdiutil create -srcfolder "$DMGDIR" -anyowners -format UDZO -imagekey zlib-level=9 "$DMG"
done
echo "Done"
View
0  macosx/pytables-@VER@-@LIC@-py@PYVER@.pmproj → macosx/pytables-@VER@-py@PYVER@.pmproj
File renamed without changes
View
4 macosx/welcome-@VER@-@LIC@-py@PYVER@.rtf → macosx/welcome-@VER@-py@PYVER@.rtf
@@ -5,8 +5,8 @@
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
\f0\fs24 \cf0 Welcome to the
-\f1\b PyTables @VERNP@
-\f0\b0 (@LIC@) installer program for Python @PYVER@ . This installer will guide you through the steps needed to install PyTables on your system.\
+\f1\b PyTables @VER@
+\f0\b0 installer program for Python @PYVER@ . This installer will guide you through the steps needed to install PyTables on your system.\
\
\f1\b IMPORTANT:
Please sign in to comment.
Something went wrong with that request. Please try again.