From 3d1235af060955e271be68240c0ca46bc6d81b03 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 25 Mar 2014 15:24:04 +0100 Subject: [modules] new module naming convention rename $MODULE.{conf,build} to module.{conf,build} --- remote/modules/redsocks/module.build | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 remote/modules/redsocks/module.build (limited to 'remote/modules/redsocks/module.build') 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 +} + -- cgit v1.2.3-55-g7522