summaryrefslogtreecommitdiff
blob: 2bf1249e8565823b6d0fa93e326d29031dd01b7a (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
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit vim-plugin

MY_PN="VimClojure"

DESCRIPTION="vim plugin: Clojure syntax highlighting, filetype and indent settings"
HOMEPAGE="https://github.com/vim-scripts/VimClojure"
SRC_URI="https://github.com/vim-scripts/${MY_PN}/archive/${PV}.zip -> ${P}.zip"

KEYWORDS="~amd64 ~x86"
LICENSE="BSD"
SLOT="0"

RDEPEND="dev-lang/clojure"

S="${WORKDIR}/${MY_PN}-${PV}"

DOCS=( doc/LICENSE.txt )

# Files with similar names are already installed by app-vim/slimv.
DUPLICATE_FILES=(
	indent/clojure.vim
	ftdetect/clojure.vim
)

src_prepare() {
	default

	# Remove .bat files.
	find . -type f -name \*.bat -exec rm -v {} \; || die

	# Let's simply rename ${DUPLICATE_FILES[@]}.
	local f
	for f in "${DUPLICATE_FILES[@]}"; do
		[[ -f "${f}" ]] || die "Couldn't find ${f}"
		bname="${f##*/}"
		path="${f%/*}"
		noext="${bname%%.*}"
		newname="${path}/${PN}_${noext}.vim"
		mv -v "${f}" "${newname}" || die
	done
}

src_install() {
	einstalldocs
	rm -rv "${DOCS[@]}" bin || die
	vim-plugin_src_install
}