summaryrefslogtreecommitdiffstats
path: root/remote/modules/redsocks/module.build
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules/redsocks/module.build')
-rw-r--r--remote/modules/redsocks/module.build24
1 files changed, 24 insertions, 0 deletions
diff --git a/remote/modules/redsocks/module.build b/remote/modules/redsocks/module.build
new file mode 100644
index 00000000..f6a05350
--- /dev/null
+++ b/remote/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_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
+}
+