---
name: ddrescue
version: 1.17
origin: sysutils/ddrescue
comment: Data recovery tool
arch: freebsd:10:x86:64
www: http://www.gnu.org/software/ddrescue/ddrescue.html
maintainer: jharris@widomaker.com
prefix: /usr/local
licenselogic: single
licenses:
- GPLv3
flatsize: 225584
desc: |
  GNU ddrescue is a data recovery tool. It copies data from one file or
  block device (hard disc, cdrom, etc) to another, trying hard to rescue
  data in case of read errors. Ddrescue does not truncate the output file
  if not asked to. So, every time you run it on the same output file, it
  tries to fill in the gaps. The basic operation of ddrescue is fully
  automatic. That is, you don't have to wait for an error, stop the
  program, read the log, run it in reverse mode, etc. If you use the
  logfile feature of ddrescue, the data is rescued very efficiently (only
  the needed blocks are read). Also you can interrupt the rescue at any
  time and resume it later at the same point.

  Automatic merging of backups: If you have two or more damaged copies of
  a file, cdrom, etc, and run ddrescue on all of them, one at a time,
  with the same output file, you will probably obtain a complete and
  error-free file. This is so because the probability of having damaged
  areas at the same places on different input files is very low. Using
  the logfile, only the needed blocks are read from the second and
  successive copies.

  WWW: http://www.gnu.org/software/ddrescue/ddrescue.html
categories:
- sysutils
options: {DOCS: on}
files:
  /usr/local/bin/ddrescue: 73046e6faa01dc64b62cd4f3a5d63a4dbed819fdbce24064d9af4b3d1605e635
  /usr/local/bin/ddrescuelog: 35311010c4d924a5073cedfa1bffb579e8f41c2242c5bc502c16ad2d1a5287d2
  /usr/local/man/man1/ddrescue.1.gz: 0a349336d9be55831d631b6a76e7ad529ad4ef5bc6386626829fdf915bb30e8a
  /usr/local/man/man1/ddrescuelog.1.gz: 83dde0630bc929de3ecfcd77a4ae79d51c873a10f0bd65d4649c108755e798e5
  /usr/local/share/licenses/ddrescue-1.17/catalog.mk: f52125d56fa59e1c4b5f5ef9dc63bbb18e2aa37689c221e046c47929f64e6837
  /usr/local/share/licenses/ddrescue-1.17/LICENSE: feb018c22cc4001bbeccc04db5569c5aeaec18f1ebbee51a52d56c251418e243
  /usr/local/share/licenses/ddrescue-1.17/GPLv3: 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903
  /usr/local/info/ddrescue.info: d1414bada13ab071399892ee66cca78f28135f3dcf7d4ee443624b534ce4f650
  /usr/local/share/doc/ddrescue/AUTHORS: ec78eda1166a5993603f5b47ff1d77ee0e473938312b2d2ece6cc33c4bd3d374
  /usr/local/share/doc/ddrescue/ChangeLog: 7ef7b157d347ba5e557fb8f13e693fdcff8b6627584fbb4592b84b10f195a9ae
  /usr/local/share/doc/ddrescue/NEWS: 8381c9b1ae3cda29efa0f312a115c69c6dc26d0c120a9065dce219c977463485
  /usr/local/share/doc/ddrescue/README: 76e3784d8fe80c8dee9c57df4ffaef9178862e10999b156c78c230aa0c0fedb3
directories:
  /usr/local/share/licenses/ddrescue-1.17/: n
  /usr/local/share/licenses/: y
  /usr/local/share/doc/ddrescue/: n
scripts:
  post-install: |
    cd /usr/local
    file=/usr/local/info/ddrescue.info
    install-info --quiet /usr/local/info/ddrescue.info ${file%25/*}/dir
  pre-deinstall: |
    cd /usr/local
    #rmdir /usr/local/share/licenses 2>/dev/null || true
  post-deinstall: |
    cd /usr/local
    file=/usr/local/info/ddrescue.info
    install-info --quiet --delete /usr/local/info/ddrescue.info ${file%25/*}/dir
    if [ $(info -d ${file%25/*}  --output - 2>/dev/null | grep -c '^*') -eq 1 ]; then
      rm -f ${file%25/*}/dir
    fi
    if [ ${file%25/*} != "/usr/local/info" ]; then
       rmdir ${file%25/*} 2> /dev/null || true
    fi
