summaryrefslogtreecommitdiff
blob: 48d5d42701b16db4e01fe5801c5b0e4b8577040b (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-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="4"
RESTRICT="mirror"
inherit elisp-common eutils vcs-snapshot

DESCRIPTION="A collection of perl scripts (replacement in files, syncing dirs etc)"
HOMEPAGE="https://github.com/vaeth/mv_emacs/"
SRC_URI="http://github.com/vaeth/${PN}/tarball/release-${PV} -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="virtual/emacs"
RDEPEND=${DEPEND}

src_unpack() {
	vcs-snapshot_src_unpack
	cd "${S}"
	mkdir sitefile
	cat >"sitefile/50${PN}-gentoo.el" <<EOF
(add-to-list 'load-path "@SITELISP@")
(load "mv_emacs-autoloads")
EOF
}

src_prepare() {
	epatch_user
}

src_compile() {
	elisp-make-autoload-file || die
	elisp-compile *.el || die
}

src_install() {
	dodoc README
	elisp-install "${PN}" *.el *.elc || die
	elisp-site-file-install "sitefile/50${PN}-gentoo.el" || die
}

pkg_postinst() {
	elisp-site-regen
}

pkg_postrm() {
	elisp-site-regen
}