summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2023-10-07 16:53:37 +0200
committerUlrich Müller <ulm@gentoo.org>2023-10-07 17:01:51 +0200
commit0dd820a7c4908943eaa4d0ab9d701339c1c99a7c (patch)
treefe871484e95b75cbbeda7517ae6356f91d96b6d9 /app-text/gentoo-dtd/gentoo-dtd-99999999.ebuild
parentapp-emacs/company-mode: bump to 0.10.1 (diff)
downloadgentoo-0dd820a7c4908943eaa4d0ab9d701339c1c99a7c.tar.gz
gentoo-0dd820a7c4908943eaa4d0ab9d701339c1c99a7c.tar.bz2
gentoo-0dd820a7c4908943eaa4d0ab9d701339c1c99a7c.zip
app-text/gentoo-dtd: new package, add 20230914, 99999999
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'app-text/gentoo-dtd/gentoo-dtd-99999999.ebuild')
-rw-r--r--app-text/gentoo-dtd/gentoo-dtd-99999999.ebuild49
1 files changed, 49 insertions, 0 deletions
diff --git a/app-text/gentoo-dtd/gentoo-dtd-99999999.ebuild b/app-text/gentoo-dtd/gentoo-dtd-99999999.ebuild
new file mode 100644
index 000000000000..2f030b713978
--- /dev/null
+++ b/app-text/gentoo-dtd/gentoo-dtd-99999999.ebuild
@@ -0,0 +1,49 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} == 99999999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/data/dtd.git"
+else
+ # git archive --prefix=${P}/ HEAD | xz >${P}.tar.xz
+ SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Document Type Definition for Gentoo-related XML files"
+HOMEPAGE="https://gitweb.gentoo.org/data/dtd.git/"
+
+# Presumably these simple DTDs are not copyrightable,
+# but repositories.dtd says GPL v2 or later.
+LICENSE="public-domain GPL-2+"
+SLOT="0"
+
+RDEPEND="dev-libs/libxml2"
+IDEPEND="${RDEPEND}"
+
+src_install() {
+ insinto /usr/share/xml/gentoo/dtd
+ doins *.dtd
+}
+
+pkg_postinst() {
+ ebegin "Installing catalog entry"
+ xmlcatalog --noout \
+ --add rewriteSystem "http://www.gentoo.org/dtd/" \
+ "file://${EPREFIX}/usr/share/xml/gentoo/dtd/" \
+ --add rewriteSystem "https://www.gentoo.org/dtd/" \
+ "file://${EPREFIX}/usr/share/xml/gentoo/dtd/" \
+ "${EROOT}"/etc/xml/catalog
+ eend $?
+}
+
+pkg_postrm() {
+ ebegin "Cleaning catalog"
+ xmlcatalog --noout \
+ --del "http://www.gentoo.org/dtd/" \
+ --del "https://www.gentoo.org/dtd/" \
+ "${EROOT}"/etc/xml/catalog
+ eend $?
+}