summaryrefslogtreecommitdiff
blob: 5f1a1d664864cf2e98a166da9abebbe8a9dff32b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

#BACKPORTS=

inherit elisp eutils

MY_P="libvirt-${PV/_rc/-rc}"

DESCRIPTION="Extension for nxml-mode with libvirt schemas"
HOMEPAGE="http://www.libvirt.org/"
SRC_URI="http://libvirt.org/sources/${MY_P}.tar.gz
	${BACKPORTS:+mirror://gentoo/${MY_P}-backports-${BACKPORTS}.tar.bz2}"

# This is the license of the package, but the schema files are
# provided without license, maybe it's bad.
LICENSE="LGPL-2.1+"
SLOT="0"
KEYWORDS="~amd64 ~x86"

# Yes this requires Java, but I'd rather not repackage this, if you
# know something better in C, I'll be glad to use that.
DEPEND="app-text/trang"
RDEPEND=""

SITEFILE="60${PN}-gentoo.el"
S="${WORKDIR}/${MY_P%-rc*}"

src_prepare() {
	if [[ -d "${WORKDIR}/patches" ]]; then
		EPATCH_SUFFIX="patch" \
		EPATCH_FORCE="yes" \
		EPATCH_SOURCE="${WORKDIR}/patches" \
		epatch
	fi
}

src_compile() {
	emake -C docs/schemas -f "${FILESDIR}/Makefile-trang"
}

src_test() {
	# No we don't need tests here... trang will take care of checking
	# the well-formedness of the schema files for us
	:
}

src_install() {
	insinto ${SITEETC}/${PN}
	doins "${FILESDIR}/schemas.xml" docs/schemas/*.rnc
	elisp-site-file-install "${FILESDIR}/${SITEFILE}"
}