Skip to content

Commit 948964c

Browse files
committed
Added packaging script for osx
1 parent aaec550 commit 948964c

File tree

15 files changed

+787
-13
lines changed

15 files changed

+787
-13
lines changed

packaging/osx/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.pkg
2+
org.freelan.freelan

packaging/osx/Freelan_installer.pmdoc/01bin-contents.xml

Lines changed: 0 additions & 1 deletion
This file was deleted.

packaging/osx/Freelan_installer.pmdoc/01bin.xml

Lines changed: 0 additions & 1 deletion
This file was deleted.

packaging/osx/Freelan_installer.pmdoc/02etc-contents.xml

Lines changed: 0 additions & 1 deletion
This file was deleted.

packaging/osx/Freelan_installer.pmdoc/02etc.xml

Lines changed: 0 additions & 1 deletion
This file was deleted.

packaging/osx/Freelan_installer.pmdoc/index.xml

Lines changed: 0 additions & 1 deletion
This file was deleted.

packaging/osx/Makefile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
PRODUCT_NAME=freelan
2+
IDENTIFIER=org.freelan.freelan
3+
VERSION=1.1
4+
DAEMON_PACKAGE=${IDENTIFIER}.pkg
5+
FINAL_PACKAGE=${PRODUCT_NAME}_${VERSION}.pkg
6+
7+
default: package
8+
9+
clean:
10+
rm -rf ${IDENTIFIER}
11+
rm -f ${DAEMON_PACKAGE}
12+
rm -f ${FINAL_PACKAGE}
13+
14+
package: clean
15+
mkdir -p ${IDENTIFIER}
16+
mkdir -p ${IDENTIFIER}/usr/local/sbin
17+
mkdir -p ${IDENTIFIER}/usr/local/etc/freelan
18+
mkdir -p ${IDENTIFIER}/usr/local/share/freelan
19+
mkdir -p ${IDENTIFIER}/Library/LaunchDaemons
20+
cp ../../install/bin/freelan ${IDENTIFIER}/usr/local/sbin/
21+
cp ../../freelan/config/freelan.cfg ${IDENTIFIER}/usr/local/etc/freelan/
22+
cp org.freelan.freelan.plist ${IDENTIFIER}/Library/LaunchDaemons/
23+
cp uninstall.sh ${IDENTIFIER}/usr/local/share/freelan/
24+
pkgbuild --root ${IDENTIFIER} --identifier ${IDENTIFIER} --version ${VERSION} --ownership recommended --scripts scripts ${DAEMON_PACKAGE}
25+
productbuild --distribution distribution.xml --resources resources --package-path . --version ${VERSION} ${FINAL_PACKAGE}

packaging/osx/README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
Mac OS X Installer
22
-------------------
33

4-
To build the Mac OS X package, you will need to do the following:
5-
- Compile freelan statically;
6-
- Create some directories, /tmp/freelan_pkg, /tmp/freelan_pkg/bin and /tmp/freelan_pkg/etc;
7-
- Copy freelan binary to /tmp/freelan_pkg/bin;
8-
- Copy freelan.cfg configuration file to /tmp/freelan_pkg/etc/
9-
- Copy the gpl-3.0.txt (from the web or freelan git repository) to /tmp/freelan_pkg/
10-
- Open the Freelan_installer.pmdoc with Package Maker and build.
11-
4+
To build the Mac OS X package, just type "make".

packaging/osx/distribution.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<installer-gui-script minSpecVersion="1">
3+
<title>freelan 1.1</title>
4+
<organization>org.freelan</organization>
5+
<domains enable_localSystem="true"/>
6+
<options customize="never" require-scripts="true" rootVolumeOnly="true" />
7+
8+
<!-- Define documents displayed at various steps -->
9+
<license file="license.html" mime-type="text/html" />
10+
<conclusion file="conclusion.html" mime-type="text/html" />
11+
12+
<!-- List all component packages -->
13+
<pkg-ref id="org.freelan.freelan" version="1" auth="root">org.freelan.freelan.pkg</pkg-ref>
14+
15+
<!-- List them again here. They can now be organized as a hierarchy if you want. -->
16+
<choices-outline>
17+
<line choice="org.freelan.freelan"/>
18+
</choices-outline>
19+
20+
<!-- Define each choice above -->
21+
<choice id="org.freelan.freelan" visible="false" title="freelan" description="The freelan daemon" start_selected="true">
22+
<pkg-ref id="org.freelan.freelan"/>
23+
</choice>
24+
</installer-gui-script>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>Label</key>
6+
<string>org.freelan.freelan</string>
7+
<key>ProgramArguments</key>
8+
<array>
9+
<string>/usr/local/sbin/freelan</string>
10+
<string>-c</string>
11+
<string>/usr/local/etc/freelan/freelan.cfg</string>
12+
<string>-f</string>
13+
</array>
14+
<key>RunAtLoad</key><true/>
15+
<key>KeepAlive</key><true/>
16+
</dict>
17+
</plist>

0 commit comments

Comments
 (0)