From 71313a5dcddb8b5c7c77947fff86ec9b0f953819 Mon Sep 17 00:00:00 2001 From: Chirayu Desai Date: Fri, 5 Dec 2014 17:30:24 +0000 Subject: [PATCH] Add recipe for orphilia_dropbox * Based off http://bb.haikuports.org/haikuports/issue/61/orphilia-wip-recipe-needs-to-be-added-to --- .../orphilia_dropbox-1.recipe | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 haiku-apps/orphilia_dropbox/orphilia_dropbox-1.recipe diff --git a/haiku-apps/orphilia_dropbox/orphilia_dropbox-1.recipe b/haiku-apps/orphilia_dropbox/orphilia_dropbox-1.recipe new file mode 100644 index 000000000..3b49e9f17 --- /dev/null +++ b/haiku-apps/orphilia_dropbox/orphilia_dropbox-1.recipe @@ -0,0 +1,76 @@ +DESCRIPTION="Orphilia is an open-source Dropbox client written in Python. \ +Project's main goal is to provide an open-source desktop Dropbox client for \ +platforms, that aren't supported (for example, Haiku). Orphilia is \ +script-based which makes it platform-independent. It's written using \ +Dropbox SDK from here, which has been integrated \ +into Orphilia's source code and is not required for installation." +SUMMARY="Open-source Dropbox client." +HOMEPAGE="https://github.com/ksiazkowicz/orphilia-dropbox" +SRC_URI="git+https://github.com/ksiazkowicz/orphilia-dropbox.git#f692f26793a48e2742f12c20767f0f22a9ff39af" +REVISION="1" +ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" + +# Should be called after activating package +#POST_INSTALL_SCRIPTS=" +# \"orphilia.py --configuration\" +# " + +PROVIDES=" + orphilia_dropbox = $portVersion + cmd:orphilia_haiku_notify = $portVersion + cmd:orphilia.py = $portVersion + " + +BUILD_PREREQUIRES=" + haiku_devel >= $haikuVersion + cmd:gcc + cmd:python + cmd:sed + " + + +BUILD_REQUIRES=" + haiku_devel >= $haikuVersion + python_setuptools + " + +REQUIRES=" + pathtools + python_setuptools + urllib3 + watchdog + cmd:python + " + +COPYRIGHT="2011-2014 Maciej Janiszewski" +LICENSE="MIT" + +BUILD() +{ + python build.py +} + +INSTALL() +{ + # GENERIC: all python_setuptools-based installs need this + export PATH="$portPackageLinksDir/cmd~python/bin:$PATH" + pythonVersion=$(python --version 2>&1 | sed 's/Python //' | head -c3) + installLocation=$prefix/lib/python$pythonVersion/vendor-packages/ + export PYTHONPATH=$installLocation:$PYTHONPATH + mkdir -p $installLocation + + cd built/dependencies + python setup.py install \ + --single-version-externally-managed \ + --root=/ --prefix=$prefix + cd ../.. + + mkdir -p $installLocation/orphilia_dropbox + cp -R built/* $installLocation/orphilia_dropbox + + mkdir -p $binDir + + # create symlink which could be directly accessed + ln -s $installLocation/orphilia_dropbox/notify/haiku-notify $binDir/orphilia_haiku-notify + ln -s $installLocation/orphilia_dropbox/orphilia.py $binDir/orphilia.py +}