logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://anongit.hacktivis.me/git/overlay.git/

xbel-dtd-1.0.ebuild (1375B)


  1. # Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. DTD_FILE="xbel-${PV}.dtd"
  5. DTD_DIR="/usr/share/xml/xbel/"
  6. DESCRIPTION="XML Bookmark Exchange Language (XBEL), DTD"
  7. HOMEPAGE="https://pyxml.sourceforge.net/topics/xbel/"
  8. SRC_URI="https://pyxml.sourceforge.net/topics/dtds/${DTD_FILE}"
  9. S="${WORKDIR}"
  10. LICENSE=""
  11. SLOT="0"
  12. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-solaris"
  13. RDEPEND=">=dev-libs/libxml2-2.4.19"
  14. src_unpack() { :; }
  15. src_configure() { :; }
  16. src_compile() { :; }
  17. src_install() {
  18. insinto "${DTD_DIR}"
  19. doins "${DISTDIR}/${DTD_FILE}"
  20. }
  21. pkg_postinst() {
  22. einfo "Installing catalog..."
  23. # Install regular DOCTYPE catalog entry
  24. xmlcatalog --noout --add "public" \
  25. "+//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML" \
  26. "${EROOT}${DTD_DIR}${DTD_FILE}" \
  27. "${EROOT}/etc/xml/catalog"
  28. # Install catalog entry for calls like: xmllint --dtdvalid URL ...
  29. xmlcatalog --noout --add "system" \
  30. "${SRC_URI}" \
  31. "${EROOT}${DTD_DIR}${DTD_FILE}" \
  32. "${EROOT}/etc/xml/catalog"
  33. }
  34. pkg_postrm() {
  35. # Remove all sk-dtd from the cache
  36. einfo "Cleaning catalog..."
  37. xmlcatalog --noout --del \
  38. "${EROOT}${DTD_DIR}${DTD_FILE}" \
  39. "${EROOT}/etc/xml/catalog"
  40. }