Skip to content

Commit

Permalink
Added packaging script for osx
Browse files Browse the repository at this point in the history
  • Loading branch information
ereOn committed Nov 9, 2013
1 parent aaec550 commit 948964c
Show file tree
Hide file tree
Showing 15 changed files with 787 additions and 13 deletions.
2 changes: 2 additions & 0 deletions packaging/osx/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.pkg
org.freelan.freelan
1 change: 0 additions & 1 deletion packaging/osx/Freelan_installer.pmdoc/01bin-contents.xml

This file was deleted.

1 change: 0 additions & 1 deletion packaging/osx/Freelan_installer.pmdoc/01bin.xml

This file was deleted.

1 change: 0 additions & 1 deletion packaging/osx/Freelan_installer.pmdoc/02etc-contents.xml

This file was deleted.

1 change: 0 additions & 1 deletion packaging/osx/Freelan_installer.pmdoc/02etc.xml

This file was deleted.

1 change: 0 additions & 1 deletion packaging/osx/Freelan_installer.pmdoc/index.xml

This file was deleted.

25 changes: 25 additions & 0 deletions packaging/osx/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
PRODUCT_NAME=freelan
IDENTIFIER=org.freelan.freelan
VERSION=1.1
DAEMON_PACKAGE=${IDENTIFIER}.pkg
FINAL_PACKAGE=${PRODUCT_NAME}_${VERSION}.pkg

default: package

clean:
rm -rf ${IDENTIFIER}
rm -f ${DAEMON_PACKAGE}
rm -f ${FINAL_PACKAGE}

package: clean
mkdir -p ${IDENTIFIER}
mkdir -p ${IDENTIFIER}/usr/local/sbin
mkdir -p ${IDENTIFIER}/usr/local/etc/freelan
mkdir -p ${IDENTIFIER}/usr/local/share/freelan
mkdir -p ${IDENTIFIER}/Library/LaunchDaemons
cp ../../install/bin/freelan ${IDENTIFIER}/usr/local/sbin/
cp ../../freelan/config/freelan.cfg ${IDENTIFIER}/usr/local/etc/freelan/
cp org.freelan.freelan.plist ${IDENTIFIER}/Library/LaunchDaemons/
cp uninstall.sh ${IDENTIFIER}/usr/local/share/freelan/
pkgbuild --root ${IDENTIFIER} --identifier ${IDENTIFIER} --version ${VERSION} --ownership recommended --scripts scripts ${DAEMON_PACKAGE}
productbuild --distribution distribution.xml --resources resources --package-path . --version ${VERSION} ${FINAL_PACKAGE}
9 changes: 1 addition & 8 deletions packaging/osx/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
Mac OS X Installer
-------------------

To build the Mac OS X package, you will need to do the following:
- Compile freelan statically;
- Create some directories, /tmp/freelan_pkg, /tmp/freelan_pkg/bin and /tmp/freelan_pkg/etc;
- Copy freelan binary to /tmp/freelan_pkg/bin;
- Copy freelan.cfg configuration file to /tmp/freelan_pkg/etc/
- Copy the gpl-3.0.txt (from the web or freelan git repository) to /tmp/freelan_pkg/
- Open the Freelan_installer.pmdoc with Package Maker and build.

To build the Mac OS X package, just type "make".
24 changes: 24 additions & 0 deletions packaging/osx/distribution.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
<title>freelan 1.1</title>
<organization>org.freelan</organization>
<domains enable_localSystem="true"/>
<options customize="never" require-scripts="true" rootVolumeOnly="true" />

<!-- Define documents displayed at various steps -->
<license file="license.html" mime-type="text/html" />
<conclusion file="conclusion.html" mime-type="text/html" />

<!-- List all component packages -->
<pkg-ref id="org.freelan.freelan" version="1" auth="root">org.freelan.freelan.pkg</pkg-ref>

<!-- List them again here. They can now be organized as a hierarchy if you want. -->
<choices-outline>
<line choice="org.freelan.freelan"/>
</choices-outline>

<!-- Define each choice above -->
<choice id="org.freelan.freelan" visible="false" title="freelan" description="The freelan daemon" start_selected="true">
<pkg-ref id="org.freelan.freelan"/>
</choice>
</installer-gui-script>
17 changes: 17 additions & 0 deletions packaging/osx/org.freelan.freelan.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.freelan.freelan</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/sbin/freelan</string>
<string>-c</string>
<string>/usr/local/etc/freelan/freelan.cfg</string>
<string>-f</string>
</array>
<key>RunAtLoad</key><true/>
<key>KeepAlive</key><true/>
</dict>
</plist>
8 changes: 8 additions & 0 deletions packaging/osx/resources/conclusion.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
</head>
<body style="font-family: sans-serif;">
<h1>Installation complete !</h1>
<p>You may go to <a href="http://www.freelan.org/download#osx">www.freelan.org</a> for configuration instructions.</p>
</body>
</html>
Loading

0 comments on commit 948964c

Please sign in to comment.