rdate-1.4-r4.ebuild 806 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit flag-o-matic
  5. DESCRIPTION="use TCP or UDP to retrieve the current time of another machine"
  6. HOMEPAGE="http://www.apps.ietf.org/rfc/rfc868.html"
  7. SRC_URI="ftp://people.redhat.com/sopwith/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86"
  11. IUSE="ipv6"
  12. DEPEND=""
  13. src_prepare() {
  14. sed -i \
  15. -e '/^CFLAGS=/d' \
  16. -e '/^rdate: /,+1d' \
  17. -e '/\tinstall/s:\([^ ]\+\)$:$(DESTDIR)&:' \
  18. Makefile || die "Sed failed!"
  19. }
  20. src_compile() {
  21. use ipv6 && append-cppflags "-DINET6"
  22. tc-export CC
  23. emake
  24. }
  25. src_install(){
  26. emake DESTDIR="${D}" install
  27. newinitd "${FILESDIR}"/rdate-initd-1.4-r3 rdate
  28. newconfd "${FILESDIR}"/rdate-confd rdate
  29. }