commit: b775f50af1757a69f3b47acbe59e59b274462606 parent 2f78ea9e11b78354983328989a742c3bcdfa2ac1 Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me> Date: Thu, 20 Jul 2023 04:29:31 +0200 app-text/xbel-dtd: new package, add 1.0Diffstat:
A | app-text/xbel-dtd/Manifest | 1 | + |
A | app-text/xbel-dtd/xbel-dtd-1.0.ebuild | 54 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2 files changed, 55 insertions(+), 0 deletions(-)diff --git a/app-text/xbel-dtd/Manifest b/app-text/xbel-dtd/Manifest
@@ -0,0 +1 @@ +DIST xbel-1.0.dtd 2726 BLAKE2B d8ec361777639df0e398dcb9a21d724d4e3fbde8c73665c1f5b6384bf8d165d36be51dfb5b56535156c23cf40beeb2eda4ca692bbb54bb16e80d217007a10b6e SHA512 6bc81cd44216a81190777f7233229c7d056e3123f4436f7d36edc1a7338d35d53a46191148be20a0427fda7e0ee7e6acbc210c54167e2b526c22edd8f90834a7diff --git a/app-text/xbel-dtd/xbel-dtd-1.0.ebuild b/app-text/xbel-dtd/xbel-dtd-1.0.ebuild
@@ -0,0 +1,54 @@ +# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DTD_FILE="xbel-${PV}.dtd" +DTD_DIR="/usr/share/xml/xbel/" + +DESCRIPTION="XML Bookmark Exchange Language (XBEL), DTD" +HOMEPAGE="https://pyxml.sourceforge.net/topics/xbel/" +SRC_URI="https://pyxml.sourceforge.net/topics/dtds/${DTD_FILE}" +S="${WORKDIR}" + +LICENSE="" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-solaris" + +RDEPEND=">=dev-libs/libxml2-2.4.19" + +src_unpack() { :; } + +src_configure() { :; } + +src_compile() { :; } + +src_install() { + insinto "${DTD_DIR}" + doins "${DISTDIR}/${DTD_FILE}" +} + +pkg_postinst() { + einfo "Installing catalog..." + + # Install regular DOCTYPE catalog entry + xmlcatalog --noout --add "public" \ + "+//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML" \ + "${EROOT}${DTD_DIR}${DTD_FILE}" \ + "${EROOT}/etc/xml/catalog" + + # Install catalog entry for calls like: xmllint --dtdvalid URL ... + xmlcatalog --noout --add "system" \ + "${SRC_URI}" \ + "${EROOT}${DTD_DIR}${DTD_FILE}" \ + "${EROOT}/etc/xml/catalog" +} + +pkg_postrm() { + # Remove all sk-dtd from the cache + einfo "Cleaning catalog..." + + xmlcatalog --noout --del \ + "${EROOT}${DTD_DIR}${DTD_FILE}" \ + "${EROOT}/etc/xml/catalog" +}