Advertisement
Guest User

crashplan-pro 7.2.0

a guest
Sep 18th, 2019
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.05 KB | None | 0 0
  1. # Maintainer: Aaron Miller <aaronm [at] cldtk [dot] com> Contributor: Anthony Boccia <aboccia [at] boccia [dot] me> Contributor: Griffin Smith <wildgriffin [at] gmail [dot] com> Contributor: Bill Durr
  2. # <billyburly [at] gmail [dot] com>
  3. pkgname=crashplan-pro
  4. _pkgname=crashplan
  5. pkgver=7.2.0
  6. _pkgtimestamp=1525200006720
  7. _pkgbuild=1641
  8. pkgrel=2
  9. pkgdesc="An business online/offsite backup solution"
  10. url="http://www.crashplan.com/business"
  11. arch=('x86_64')
  12. license=('custom')
  13. depends=('bash' 'java-runtime-headless=8' 'alsa-lib' 'gconf' 'gtk3' 'libxss')
  14. makedepends=('cpio')
  15. conflicts=('crashplan')
  16. install=crashplan-pro.install
  17. source=(https://www.crashplanpro.com/client/installers/CrashPlanSmb_${pkgver}_${_pkgtimestamp}_${_pkgbuild}_Linux.tgz
  18.         crashplan-pro
  19.         crashplan-pro.service)
  20. sha256sums=('0805b11e475868f0cc840a64200a5d198998765590af08820437c691258f10b2'
  21.             'b306d7da0dd41341512ce80ddcfb21bff8a9bb73ab5018696e69d08b89f7f1b6'
  22.             'fd4c80dbd2ea3dcfc9966832a599f1bb310f705f813474d1900c1867ea55155c')
  23.  
  24. build() {
  25.   cd $srcdir/crashplan-install
  26.  
  27.   echo ""
  28.   echo "You must review and agree to the EULA before using CrashPlan PRO."
  29.   echo "You can do so at:"
  30.   echo "  - https://support.code42.com/Terms_and_conditions/Legal_terms_and_conditions/CrashPlan_for_Small_Business_EULA"
  31.   echo ""
  32.  
  33.   echo "" > install.vars
  34.   echo "JAVACOMMON=`which java`" >> install.vars
  35.   echo "APP_BASENAME=CrashPlan" >> install.vars
  36.   echo "TARGETDIR=/opt/$_pkgname" >> install.vars
  37.   echo "BINSDIR=" >> install.vars
  38.   echo "MANIFESTDIR=/opt/$_pkgname/manifest" >> install.vars
  39.   echo "INITDIR=" >> install.vars
  40.   echo "RUNLVLDIR=" >> install.vars
  41.   NOW=`date +%Y%m%d`
  42.   echo "INSTALLDATE=$NOW" >> install.vars
  43.  
  44.   sed -imod 's|\. $TARGETDIR/bin/run\.conf|:|' scripts/CrashPlanEngine
  45.   sed -imod "s|Exec=.*|Exec=/opt/$_pkgname/bin/CrashPlanDesktop|" scripts/CrashPlan.desktop
  46.   sed -imod "s|Icon=.*|Icon=/opt/$_pkgname/bin/icon_app.png|" scripts/CrashPlan.desktop
  47.   sed -imod "s|Categories=.*|Categories=System;|" scripts/CrashPlan.desktop
  48. }
  49.  
  50. package() {
  51.   mkdir -p $pkgdir/opt/$_pkgname
  52.   cd $pkgdir/opt/$_pkgname
  53.  
  54.   cat $srcdir/crashplan-install/CrashPlanSmb_$pkgver.cpi | gzip -d -c - | cpio -i --no-preserve-owner
  55.  
  56.   chmod 777 log
  57.   chmod 775 electron/crashplan
  58.  
  59.   mv app.asar electron/resources
  60.  
  61.   sed -i "s|<backupConfig>|<backupConfig>\n\t\t\t<manifestPath>/opt/$_pkgname/manifest</manifestPath>|g" conf/default.service.xml
  62.  
  63.   mkdir -p $pkgdir/usr/bin
  64.   ln -s "/opt/$_pkgname/bin/CrashPlanDesktop" $pkgdir/usr/bin/CrashPlanDesktop
  65.  
  66.   # Fix for encoding troubles (CrashPlan ticket 178827)
  67.   # Make sure the daemon is running using the same localization as
  68.   # the (installing) user
  69.   echo "" >> $srcdir/crashplan-install/scripts/run.conf
  70.   echo "LC_ALL=$LANG" >> $srcdir/crashplan-install/scripts/run.conf
  71.  
  72.   # Prevent crashplan from restarting itself repeatedly..
  73.   echo '#!/bin/sh' > bin/restartLinux.sh
  74.   echo 'exit' >> bin/restartLinux.sh
  75.  
  76.   install -D -m 644 $srcdir/crashplan-install/install.vars install.vars
  77.   install -D -m 755 $srcdir/crashplan-install/scripts/CrashPlanDesktop bin/CrashPlanDesktop
  78.   install -D -m 644 $srcdir/crashplan-install/scripts/run.conf bin/run.conf
  79.   install -D -m 755 $srcdir/crashplan-install/scripts/CrashPlanEngine bin/CrashPlanEngine
  80.   install -D -m 755 $srcdir/crashplan-install/scripts/CrashPlan.desktop $pkgdir/usr/share/applications/crashplan.desktop
  81.  
  82.   # rc.d daemon
  83.   install -D -m 755 $srcdir/crashplan-pro $pkgdir/etc/rc.d/crashplan-pro
  84.   # systemd unit
  85.   install -D -m 644 $srcdir/crashplan-pro.service $pkgdir/usr/lib/systemd/system/crashplan-pro.service
  86. }
  87.  
  88. post_install() {
  89.   INOTIFY_WATCHES=$(cat /proc/sys/fs/inotify/max_user_watches)
  90.   if [[ $INOTIFY_WATCHES -le 8192 ]]; then
  91.     echo ""
  92.     echo "Your Linux system is currently configured to watch $INOTIFY_WATCHES files in real time."
  93.     echo "CrashPlan recommends using a larger value; see the the arch wiki for details:"
  94.     echo "  - https://wiki.archlinux.org/index.php/CrashPlan#Real_time_protection"
  95.     echo ""
  96.   fi
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement