Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build script for OSX and .pkg installer #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions packaging/build-osx-pkg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
# Build OS X .pkg installer
rm -rf res
mkdir res
cp -r ../build/bin res/
cp -r ../build/lib res/
cp -r ../build/include res/

cp ../README.md docs/
cp ../LICENSE.txt docs/

rm -rf pkg
mkdir pkg
pkgbuild --identifier org.mlpack.pkg \
--root ./res \
--version 2.0.1 \
--ownership recommended \
pkg/mlpacktools.pkg

productbuild --distribution distribution.plist \
--resources docs \
--package-path pkg \
--version 2.0.1 \
mlpack.pkg
26 changes: 26 additions & 0 deletions packaging/distribution.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-gui-script minSpecVersion="2">
<pkg-ref id="org.mlpack.pkg.osx"/>
<title>mlpack</title>
<organization>mlpack.org</organization>
<options customize="never" require-scripts="false"/>
<!-- <welcome file="README.md" mime-type="text/html" /> -->
<license file="LICENSE.txt" mime-type="text/html" />
<conclusion file="conclusion.txt" mime-type="text/html" />

<volume-check>
<allowed-os-versions>
<os-version min="10.9"/>
</allowed-os-versions>
</volume-check>
<choices-outline>
<line choice="install"/>
</choices-outline>

<choice id="install" visible="true" title="Install Rust" description="Install the Rust compiler, package manager and documentation."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, we should write "Install mlpack".

customLocation="/usr/local">
<pkg-ref id="org.mlpack.install"/>
</choice>

<pkg-ref id="org.mlpack.install" version="0" onConclusion="none">mlpacktools.pkg</pkg-ref>
</installer-gui-script>
13 changes: 13 additions & 0 deletions packaging/docs/conclusion.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
mlpack was installed at

/usr/local/bin

mlpack lib was installed at

/usr/local/lib

mlpack header file was installed at

/usr/local/include/mlpack

Make sure that /usr/local/bin is in your $PATH.