scrollkeeper-dtd-1.0.ebuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="3"
  4. DTD_FILE="scrollkeeper-omf.dtd"
  5. DESCRIPTION="DTD from the Scrollkeeper package"
  6. HOMEPAGE="http://scrollkeeper.sourceforge.net/"
  7. SRC_URI="http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/${DTD_FILE}"
  8. LICENSE="FDL-1.1"
  9. SLOT="1.0"
  10. KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-solaris ~x86-solaris"
  11. IUSE=""
  12. RDEPEND=">=dev-libs/libxml2-2.4.19"
  13. DEPEND="${RDEPEND}
  14. !<app-text/scrollkeeper-9999-r1"
  15. src_unpack() { :; }
  16. src_configure() { :; }
  17. src_compile() { :; }
  18. src_install() {
  19. insinto /usr/share/xml/scrollkeeper/dtds
  20. doins "${DISTDIR}/${DTD_FILE}"
  21. }
  22. pkg_postinst() {
  23. einfo "Installing catalog..."
  24. # Install regular DOCTYPE catalog entry
  25. "${EROOT}"usr/bin/xmlcatalog --noout --add "public" \
  26. "-//OMF//DTD Scrollkeeper OMF Variant V1.0//EN" \
  27. "${EROOT}"usr/share/xml/scrollkeeper/dtds/${DTD_FILE} \
  28. "${EROOT}"etc/xml/catalog
  29. # Install catalog entry for calls like: xmllint --dtdvalid URL ...
  30. "${EROOT}"usr/bin/xmlcatalog --noout --add "system" \
  31. "${SRC_URI}" \
  32. "${EROOT}"usr/share/xml/scrollkeeper/dtds/${DTD_FILE} \
  33. "${EROOT}"etc/xml/catalog
  34. }
  35. pkg_postrm() {
  36. # Remove all sk-dtd from the cache
  37. einfo "Cleaning catalog..."
  38. "${EROOT}"usr/bin/xmlcatalog --noout --del \
  39. "${EROOT}"usr/share/xml/scrollkeeper/dtds/${DTD_FILE} \
  40. "${EROOT}"etc/xml/catalog
  41. }