gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r8387 - in GNUnet: . contrib/macosx


From: gnunet
Subject: [GNUnet-SVN] r8387 - in GNUnet: . contrib/macosx
Date: Sun, 5 Apr 2009 04:06:03 -0600

Author: holindho
Date: 2009-04-05 04:06:03 -0600 (Sun, 05 Apr 2009)
New Revision: 8387

Added:
   GNUnet/README.macosx
   GNUnet/contrib/macosx/Pkg-Description.plist
   GNUnet/contrib/macosx/Pkg-Info.plist.in
   GNUnet/contrib/macosx/build-osx-package.sh
Modified:
   GNUnet/configure.ac
   GNUnet/contrib/macosx/build-osx-framework.sh
Log:
Mac OS X packaging


Added: GNUnet/README.macosx
===================================================================
--- GNUnet/README.macosx                                (rev 0)
+++ GNUnet/README.macosx        2009-04-05 10:06:03 UTC (rev 8387)
@@ -0,0 +1,57 @@
+GNUnet on Mac OS X
+==================
+
+GNUnet has two installation methods on Mac OS X: it can be installed
+as a Mac OS X framework or with the standard `./configure; make; make install'
+shell commands. The framework package is self-contained.
+
+Installing and uninstalling the framework
+=========================================
+
+The binary framework is distributed as a disk image (GNUnet-x.x.xx.dmg).
+Installation is done by opening the disk image and clicking GNUnet.pkg
+inside it. The Mac OS X installer application will then run. The framework
+is installed to the root volume's /Library/Frameworks folder and installing
+will require admin privileges.
+
+The framework can be uninstalled by dragging
+/Library/Frameworks/GNUnet.framework to Trash.
+(TODO: config files and other stuff)
+
+Using the framework
+===================
+
+In the framework, the command line tools can be found in the folder
+/Library/Frameworks/GNUnet.framework/Versions/Current/bin/
+
+The framework can be used in software projects as a framework or as a dynamic
+library. 
+>>> hello.c
+#include <GNUnet/gnunet_util.h>
+
+int main()
+{
+       GNUNET_init(...);
+       ...
+}
+
+Framework usage:
+
+  gcc -o hello hello.c -framework GNUnet
+
+  Note that all the gnunet client libraries get linked in with the framework.
+
+Dynamic library usage:
+
+  gcc -I/Library/Frameworks/GNUnet.framework/Versions/Current/include \ 
+      -o hello hello.c \
+      -L/Library/Frameworks/GNUnet.framework/Versions/Current/lib \
+      -lgnunet_util
+
+When using the framework as a dynamic library in projects using autotools,
+one would most likely want to add 
+"-I/Library/Frameworks/GNUnet.framework/Versions/Current/include"
+to CPPFLAGS and 
+"-L/Library/Frameworks/GNUnet.framework/Versions/Current/lib"
+to LDFLAGS.
+

Modified: GNUnet/configure.ac
===================================================================
--- GNUnet/configure.ac 2009-04-05 09:59:25 UTC (rev 8386)
+++ GNUnet/configure.ac 2009-04-05 10:06:03 UTC (rev 8387)
@@ -1038,14 +1038,16 @@
 AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
 
 
+PACKAGE_VERSION_NOALPHA=`echo $PACKAGE_VERSION | sed "s/@<:@A-Za-z@:>@*//g;"`
+AC_SUBST(PACKAGE_VERSION_NOALPHA)
 
-
 AC_CONFIG_FILES([ po/Makefile.in m4/Makefile
 Makefile
 contrib/Makefile
 contrib/config-client.scm
 contrib/config-daemon.scm
 contrib/macosx/Info.plist
+contrib/macosx/Pkg-Info.plist
 doc/Makefile
 doc/man/Makefile
 src/Makefile

Added: GNUnet/contrib/macosx/Pkg-Description.plist
===================================================================
--- GNUnet/contrib/macosx/Pkg-Description.plist                         (rev 0)
+++ GNUnet/contrib/macosx/Pkg-Description.plist 2009-04-05 10:06:03 UTC (rev 
8387)
@@ -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>GNUnet is a framework for secure peer-to-peer networking that 
does not use any centralized or otherwise trusted services.</string>
+       <key>IFPkgDescriptionTitle</key>
+       <string>GNUnet framework</string>
+</dict>
+</plist>

Added: GNUnet/contrib/macosx/Pkg-Info.plist.in
===================================================================
--- GNUnet/contrib/macosx/Pkg-Info.plist.in                             (rev 0)
+++ GNUnet/contrib/macosx/Pkg-Info.plist.in     2009-04-05 10:06:03 UTC (rev 
8387)
@@ -0,0 +1,40 @@
+<?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_STRING@, Copyright 2001-2009 Christian Grothoff (and 
other contributing authors)</string>
+       <key>CFBundleIdentifier</key>
+       <string>org.gnunet.GNUnet.pkg</string>
+       <key>CFBundleShortVersionString</key>
+       <string>@PACKAGE_VERSION_NOALPHA@</string>
+       <key>IFPkgFlagAllowBackRev</key>
+       <false/>
+       <key>IFPkgFlagAuthorizationAction</key>
+       <string>RootAuthorization</string>
+       <key>IFPkgFlagBackgroundAlignment</key>
+       <string>topleft</string>
+       <key>IFPkgFlagBackgroundScaling</key>
+       <string>none</string>
+       <key>IFPkgFlagDefaultLocation</key>
+       <string>/Library/Frameworks</string>
+       <key>IFPkgFlagFollowLinks</key>
+       <true/>
+       <key>IFPkgFlagInstalledSize</key>
+       <integer>0</integer>
+       <key>IFPkgFlagIsRequired</key>
+       <false/>
+       <key>IFPkgFlagOverwritePermissions</key>
+       <true/>
+       <key>IFPkgFlagRelocatable</key>
+       <false/>
+       <key>IFPkgFlagRestartAction</key>
+       <string>NoRestart</string>
+       <key>IFPkgFlagRootVolumeOnly</key>
+       <true/>
+       <key>IFPkgFlagUpdateInstalledLanguages</key>
+       <false/>
+       <key>IFPkgFormatVersion</key>
+       <real>0.10000000149011612</real>
+</dict>
+</plist>

Modified: GNUnet/contrib/macosx/build-osx-framework.sh
===================================================================
--- GNUnet/contrib/macosx/build-osx-framework.sh        2009-04-05 09:59:25 UTC 
(rev 8386)
+++ GNUnet/contrib/macosx/build-osx-framework.sh        2009-04-05 10:06:03 UTC 
(rev 8387)
@@ -22,7 +22,7 @@
 FW_NAME=GNUnet.framework
 FW_BASE_DIR=/Library/Frameworks/${FW_NAME}
 BUILD_DIR=/tmp/GNUnet-build
-FINAL_FW_BASE_DIR="${BUILD_DIR}/${FW_NAME}"
+FINAL_FW_BASE_DIR="${BUILD_DIR}/Frameworks/${FW_NAME}"
 SDK_PATH="${BUILD_DIR}/${SDK}"
 OPT_FLAGS="-O2 -force_cpusubtype_ALL"
 
@@ -624,13 +624,13 @@
        if [ ! -e "${dst_dir}" ]
        then
                echo "MKDIR ${dst_dir}"
-               if ! ( mkdir -m 755 -p "${dst_dir}" )
+               if ! ( mkdir -m 775 -p "${dst_dir}" )
                then
                        echo "failed to create directory: ${dst_dir}"
                        exit 1
                fi
                # fix dir permissions
-               if ! ( chmod 0755 `find ${FINAL_FW_BASE_DIR} -type d` )
+               if ! ( chmod 0775 `find ${FINAL_FW_BASE_DIR} -type d` )
                then
                        echo "error setting permissions"
                        exit 1
@@ -674,7 +674,7 @@
                                echo "error creating fat binary"
                                exit 1
                        fi
-                       if ! ( chmod 0755 "${dst_file}" )
+                       if ! ( chmod 0775 "${dst_file}" )
                        then
                                echo "error settings permissions"
                                exit 1
@@ -701,15 +701,10 @@
                                        echo "error copying file"
                                        exit 1
                                fi
-                               if ! ( chmod 0755 "${dst_file}" )
-                               then
-                                       echo "error setting permissions"
-                                       exit 1
-                               fi
                        elif [ -f "${src_file}" ]
                        then
                                echo "INSTALL ${dst_file}"
-                               if ! ( install -m 0644 "${src_file}" 
"${dst_file}" )
+                               if ! ( install -m 0664 "${src_file}" 
"${dst_file}" )
                                then
                                        echo "error installing file"
                                        exit 1
@@ -741,7 +736,7 @@
                        echo "error creating message catalog: $lang"
                        exit 1
                fi
-               if ! ( chmod 0755 "${dst_file}" )
+               if ! ( chmod 0664 "${dst_file}" )
                then
                        echo "error setting permissions"
                        exit 1
@@ -764,7 +759,7 @@
                        echo "error creating English message catalog"
                        exit 1
                fi
-               if ! ( chmod 0755 "${dst_file}" )
+               if ! ( chmod 0664 "${dst_file}" )
                then
                        echo "error setting permissions"
                        exit 1
@@ -780,7 +775,7 @@
        if [ ! -e "$dst_file" ]
        then
                create_directory_for "$dst_file"
-               if ! ( install -m 0644 "$src_file" "$dst_file" )
+               if ! ( install -m 0664 "$src_file" "$dst_file" )
                then
                        echo "error installing file"
                        exit 1
@@ -844,7 +839,7 @@
 
 # prepare build env
 fetch_all_packages
-umask 022
+umask 002
 prepare_sdk
 build_toolchain
 

Added: GNUnet/contrib/macosx/build-osx-package.sh
===================================================================
--- GNUnet/contrib/macosx/build-osx-package.sh                          (rev 0)
+++ GNUnet/contrib/macosx/build-osx-package.sh  2009-04-05 10:06:03 UTC (rev 
8387)
@@ -0,0 +1,38 @@
+BUILD_DIR=/tmp/GNUnet-build
+RESOURCE_DIR="${BUILD_DIR}/Resources"
+COMPONENT_DIR="${BUILD_DIR}/Frameworks"
+PACKAGE_DIR="${BUILD_DIR}/Package"
+PACKAGE_NAME="${PACKAGE_DIR}/GNUnet.pkg"
+PACKAGE_VERSION=`grep "PACKAGE_VERSION='[0123456789a-z.]*'" ./configure | cut 
-d= -f2 | sed "s/'//g"`
+DMG_NAME="$BUILD_DIR/GNUnet-${PACKAGE_VERSION}.dmg"
+
+PACKAGEMAKER="/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"
+
+# copy package/installer resources
+if [ -e "${RESOURCE_DIR}" ] ; then
+       rm -rf "${RESOURCE_DIR}" 
+fi     
+mkdir -p "${RESOURCE_DIR}"
+cp COPYING "${RESOURCE_DIR}/License.txt"
+
+# final permissions
+chown -R root "${COMPONENT_DIR}"/*
+chgrp -R admin "${COMPONENT_DIR}"/*
+
+# create package
+if [ -e "${PACKAGE_DIR}" ] ; then
+       rm -rf "${PACKAGE_DIR}" 
+fi
+mkdir -p "${PACKAGE_DIR}"
+
+$PACKAGEMAKER -build -v -p "${PACKAGE_NAME}" -f "${COMPONENT_DIR}" -r 
"${RESOURCE_DIR}" -i contrib/macosx/Pkg-Info.plist -d 
contrib/macosx/Pkg-Description.plist
+
+cp README "${PACKAGE_DIR}/README.txt"
+cp README.macosx "${PACKAGE_DIR}/README - Mac OS X.txt"
+
+# create disk image
+if [ -e "$DMG_NAME" ] ; then
+       rm -f "$DMG_NAME"
+fi
+hdiutil create -srcfolder "${PACKAGE_DIR}" -format UDBZ -volname "GNUnet 
${PACKAGE_VERSION} Install" -mode 444 "$DMG_NAME"
+


Property changes on: GNUnet/contrib/macosx/build-osx-package.sh
___________________________________________________________________
Added: svn:executable
   + *





reply via email to

[Prev in Thread] Current Thread [Next in Thread]