From 61df1facd2a7f25af352f48180be92db8a89fe66 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 24 Nov 2013 02:42:50 +0000 Subject: semi-working build script for deb packages --- bin/deb-src/DEBIAN/control | 9 +++++++++ bin/deb-src/DEBIAN/postinst | 6 ++++++ bin/deb-src/DEBIAN/preinst | 23 +++++++++++++++++++++++ bin/deb-src/DEBIAN/prerm | 4 ++++ 4 files changed, 42 insertions(+) create mode 100644 bin/deb-src/DEBIAN/control create mode 100755 bin/deb-src/DEBIAN/postinst create mode 100755 bin/deb-src/DEBIAN/preinst create mode 100755 bin/deb-src/DEBIAN/prerm (limited to 'bin/deb-src/DEBIAN') diff --git a/bin/deb-src/DEBIAN/control b/bin/deb-src/DEBIAN/control new file mode 100644 index 00000000..a516dc6d --- /dev/null +++ b/bin/deb-src/DEBIAN/control @@ -0,0 +1,9 @@ +Package: etherpad +Version: 1.3 +Section: base +Priority: optional +Architecture: i386 +Installed-Size: SIZE +Depends: +Maintainer: John McLear +Description: Etherpad is a collaborative editor. diff --git a/bin/deb-src/DEBIAN/postinst b/bin/deb-src/DEBIAN/postinst new file mode 100755 index 00000000..fbc196ae --- /dev/null +++ b/bin/deb-src/DEBIAN/postinst @@ -0,0 +1,6 @@ +#!/bin/bash +# Start the services! + +service etherpad start +echo "Give Etherpad about 3 minutes to install dependencies and start" +rm -f /tmp/etherpad.log /tmp/etherpad.err diff --git a/bin/deb-src/DEBIAN/preinst b/bin/deb-src/DEBIAN/preinst new file mode 100755 index 00000000..51309ef4 --- /dev/null +++ b/bin/deb-src/DEBIAN/preinst @@ -0,0 +1,23 @@ +#!/bin/bash + +# Installs node if it isn't already installed +# +# Don't steamroll over a previously installed node version +# TODO provide a local version of node? + +VER="0.10.4" +ARCH="x86" +if [ `arch | grep 64` ] +then + ARCH="x64" +fi + +# TODO test version +if [ ! -f /usr/local/bin/node ] +then + pushd /tmp + wget -c "http://nodejs.org/dist/v${VER}/node-v${VER}-linux-${ARCH}.tar.gz" + rm -rf /tmp/node-v${VER}-linux-${ARCH} + tar xf node-v${VER}-linux-${ARCH}.tar.gz -C /tmp/ + cp -a /tmp/node-v${VER}-linux-${ARCH}/* /usr/local/ +fi diff --git a/bin/deb-src/DEBIAN/prerm b/bin/deb-src/DEBIAN/prerm new file mode 100755 index 00000000..5e3d0f8a --- /dev/null +++ b/bin/deb-src/DEBIAN/prerm @@ -0,0 +1,4 @@ +#!/bin/bash + +# Stop the appserver: +service etherpad stop || true -- cgit v1.2.3