flexbackup-1.2.1-r12.ebuild 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit eutils versionator
  4. DESCRIPTION="Flexible backup script using perl"
  5. HOMEPAGE="http://flexbackup.sourceforge.net/"
  6. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
  7. LICENSE="GPL-2"
  8. SLOT="0"
  9. KEYWORDS="amd64 hppa ppc x86"
  10. IUSE=""
  11. RDEPEND="app-arch/mt-st"
  12. DEPEND="${RDEPEND}"
  13. src_unpack() {
  14. unpack ${A}
  15. cd "${S}"
  16. # Patch from upstream adds optional lzma compression mode.
  17. epatch "${FILESDIR}"/${P}-lzma.patch
  18. # Fix bug #116510: cannot back up remote machines after patch CAN-2005-2965
  19. epatch "${FILESDIR}"/${P}-secure-tempfile.patch
  20. # Fix bug #96334: incorrectly determines bash 3.x to be bash 1.x
  21. epatch "${FILESDIR}"/${P}-bash.patch
  22. # Fix bug #171205: specifies wrong command line option for mbuffer / other small enhancements
  23. epatch "${FILESDIR}"/${P}-mbuffer-switch.patch
  24. # Fix bug #173672: remote host buffer test is broken
  25. epatch "${FILESDIR}"/${P}-remote-bufftest.patch
  26. # Fix bug #178126: subtle subtree pruning issue / other small issues
  27. epatch "${FILESDIR}"/${P}-prune.patch
  28. # Fix bug #184560: fails to back up targets with spaces in their names in some modes
  29. epatch "${FILESDIR}"/${P}-spaces-in-filenames.patch
  30. # Fix bug #190357: fails on very large files with afio back end
  31. epatch "${FILESDIR}"/${P}-afio-large-files.patch
  32. # Fix bug #235416: prevent normal status message during conf file read from going to stderr
  33. epatch "${FILESDIR}"/${P}-quieten.patch
  34. # Fix bug #331673: perl 5.12 deprecation warnings.
  35. epatch "${FILESDIR}"/${P}-perl-5.12-deprecation-warning.patch
  36. # Fix bug #495232: perl 5.16 deprecation warnings.
  37. epatch "${FILESDIR}"/${P}-perl-5.16-deprecation-warning.patch
  38. sed -i \
  39. -e '/^\$type = /s:afio:tar:' \
  40. -e "/^\$buffer = /s:'buffer':'false':" \
  41. flexbackup.conf \
  42. || die "Failed to set modified configuration defaults."
  43. MY_PV=$(replace_all_version_separators '_')
  44. sed -i \
  45. -e "/^[[:blank:]]*my \$ver = /s:${MY_PV}:&-${PR}:" \
  46. flexbackup \
  47. || die "Failed to apply ebuild revision to internal version string."
  48. }
  49. src_install() {
  50. dodir /etc /usr/bin /usr/share/man/man{1,5}
  51. emake install \
  52. PREFIX="${D}"/usr \
  53. CONFFILE="${D}"/etc/flexbackup.conf \
  54. || die "emake install failed"
  55. dodoc CHANGES CREDITS README TODO
  56. dohtml faq.html
  57. }
  58. pkg_postinst() {
  59. elog "Please edit your /etc/flexbackup.conf file to suit your"
  60. elog "needs. If you are using devfs, the tape device should"
  61. elog "be set to /dev/tapes/tape0/mtn. If you need to use any"
  62. elog "archiver other than tar, please emerge it separately."
  63. }