1 # Maintainer: Bill Durr <billyburly [at] gmail [dot] com>
5 pkgdesc="an online/offsite backup solution"
6 url="http://www.crashplan.com"
9 depends=('java-runtime')
10 makedepends=('grep' 'cpio' 'gzip')
12 install=crashplan.install
13 source=(http://download.crashplan.com/installs/linux/install/CrashPlan/CrashPlan_${pkgver}_Linux.tgz
15 md5sums=('0260aafd45577be89281eb436aefce39'
16 '809855c6b043dfa4bada58e522fe61e5')
19 cd $srcdir/CrashPlan-install
22 echo "You must review and agree to the EULA before installation."
24 echo -n "Press enter to read the EULA. "
30 while [ "${agreed}" == "0" ] ; do
32 echo -n "Do you accept and agree to be bound by the EULA? (yes/no) "
39 echo "If you do not agree to the license then CrashPlan may not be installed. Exiting.";
45 echo "" > install.vars
46 echo "JAVACOMMON=$JAVA_HOME/bin/java" >> install.vars
47 echo "TARGETDIR=/opt/$pkgname" >> install.vars
48 echo "BINSDIR=" >> install.vars
49 echo "MANIFESTDIR=/opt/$pkgname/manifest" >> install.vars
50 echo "INITDIR=" >> install.vars
51 echo "RUNLVLDIR=" >> install.vars
53 echo "INSTALLDATE=$NOW" >> install.vars
54 cat .defaults >> install.vars
56 sed -imod "s|Exec=.*|Exec=/opt/$pkgname/bin/CrashPlanDesktop|" $srcdir/CrashPlan-install/scripts/CrashPlan.desktop
57 sed -imod "s|Icon=.*|Icon=/opt/$pkgname/skin/icon_app_64x64.png|" $srcdir/CrashPlan-install/scripts/CrashPlan.desktop
58 sed -imod "s|Categories=.*|Categories=System;|" $srcdir/CrashPlan-install/scripts/CrashPlan.desktop
62 mkdir -p $pkgdir/opt/$pkgname
63 cd $pkgdir/opt/$pkgname
65 cat $srcdir/CrashPlan-install/CrashPlan_$pkgver.cpi | gzip -d -c - | cpio -i --no-preserve-owner
66 chmod 777 $pkgdir/opt/$pkgname/log
67 sed -i "s|<manifestPath>manifest</manifestPath>|<manifestPath>/opt/$pkgname/manifest</manifestPath>|g" $pkgdir/opt/$pkgname/conf/default.service.xml
69 mkdir -p $pkgdir/usr/bin
70 ln -s "/opt/$pkgname/bin/CrashPlanDesktop" $pkgdir/usr/bin/CrashPlanDesktop
72 install -D -m 644 $srcdir/CrashPlan-install/install.vars $pkgdir/opt/$pkgname/install.vars
73 install -D -m 644 $srcdir/CrashPlan-install/EULA.txt $pkgdir/opt/$pkgname/EULA.txt
74 install -D -m 644 $srcdir/CrashPlan-install/EULA.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
75 install -D -m 755 $srcdir/CrashPlan-install/scripts/CrashPlanDesktop $pkgdir/opt/$pkgname/bin/CrashPlanDesktop
76 install -D -m 644 $srcdir/CrashPlan-install/scripts/run.conf $pkgdir/opt/$pkgname/bin/run.conf
77 install -D -m 755 $srcdir/CrashPlan-install/scripts/CrashPlanEngine $pkgdir/opt/$pkgname/bin/CrashPlanEngine
78 install -D -m 755 $srcdir/CrashPlan-install/scripts/CrashPlan.desktop $pkgdir/usr/share/applications/crashplan.desktop
80 install -D -m 755 $srcdir/crashplan $pkgdir/etc/rc.d/crashplan