canlock-2b.ebuild 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit eutils multilib toolchain-funcs
  5. MY_P="${P/-/_}"
  6. DESCRIPTION="A library for creating and verifying Usenet cancel locks"
  7. HOMEPAGE="http://packages.qa.debian.org/c/canlock.html"
  8. SRC_URI="mirror://debian/pool/main/c/${PN}/${MY_P}.orig.tar.gz
  9. mirror://debian/pool/main/c/${PN}/${MY_P}-6.diff.gz"
  10. LICENSE="BSD MIT"
  11. SLOT="0"
  12. KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
  13. IUSE="static-libs"
  14. S=${WORKDIR}/${P/-/}
  15. src_prepare() {
  16. epatch "${WORKDIR}"/${MY_P}-6.diff \
  17. "${FILESDIR}"/${P}-make.patch
  18. }
  19. src_compile() {
  20. local targets="shared"
  21. if use static-libs || use test ; then
  22. targets+=" static"
  23. fi
  24. emake CC="$(tc-getCC)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" ${targets}
  25. }
  26. src_install() {
  27. use static-libs && dolib.a src/libcanlock.a
  28. dolib.so src/libcanlock.so.2.0.0
  29. dosym libcanlock.so.2.0.0 /usr/$(get_libdir)/libcanlock.so.2
  30. dosym libcanlock.so.2.0.0 /usr/$(get_libdir)/libcanlock.so
  31. insinto /usr/include
  32. doins include/canlock.h
  33. dodoc CHANGES README doc/HOWTO
  34. }