flexbackup-1.2.1-r13.ebuild 2.7 KB

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