# # # add_dir "mac" # # add_file "mac/monotone-pkg-logo.gif" # content [e332735780d99b9a3c69ccbc97265bbd9e1a676c] # # add_file "mac/monotone.pmproj" # content [9e17a87db640ecce9cbd205125029a61fc93f9a6] # # add_file "mac/package-intro.rtf" # content [b834903392dbaed2d7f3db45f44de3fec11231be] # # add_file "mac/readme-mac.txt" # content [fab197cab20c2e665cd7c27ad91b22f851c44c67] # # patch "Makefile.am" # from [c7cdc7a6ff99623495792d2e28bebccc79483c67] # to [c3cfde9d4825ed644948754cd534c1e5348e6507] # # set "mac/monotone-pkg-logo.gif" # attr "mtn:manual_merge" # value "true" # ============================================================ # mac/monotone-pkg-logo.gif is binary ============================================================ # mac/monotone.pmproj is binary ============================================================ --- mac/package-intro.rtf b834903392dbaed2d7f3db45f44de3fec11231be +++ mac/package-intro.rtf b834903392dbaed2d7f3db45f44de3fec11231be @@ -0,0 +1,19 @@ +{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 +{\fonttbl\f0\fnil\fcharset77 LucidaGrande;\f1\fnil\fcharset77 LucidaGrande-Bold;} +{\colortbl;\red255\green255\blue255;} +\paperw11900\paperh16840\margl1440\margr1440\vieww10500\viewh9000\viewkind0 +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural + +\f0\fs26 \cf0 This package will install the monotone version control system.\ +\ +The monotone command-line binary will be installed as\ + +\f1\b /usr/local/bin/mtn +\f0\b0 \ +\ +HTML and PDF Documentation will be installed in\ + +\f1\b /Developer/Documentation/monotone +\f0\b0 \ +\ +The monotone web site is {\field{\*\fldinst{HYPERLINK "http://monotone.ca"}}{\fldrslt http://monotone.ca}}} ============================================================ --- mac/readme-mac.txt fab197cab20c2e665cd7c27ad91b22f851c44c67 +++ mac/readme-mac.txt fab197cab20c2e665cd7c27ad91b22f851c44c67 @@ -0,0 +1,41 @@ +Steps to build a distributable OS X dmg: + +1) Install the prerequisites listed in INSTALL, be sure to build +gettext so that translations work. Static libraries should be built +for libintl.a and the Boost libraries, and they need to be built as +universal binaries. + +At the time of writing Macports doesn't build these as universal binaries. + +2) Configure it (changing paths appropriately): + mkdir "build" + ../configure --enable-static-boost=/usr/local/stow/boost-1.33.1-fat \ + --with-libintl-prefix=/usr/local/stow/gettext-0.16.1 \ + CFLAGS="-O2 -mdynamic-no-pic -ggdb -gfull -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" \ + CXXFLAGS="-O2 -mdynamic-no-pic -fno-threadsafe-statics -ggdb -gfull -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" \ + CPPFLAGS="-pipe -I/usr/local/stow/boost-1.33.1-fat/include" LDFLAGS="-L/usr/local/stow/boost-1.33.1-fat/lib -dead_strip" \ + STRIP="stripS" \ + --disable-dependency-tracking + +(note that stripS is a wrapper executable in PATH that runs "strip -S") + +Edit the resultant Makefile and change the "LIBINTL = " line to something +similar (with correct path) to: +LIBINTL = /usr/local/stow/gettext-0.16.1/lib/libintl.a -framework CoreFoundation + +Check that other libraries such as zlib and libiconv +seem to be pointing at system-provided paths. + +3) "make" to build it + +4) Run "otool -L" on the mtn binary and check that it only links against + system-provided libraries (in /usr/lib). + + The mtn binary can be stripped with "strip -S" and is suitable for + standalone distribution. + +4) Run "make dmg" to build a distributable installer, with working translations + and documentation. The "mac/monotone.pmproj" is the base for the install + package, however the version number is automatically replaced. + +5) Test the installer preferably on a different system. ============================================================ --- Makefile.am c7cdc7a6ff99623495792d2e28bebccc79483c67 +++ Makefile.am c3cfde9d4825ed644948754cd534c1e5348e6507 @@ -463,7 +463,35 @@ $(top_builddir)/figures/%.ps: $(srcdir)/ # acroread -toPostScript -pairs $< $@ pdftops $< $@ +# build an OS X installer +PKG_INST_ROOT = $(PWD)/$(top_builddir)/pkg_inst_root +monotone-$(PACKAGE_VERSION).pkg: monotone.pdf html + rm -rf $(PKG_INST_ROOT) "$@" + $(MAKE) install-strip DESTDIR=$(PKG_INST_ROOT) + mkdir -p $(PKG_INST_ROOT)/Developer/Documentation/monotone + cp monotone.pdf $(PKG_INST_ROOT)/Developer/Documentation/monotone/ + cp -r html $(PKG_INST_ROOT)/Developer/Documentation/monotone/html + plutil -convert xml1 -o monotone-xml.pmproj.in $(srcdir)/mac/monotone.pmproj + sed "s/__MONOTONE_VERSION__/$(PACKAGE_VERSION)/g" \ + < monotone-xml.pmproj.in > monotone-xml.pmproj + cp $(srcdir)/mac/monotone-pkg-logo.gif $(srcdir)/mac/package-intro.rtf \ + $(srcdir)/COPYING.txt . + chmod -R o-w,g-w,a+rX $(PKG_INST_ROOT) + /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker \ + -build -proj monotone-xml.pmproj -p "$@" +# build an OS X distribution disk image +dmg: monotone-$(PACKAGE_VERSION).dmg + +monotone-$(PACKAGE_VERSION).dmg: monotone-$(PACKAGE_VERSION).pkg + rm -rf $(top_builddir)/dmg_root "$@" + mkdir $(top_builddir)/dmg_root + cp -R $^ $(top_builddir)/dmg_root/ + chmod -R a+rX $(top_builddir)/dmg_root + hdiutil create -srcfolder "$(top_builddir)/dmg_root" \ + "$@" -format UDZO -scrub -imagekey zlib-level=9 \ + -volname monotone-$(PACKAGE_VERSION) + # testsuite stuff (could this possibly be more ugly?) if BUILD_UNIT_TESTS