aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoraboccia2015-06-09 20:44:20 -0400
committeraboccia2015-06-09 20:44:20 -0400
commitf9571bbcbb865f6473a8f19f72f9121d5cf8b18f (patch)
tree4588229b6a89f31d91d321a15e9d7110179295b8
downloadaur-f9571bbcbb865f6473a8f19f72f9121d5cf8b18f.tar.gz
Initial import
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD84
-rwxr-xr-xcrashplan-pro78
-rw-r--r--crashplan-pro.install11
-rw-r--r--crashplan-pro.service17
5 files changed, 213 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e60a378c414a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = crashplan-pro
+ pkgdesc = An business online/offsite backup solution
+ pkgver = 4.2.0
+ pkgrel = 1
+ url = http://www.crashplan.com/business
+ install = crashplan-pro.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = grep
+ makedepends = cpio
+ makedepends = gzip
+ depends = java-runtime
+ optdepends = swt: needed by some to open the GUI
+ source = http://download1.us.code42.com/installs/linux/install/CrashPlanPRO/CrashPlanPRO_4.2.0_Linux.tgz
+ source = crashplan-pro
+ source = crashplan-pro.service
+ sha256sums = b63a8fc93675c3ee54a2686954f4fc5236abbc5abd886d4ed3d97e6933909aef
+ sha256sums = b306d7da0dd41341512ce80ddcfb21bff8a9bb73ab5018696e69d08b89f7f1b6
+ sha256sums = d8667e149439e4c6f35779a6d04ce5215530049579011eb1db5feb2d6976420e
+
+pkgname = crashplan-pro
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..216fea704847
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,84 @@
+# Maintainer: Anthony Boccia <aboccia [at] boccia [dot] me>
+# Contributer: Griffin Smith <wildgriffin [at] gmail [dot] com>
+# Contributor: Bill Durr <billyburly [at] gmail [dot] com>
+pkgname=crashplan-pro
+pkgver=4.2.0
+pkgrel=1
+pkgdesc="An business online/offsite backup solution"
+url="http://www.crashplan.com/business"
+arch=('i686' 'x86_64')
+license=('custom')
+depends=('java-runtime')
+makedepends=('grep' 'cpio' 'gzip')
+optdepends=('swt: needed by some to open the GUI')
+backup=()
+install=crashplan-pro.install
+source=(http://download1.us.code42.com/installs/linux/install/CrashPlanPRO/CrashPlanPRO_${pkgver}_Linux.tgz
+ crashplan-pro
+ crashplan-pro.service)
+sha256sums=('b63a8fc93675c3ee54a2686954f4fc5236abbc5abd886d4ed3d97e6933909aef'
+ 'b306d7da0dd41341512ce80ddcfb21bff8a9bb73ab5018696e69d08b89f7f1b6'
+ 'd8667e149439e4c6f35779a6d04ce5215530049579011eb1db5feb2d6976420e')
+
+build() {
+ cd $srcdir/CrashPlanPRO-install
+
+ echo ""
+ echo "You must review and agree to the EULA before using Crashplan PRO."
+ echo "You can do so at:"
+ echo " - http://support.crashplan.com/doku.php/eula"
+ echo " - /usr/share/licenses/${pkgname}/LICENSE"
+ echo ""
+
+ echo "" > install.vars
+ echo "JAVACOMMON=`which java`" >> install.vars
+ echo "#APP_BASENAME=CrashPlan" >> install.vars
+ echo "TARGETDIR=/opt/$pkgname" >> install.vars
+ echo "BINSDIR=" >> install.vars
+ echo "MANIFESTDIR=/opt/$pkgname/manifest" >> install.vars
+ echo "INITDIR=" >> install.vars
+ echo "RUNLVLDIR=" >> install.vars
+ NOW=`date +%Y%m%d`
+ echo "INSTALLDATE=$NOW" >> install.vars
+
+ sed -imod "s|Exec=.*|Exec=/opt/$pkgname/bin/CrashPlanDesktop|" scripts/CrashPlan.desktop
+ sed -imod "s|Icon=.*|Icon=/opt/$pkgname/skin/icon_app_64x64.png|" scripts/CrashPlan.desktop
+ sed -imod "s|Categories=.*|Categories=System;|" scripts/CrashPlan.desktop
+}
+
+package() {
+ mkdir -p $pkgdir/opt/$pkgname
+ cd $pkgdir/opt/$pkgname
+
+ cat $srcdir/CrashPlanPRO-install/CrashPlanPRO_$pkgver.cpi | gzip -d -c - | cpio -i --no-preserve-owner
+ chmod 777 $pkgdir/opt/$pkgname/log
+ sed -i "s|<manifestPath>manifest</manifestPath>|<manifestPath>/opt/$pkgname/manifest</manifestPath>|g" $pkgdir/opt/$pkgname/conf/default.service.xml
+
+ mkdir -p $pkgdir/usr/bin
+ ln -s "/opt/$pkgname/bin/CrashPlanDesktop" $pkgdir/usr/bin/CrashPlanDesktop
+
+ # Fix for 32 bit: 64 bit libs cannot be stripped from symbols
+ # so we just remove those libs
+ if [ "$CARCH" = "i686" ]; then
+ rm $pkgdir/opt/$pkgname/*64.so
+ fi
+
+ # Fix for encoding troubles (CrashPlan ticket 178827)
+ # Make sure the daemon is running using the same localization as
+ # the (installing) user
+ echo "" >> $srcdir/CrashPlanPRO-install/scripts/run.conf
+ echo "export LC_ALL=$LANG" >> $srcdir/CrashPlanPRO-install/scripts/run.conf
+
+ install -D -m 644 $srcdir/CrashPlanPRO-install/install.vars $pkgdir/opt/$pkgname/install.vars
+ install -D -m 644 $srcdir/CrashPlanPRO-install/EULA.txt $pkgdir/opt/$pkgname/EULA.txt
+ install -D -m 644 $srcdir/CrashPlanPRO-install/EULA.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -D -m 755 $srcdir/CrashPlanPRO-install/scripts/CrashPlanDesktop $pkgdir/opt/$pkgname/bin/CrashPlanDesktop
+ install -D -m 644 $srcdir/CrashPlanPRO-install/scripts/run.conf $pkgdir/opt/$pkgname/bin/run.conf
+ install -D -m 755 $srcdir/CrashPlanPRO-install/scripts/CrashPlanEngine $pkgdir/opt/$pkgname/bin/CrashPlanEngine
+ install -D -m 755 $srcdir/CrashPlanPRO-install/scripts/CrashPlan.desktop $pkgdir/usr/share/applications/crashplan.desktop
+
+ # rc.d daemon
+ install -D -m 755 $srcdir/crashplan-pro $pkgdir/etc/rc.d/crashplan-pro
+ # systemd unit
+ install -D -m 644 $srcdir/crashplan-pro.service $pkgdir/usr/lib/systemd/system/crashplan-pro.service
+}
diff --git a/crashplan-pro b/crashplan-pro
new file mode 100755
index 000000000000..4ff51355bc6d
--- /dev/null
+++ b/crashplan-pro
@@ -0,0 +1,78 @@
+#!/usr/bin/env bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+if [[ -f /etc/profile.d/jre.sh ]]; then
+ . /etc/profile.d/jre.sh
+elif [[ -f /etc/profile.d/openjdk6.sh ]]; then
+ . /etc/profile.d/openjdk6.sh
+fi
+
+WD=/opt/crashplan-pro
+CRASHPLAN=$WD/bin/CrashPlanEngine
+VARS=$WD/install.vars
+CONFIG=$WD/bin/run.conf
+
+test -f $VARS || exit 0
+test -f $CONFIG || exit 0
+test -f $CRASHPLAN || exit 0
+
+. $VARS
+. $CONFIG
+
+
+
+if [[ ${LC_ALL} ]]; then
+ LOCALE=`sed 's/\..*//g' <<< ${LC_ALL}`
+ export LC_ALL="${LOCALE}.UTF-8"
+elif [[ ${LC_CTYPE} ]]; then
+ LOCALE=`sed 's/\..*//g' <<< ${LC_CTYPE}`
+ export LC_CTYPE="${LOCALE}.UTF-8"
+elif [[ ${LANG} ]]; then
+ LOCALE=`sed 's/\..*//g' <<< ${LANG}`
+ export LANG="${LOCALE}.UTF-8"
+else
+ export LANG="en_US.UTF-8"
+fi
+
+[[ `$CRASHPLAN status` != "CrashPlan Engine is stopped." ]] && PID=`$CRASHPLAN status | sed -r 's/CrashPlan Engine \(pid ([0-9]+)\).*/\1/'`
+
+case "$1" in
+ start)
+ stat_busy "Starting CrashPlan Engine"
+ PWD=`pwd`
+ cd $WD
+ [[ -z "$PID" ]] && nice -n 19 $CRASHPLAN start > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon crashplan
+ stat_done
+ fi
+ cd $PWD
+ ;;
+ stop)
+ stat_busy "Stopping CrashPlan Engine"
+ [[ ! -z "&PID" ]] && $CRASHPLAN stop &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon crashplan
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ status)
+ $CRASHPLAN status
+ ;;
+ *)
+ echo "Usage: $0 <start|stop|restart|status>" >&2
+ exit 3
+ ;;
+esac
+
diff --git a/crashplan-pro.install b/crashplan-pro.install
new file mode 100644
index 000000000000..695278d1ee69
--- /dev/null
+++ b/crashplan-pro.install
@@ -0,0 +1,11 @@
+post_install () {
+ INOTIFY_WATCHES=`cat /proc/sys/fs/inotify/max_user_watches`
+ if [[ $INOTIFY_WATCHES -le 8192 ]]; then
+ echo ""
+ echo "Your system is currently configured to watch $INOTIFY_WATCHES files in real time."
+ echo "CrashPlan recommends using a larger value; see the CrashPlan support site for details."
+ echo "e.g. add the following line to /etc/sysctl.conf "
+ echo " fs.inotify.max_user_watches=1048576"
+ echo ""
+ fi
+}
diff --git a/crashplan-pro.service b/crashplan-pro.service
new file mode 100644
index 000000000000..ddf5d54d5918
--- /dev/null
+++ b/crashplan-pro.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=CrashPlanPRO Backup Engine
+After=network.target
+
+[Service]
+
+Type=forking
+PIDFile=/opt/crashplan-pro/CrashPlanEngine.pid
+EnvironmentFile=/opt/crashplan-pro/bin/run.conf
+
+WorkingDirectory=/opt/crashplan-pro
+
+ExecStart=/opt/crashplan-pro/bin/CrashPlanEngine start
+ExecStop=/opt/crashplan-pro/bin/CrashPlanEngine stop
+
+[Install]
+WantedBy=multi-user.target