aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpackages/darwin_pkg/.DS_Storebin0 -> 6148 bytes
-rw-r--r--packages/darwin_pkg/Description.plist14
-rw-r--r--packages/darwin_pkg/Info.plist14
-rw-r--r--packages/darwin_pkg/Makefile108
-rwxr-xr-xpackages/darwin_pkg/mkdmg94
-rw-r--r--packages/darwin_pkg/pd.info18
6 files changed, 248 insertions, 0 deletions
diff --git a/packages/darwin_pkg/.DS_Store b/packages/darwin_pkg/.DS_Store
new file mode 100755
index 00000000..1be18620
--- /dev/null
+++ b/packages/darwin_pkg/.DS_Store
Binary files differ
diff --git a/packages/darwin_pkg/Description.plist b/packages/darwin_pkg/Description.plist
new file mode 100644
index 00000000..06bfbd73
--- /dev/null
+++ b/packages/darwin_pkg/Description.plist
@@ -0,0 +1,14 @@
+<?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>IFPkgDescriptionDeleteWarning</key>
+ <string></string>
+ <key>IFPkgDescriptionDescription</key>
+ <string>The pure data real time music and multimedia environment.</string>
+ <key>IFPkgDescriptionTitle</key>
+ <string>PACKAGE_PREFIX</string>
+ <key>IFPkgDescriptionVersion</key>
+ <string>PD_VERSION PACKAGE_VERSION</string>
+</dict>
+</plist>
diff --git a/packages/darwin_pkg/Info.plist b/packages/darwin_pkg/Info.plist
new file mode 100644
index 00000000..46d9cb88
--- /dev/null
+++ b/packages/darwin_pkg/Info.plist
@@ -0,0 +1,14 @@
+<?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>PACKAGE_PREFIX PD_VERSION PACKAGE_VERSION</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.sourceforge.pure-data.darwin-pkg</string>
+ <key>CFBundleName</key>
+ <string>PACKAGE_PREFIX</string>
+ <key>CFBundleShortVersionString</key>
+ <string>PD_VERSION PACKAGE_VERSION</string>
+</dict>
+</plist>
diff --git a/packages/darwin_pkg/Makefile b/packages/darwin_pkg/Makefile
new file mode 100644
index 00000000..c95ef62b
--- /dev/null
+++ b/packages/darwin_pkg/Makefile
@@ -0,0 +1,108 @@
+
+current: dmg
+
+#
+# Fetch the versions of the various included packages
+
+PD_MAJOR_VERSION = $(shell grep PD_MAJOR_VERSION ../pd/src/m_pd.h | cut -d ' ' -f 3)
+PD_MINOR_VERSION = $(shell grep PD_MINOR_VERSION ../pd/src/m_pd.h | cut -d ' ' -f 3)
+PD_VERSION = $(PD_MAJOR_VERSION).$(PD_MINOR_VERSION)
+
+CYCLONE_MAJOR_VERSION = $(shell grep CYCLONE_VERSION ../externals/miXed/cyclone/build_counter | cut -d ' ' -f 3 | cut -d '"' -f 2)
+CYCLONE_RELEASE = $(shell grep CYCLONE_RELEASE ../externals/miXed/cyclone/build_counter | cut -d ' ' -f 3 | cut -d '"' -f 2)
+CYCLONE_BUILD = $(shell grep CYCLONE_BUILD ../externals/miXed/cyclone/build_counter | cut -d ' ' -f 3 | cut -d '"' -f 2)
+CYCLONE_VERSION = $(CYCLONE_MAJOR_VERSION) $(CYCLONE_RELEASE) $(CYCLONE_BUILD)
+
+ZEXY_VERSION = $(shell grep VERSION ../externals/zexy/src/zexy.h | cut -d ' ' -f 3 | cut -d '"' -f 2)
+
+# various files
+
+PACKAGE_VERSION = $(shell date +20%y.%m.%d)
+PACKAGE_PREFIX = Pure Data
+PACKAGE_NAME = $(PACKAGE_PREFIX)
+
+DMG_PREFIX = Pure Data Installer
+DMG_NAME = $(DMG_PREFIX) $(PD_VERSION)-$(PACKAGE_VERSION)
+
+WELCOME_FILE = Welcome.html
+INFO_FILE = $(PACKAGE_PREFIX) $(PD_VERSION)-$(PACKAGE_VERSION).info
+
+clean: darwin_mpkg_clean
+
+darwin_mpkg_clean:
+ -sudo rm -Rf installroot "$(DMG_PREFIX)*"
+ -rm -f "$(WELCOME_FILE)" *.dmg *~
+ cd ../externals/build/darwin ; make darwin_pkg_clean
+ cd ../externals/zexy/src ; make -f makefile.darwin darwin_pkg_clean
+ cd ../externals/miXed/cyclone ; make darwin_pkg_clean
+ cd ../doc/ ; make darwin_pkg_clean
+ cd ../doc/pddp ; make darwin_pkg_clean
+
+darwin_mpkg_welcome:
+ echo $(CYCLONE_RELEASE)
+ -rm $(WELCOME_FILE)
+ echo "<HTML><BODY>" > $(WELCOME_FILE)
+ echo "<H2>Pure Data Installer$(PD_VERSION)-$(PACKAGE_VERSION)</H2>" >> $(WELCOME_FILE)
+ echo "<P>Pd is a free real-time computer music software package resembling Max. It provides a patchable environment for audio analysis, synthesis, and processing, with a rich set of multimedia capabilities. You can get Pd for Linux, Windows, MacOS X, BSD, or IRIX.</P>" >> $(WELCOME_FILE)
+ echo "<P>It is written by Miller S. Puckette with many other contributors.</P>" >> $(WELCOME_FILE)
+ echo "<P>For more information, go to: http://www.pure-data.org</P>" >> $(WELCOME_FILE)
+# echo "<P>`grep -A9 ACKNOWLEDG ../pd/README.txt`</P>" >> $(WELCOME_FILE)
+ echo "<H3>Included Versions</H3>" >> $(WELCOME_FILE)
+# echo "<P>The various versions of the included packages:</P>" >> $(WELCOME_FILE)
+ echo "<UL>" >> $(WELCOME_FILE)
+# echo "<LI>pure data: $(PD_VERSION) " >> $(WELCOME_FILE)
+ echo "<LI>cyclone: $(CYCLONE_VERSION)" >> $(WELCOME_FILE)
+ echo "<LI>pd-externals: `date +20%y.%m.%d`" >> $(WELCOME_FILE)
+ echo "<LI>pd-doc: `date +20%y.%m.%d`" >> $(WELCOME_FILE)
+ echo "<LI>pddp: `date +20%y.%m.%d`" >> $(WELCOME_FILE)
+ echo "<LI>zexy: $(ZEXY_VERSION)" >> $(WELCOME_FILE)
+ echo "</UL>" >> $(WELCOME_FILE)
+ echo "(this package built on `date`) <BR>" >> $(WELCOME_FILE)
+ echo "</BODY></HTML>" >> $(WELCOME_FILE)
+
+
+darwin_mpkg: darwin_mpkg_welcome
+ test -d installroot/Packages || mkdir -p installroot/Packages
+ cd ../externals/build/darwin ; make darwin_pkg
+ sudo cp -R ../externals/build/darwin/pd-externals*.pkg installroot/Packages
+ cd ../externals/zexy/src ; make -f makefile.darwin darwin_pkg
+ sudo cp -R ../externals/zexy/src/pd-zexy*.pkg installroot/Packages
+ cd ../externals/miXed/cyclone ; make CC=gcc2 PD_DIR=../../../pd/src darwin_pkg
+ sudo cp -R ../externals/miXed/cyclone/pd-cyclone*.pkg installroot/Packages
+ cd ../doc/ ; make darwin_pkg
+ sudo cp -R ../doc/pd-doc*.pkg installroot/Packages
+ cd ../doc/pddp ; make darwin_pkg
+ sudo cp -R ../doc/pddp/pd-pddp*.pkg installroot/Packages
+ test -d "installroot/$(PACKAGE_NAME).mpkg/Contents/Resources" \
+ || mkdir -p "installroot/$(PACKAGE_NAME).mpkg/Contents/Resources"
+# generate pd.list
+ cd installroot/Packages && /bin/ls -1d *.pkg \
+ | sed -e 's/\(.*\)/\1\:Selected/' \
+ > "../$(PACKAGE_NAME).mpkg/Contents/Resources/$(PACKAGE_NAME).list"
+# generate .info file
+ sed -e 's/PACKAGE_PREFIX/$(PACKAGE_PREFIX)/' pd.info \
+ | sed -e 's/PACKAGE_VERSION/$(PACKAGE_VERSION)/' \
+ | sed -e 's/PD_VERSION/$(PD_VERSION)/' \
+ > "installroot/$(PACKAGE_NAME).mpkg/Contents/Resources/$(INFO_FILE)"
+# generate Description.plist
+ sed -e 's/PACKAGE_PREFIX/$(PACKAGE_PREFIX)/' Description.plist \
+ | sed -e 's/PACKAGE_VERSION/$(PACKAGE_VERSION)/' \
+ | sed -e 's/PD_VERSION/$(PD_VERSION)/' \
+ > "installroot/$(PACKAGE_NAME).mpkg/Contents/Resources/Description.plist"
+# generate Info.plist
+ sed -e 's/PACKAGE_PREFIX/$(PACKAGE_PREFIX)/' Info.plist \
+ | sed -e 's/PACKAGE_VERSION/$(PACKAGE_VERSION)/' \
+ | sed -e 's/PD_VERSION/$(PD_VERSION)/' \
+ > "installroot/$(PACKAGE_NAME).mpkg/Contents/Info.plist"
+# install files
+ install -m644 --group=staff $(WELCOME_FILE) \
+ "installroot/$(PACKAGE_NAME).mpkg/Contents/Resources/"
+ sudo chmod -R u+w installroot
+ sudo chmod -R a+r installroot
+ sudo chmod -R go-w installroot
+ sudo chgrp -R staff installroot
+
+dmg: darwin_mpkg_clean darwin_mpkg
+ mv installroot "$(DMG_NAME)"
+ /bin/sh mkdmg "$(DMG_NAME)"
+
diff --git a/packages/darwin_pkg/mkdmg b/packages/darwin_pkg/mkdmg
new file mode 100755
index 00000000..2c8bccb2
--- /dev/null
+++ b/packages/darwin_pkg/mkdmg
@@ -0,0 +1,94 @@
+#!/bin/sh
+#
+# from: http://www.macosxhints.com/article.php?story=20020311215452999
+#
+#
+# Creates a disk image (dmg) on Mac OS X from the command line
+# from a folder.
+
+FOLDER="$1"
+if [ -z "$FOLDER" ]; then
+echo
+echo "usage: $0 <folder>"
+echo
+exit 1
+fi
+
+if [ ! -d "$FOLDER" ]; then
+echo $FOLDER does not exist
+exit 2
+fi
+
+SIZE=`du -s "$FOLDER" | awk '{ print $1 }'`
+# allow space for partition map and directory structure
+SIZE=`echo 1024 + $SIZE \* 1.1 / 1 | bc`
+NAME=`basename "$FOLDER"`
+FILE=$NAME.dmg
+TMP=${TMP:-/tmp}
+
+if [ $SIZE -lt 9216 ]; then
+SIZE=9216
+fi
+
+if [ -e "$FILE" ] ; then
+echo $FILE already exists!
+exit 3
+fi
+
+TMPFILE=$TMP/$$.dmg
+
+echo Creating $TMPFILE from $FOLDER, $SIZE sectors...
+hdiutil create $TMPFILE -sectors $SIZE -ov
+if [ $? -ne 0 ] ; then
+rm -f $TMPFILE
+exit 4
+fi
+echo
+
+DEVICES=`hdid -nomount $TMPFILE`
+DEVMASTER=`echo $DEVICES| awk '{ print $1 }'`
+DEVHFS=`echo $DEVICES| awk '{ print $5 }'`
+echo Creating HFS partition $NAME on $TMPFILE at $DEVHFS
+newfs_hfs -v "$NAME" $DEVHFS
+if [ $? -ne 0 ] ; then
+rm -f $TMPFILE
+exit 5
+fi
+hdiutil eject $DEVMASTER
+if [ $? -ne 0 ] ; then
+rm -f $TMPFILE
+exit 6
+fi
+DEVICES=`hdid $TMPFILE`
+if [ $? -ne 0 ] ; then
+rm -f $TMPFILE
+exit 7
+fi
+
+DEVMASTER=`echo $DEVICES| awk '{ print $1 }'`
+DEVHFS=`echo $DEVICES| awk '{ print $5 }'`
+echo Copying $FOLDER to /Volumes/$NAME on $DEVMASTER
+sudo ditto -rsrcFork "$FOLDER" "/Volumes/$NAME"
+if [ $? -ne 0 ]; then
+hdiutil eject $DEVMASTER
+rm -f $TMPFILE
+exit 8
+fi
+
+hdiutil eject $DEVMASTER
+if [ $? -ne 0 ]; then
+#rm -f $TMPFILE
+exit 9
+fi
+
+echo "Compressing $NAME to $FILE"
+#hdiutil convert $TMPFILE -format UDZO -o "$FILE"
+hdiutil convert $TMPFILE -format UDZO -imagekey zlib-level=9 -o "$FILE"
+if [ $? -ne 0 ]; then
+rm -f "$FILE" $TMPFILE
+exit 10
+fi
+
+rm -f $TMPFILE
+
+# end
diff --git a/packages/darwin_pkg/pd.info b/packages/darwin_pkg/pd.info
new file mode 100644
index 00000000..734390a5
--- /dev/null
+++ b/packages/darwin_pkg/pd.info
@@ -0,0 +1,18 @@
+Title PACKAGE_PREFIX
+Version PD_VERSION PACKAGE_VERSION
+Description The pure data real time music and multimedia environment.
+DefaultLocation /
+DeleteWarning
+NeedsAuthorization YES
+Required NO
+Relocatable NO
+RequiresReboot NO
+UseUserMask NO
+OverwritePermissions NO
+InstallFat NO
+rootVolumeOnly NO
+AllowBackRev YES
+LongFilenames YES
+LibrarySubdirectory Standard
+InstallOnly NO
+PackageLocation ../Packages