mydns-1.2.8.31-r1.ebuild 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools eutils
  5. DESCRIPTION="A DNS-Server which gets its data from a MySQL-/PostgreSQL-database"
  6. HOMEPAGE="http://www.mydns.pl/"
  7. SRC_URI="mirror://sourceforge/mydns-ng/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 ~hppa ia64 ~ppc sparc x86"
  11. IUSE="alias debug nls mysql postgres ssl static status"
  12. RDEPEND="mysql? ( virtual/mysql )
  13. nls? ( virtual/libintl )
  14. postgres? ( dev-db/postgresql )
  15. ssl? ( dev-libs/openssl )
  16. virtual/libiconv"
  17. DEPEND="${RDEPEND}
  18. nls? ( >=sys-devel/gettext-0.12 )
  19. sys-devel/bison"
  20. REQUIRED_USE="^^ ( mysql postgres )"
  21. src_prepare() {
  22. epatch "${FILESDIR}/${PN}-1.2.8.27-m4.patch"
  23. eautoreconf
  24. epatch "${FILESDIR}/${P}-texinfo.patch"
  25. }
  26. src_configure() {
  27. econf \
  28. $(use_enable alias) \
  29. $(use_enable nls) \
  30. $(use_enable debug) \
  31. $(use_with mysql) \
  32. $(use_with postgres pgsql) \
  33. $(use_enable static) \
  34. $(use_enable static static-build) \
  35. $(use_enable status) \
  36. $(use_with ssl openssl) \
  37. --without-included-gettext
  38. }
  39. src_install() {
  40. default
  41. dodoc AUTHORS BUGS ChangeLog QUICKSTART* NEWS README* TODO
  42. docinto contrib
  43. dodoc contrib/*.php contrib/*.pl contrib/*.pm contrib/README*
  44. newinitd "${FILESDIR}/mydns.initd" mydns
  45. newconfd "${FILESDIR}/mydns.confd" mydns
  46. ## Avoid file collision
  47. rm -f "${ED}/usr/share/locale/locale.alias"
  48. # Install config file
  49. insinto /etc
  50. newins mydns.conf mydns.conf
  51. fowners root:root /etc/mydns.conf
  52. fperms 0600 /etc/mydns.conf
  53. }
  54. pkg_postinst() {
  55. if use postgres; then
  56. elog "# createdb mydns"
  57. elog "# /usr/sbin/mydns --create-tables | psql mydns"
  58. elog
  59. elog "to create the tables in the PostgreSQL-Database."
  60. elog "For more info see QUICKSTART.postgres."
  61. fi
  62. if use mysql; then
  63. elog "# mysqladmin -u <useruname> -p create mydns"
  64. elog "# /usr/sbin/mydns --create-tables | mysql -u <username> -p mydns"
  65. elog
  66. elog "to create the tables in the MySQL-Database."
  67. elog "For more info see QUICKSTART.mysql."
  68. fi
  69. elog
  70. }