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 libtribler recipe #405

Closed
wants to merge 2 commits into from
Closed
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
Prev Previous commit
Only clone repo when needed, else fetch latest changes using git pull…
…. Alsp stores a cache of libtribler in packages as well.
  • Loading branch information
ontwikkelaar committed Jul 1, 2015
commit 1db0a4cb9a6097b3f406fbedf9a4b4c0f6bc6131
29 changes: 24 additions & 5 deletions recipes/libtribler/recipe.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
#!/bin/bash
VERSION_libtribler=${VERSION_libtribler:-devel}
DEPS_libtribler=(kivy python openssl m2crypto twisted sqlite3 pyasn1 apsw cherrypy netifaces libtorrent libnacl libsodium pil plyvel requests)
BUILD_libtribler=$BUILD_PATH/libtribler/tribler-git
BUILD_libtribler=$BUILD_PATH/libtribler
RECIPE_libtribler=$RECIPES_PATH/libtribler

function prebuild_libtribler() {

# Clone repo so all submodules are included:
cd $BUILD_PATH/libtribler
git clone --recursive https://github.com/tribler/tribler.git tribler-git
cd $PACKAGES_PATH/libtribler
LIBTRIBLER_CHANGED=1
if [ ! -d ./tribler-git ]; then
# Clone repo so all submodules are included:
try git clone --recursive https://github.com/tribler/tribler.git tribler-git
else
# Pull latest changes and check whether anything changed at all:
pushd ./tribler-git
OLD_LATEST_COMMIT_HASH="$(git log -n 1 --pretty=format:'%H')"
try git pull origin $VERSION_libtribler
NEW_LATEST_COMMIT_HASH="$(git log -n 1 --pretty=format:'%H')"
if [ "$OLD_LATEST_COMMIT_HASH" == "$NEW_LATEST_COMMIT_HASH" ]; then
LIBTRIBLER_CHANGED=0
fi
popd
fi

# Copy repo to build folder when build folder is empty or libtribler has changed:
if [ ! -d ${BUILD_libtribler}/tribler-git ] || [ $LIBTRIBLER_CHANGED ]; then
try rsync -a ./tribler-git ${BUILD_libtribler}
fi

}

function build_libtribler() {
cd $BUILD_libtribler
cd ${BUILD_libtribler}/tribler-git
push_arm
try $HOSTPYTHON setup.py install
pop_arm
Expand Down