summaryrefslogtreecommitdiffstats
path: root/core/modules/redsocks/module.build
diff options
context:
space:
mode:
authorSebastian2016-04-25 12:01:08 +0200
committerSebastian2016-04-25 12:01:08 +0200
commit5acda3eaeabae9045609539303a8c12c4ce401f1 (patch)
tree7e71975f8570b05aafe2ea6ec0e242a8912387bb /core/modules/redsocks/module.build
parentinitial commit (diff)
downloadmltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.gz
mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.xz
mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.zip
merge with latest dev version
Diffstat (limited to 'core/modules/redsocks/module.build')
-rw-r--r--core/modules/redsocks/module.build24
1 files changed, 24 insertions, 0 deletions
diff --git a/core/modules/redsocks/module.build b/core/modules/redsocks/module.build
new file mode 100644
index 00000000..8c5c4e84
--- /dev/null
+++ b/core/modules/redsocks/module.build
@@ -0,0 +1,24 @@
+#tool/distro specific functions for fetching, building and installing dependencies
+
+
+fetch_source () {
+ mkdir -p src
+ cd src || perror "Could not cd to src"
+ if [ ! -d "redsocks" ]; then
+ git clone "$REQUIRED_GIT" "redsocks" || perror "Could not clone redoscks from github"
+ fi
+ cd redsocks || perror "Could not cd to src/redsocks"
+ git checkout "$REQUIRED_REVISION" || perror "Could not checkout revision $REQUIRED_REVISION"
+}
+
+build () {
+ cd "$MODULE_WORK_DIR/src/redsocks" || perror "src/redsocks not found"
+ make || perror "make failed."
+ mkdir -p "$MODULE_BUILD_DIR/sbin"
+ cp "redsocks" "$MODULE_BUILD_DIR/sbin/" || perror "Could not copy redsocks binary to build dir"
+}
+
+post_copy() {
+ add_user redsocks
+}
+