summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/Dockerfile11
-rwxr-xr-xbuild/build-inner.sh12
-rwxr-xr-xbuild/build.sh33
3 files changed, 56 insertions, 0 deletions
diff --git a/build/Dockerfile b/build/Dockerfile
new file mode 100644
index 0000000..432972e
--- /dev/null
+++ b/build/Dockerfile
@@ -0,0 +1,11 @@
+FROM debian:jessie
+
+RUN apt-get update && apt-get -y install \
+ libgnutls28-dev \
+ gnutls-bin \
+ pkg-config \
+ build-essential
+
+RUN useradd ircd
+RUN mkdir /inspircd
+COPY build-inner.sh /build-inner.sh
diff --git a/build/build-inner.sh b/build/build-inner.sh
new file mode 100755
index 0000000..84f1835
--- /dev/null
+++ b/build/build-inner.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+cd /inspircd-build
+
+./configure \
+ --disable-interactive \
+ --enable-gnutls \
+ --enable-epoll \
+ --prefix=/inspircd
+
+make
+make INSTUID=ircd install
diff --git a/build/build.sh b/build/build.sh
new file mode 100755
index 0000000..1f9fa9a
--- /dev/null
+++ b/build/build.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+INSPIRCD_VERSION=2.0.18
+URL="https://github.com/inspircd/inspircd/archive/v${INSPIRCD_VERSION}.tar.gz"
+
+cd "$( dirname "$0" )"
+
+# Build build environment
+echo "Building inspircd-build image."
+docker build -t "inspircd-build" .
+
+# Get source
+if [ ! -d "inspircd-${INSPIRCD_VERSION}" ]; then
+ echo "Downloading InspIRCd"
+ wget $URL
+ tar xzf "v${INSPIRCD_VERSION}.tar.gz"
+fi
+
+rm -rf ../inspircd && mkdir ../inspircd
+
+# Start build environment
+echo "Starting build..."
+docker run \
+ -v $(pwd)/inspircd-${INSPIRCD_VERSION}:/inspircd-build \
+ -v $(pwd)/../inspircd:/inspircd \
+ inspircd-build \
+ /build-inner.sh
+
+echo "\n***********************************************************************"
+echo "Build Complete!"
+echo "You may now build the inspircd image moving to the root of the"
+echo "repository and runng and running:\n"
+echo " docker build -t inspircd .\n"