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
Next Next commit
Add libtribler recipe.
  • Loading branch information
ontwikkelaar committed Jun 29, 2015
commit 14839fc544df8f42b7fea64677caf918a9256fb7
23 changes: 23 additions & 0 deletions recipes/libtribler/recipe.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
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
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
Copy link
Member

Choose a reason for hiding this comment

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

Can't the recipe use the zipball from github? Aka https://github.com/Tribler/tribler/archive/devel.zip
Otherwise, please enhance the recipe to prevent downloading /cloning the repo everytime :)

Copy link

Choose a reason for hiding this comment

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

The problem with the archive is that it doesn't download the git submodules. I'll have a look at this and perhaps package the submodules separately, probably the preferred option, or see if I can do something about the cloning.

Copy link
Author

Choose a reason for hiding this comment

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

Tribler uses git submodules for Dispersy and pymdht. It then makes imports such as Tribler.dispersy.etc. and something similar for pydmht. So it expects these two modules to be present inside libtribler (and not externally). Using the direct archive from GitHub means that these submodules will be missing, like Darsestheus stated.
The approach in my latest commit is that libtribler is recursively cloned (as to include submodules) to $PACKAGES_PATH/libtribler. This is only done if it hasn't been cloned before. If it has been cloned before than a git pull command is executed instead to fetch the latest changes. In case any changes were fetched (it checks this by comparing the latest commit hash before and after pulling), or in the case that the build directory is empty, the libtribler directory (in $PACKAGES_PATH/libtribler) is copied to the build directory (in $BUILD_libtribler).


}

function build_libtribler() {
cd $BUILD_libtribler
push_arm
try $HOSTPYTHON setup.py install
pop_arm
}

function postbuild_libtribler() {
true
}