1 # Copyright 1999-2018 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
9 MY_PNV="${MY_PN}-${PV}"
11 DESCRIPTION="Automate Clojure projects without setting your hair on fire"
12 HOMEPAGE="https://leiningen.org/"
14 https://github.com/technomancy/${MY_PN}/releases/download/${PV}/${MY_PNV}-standalone.zip -> ${MY_PNV}-standalone.jar
15 https://raw.githubusercontent.com/technomancy/${MY_PN}/${PV}/bin/lein-pkg -> ${MY_PNV}.sh
20 KEYWORDS="~amd64 ~x86 ~x64-macos"
22 RDEPEND=">=virtual/jre-1.6"
23 DEPEND=">=virtual/jdk-1.6"
28 mkdir -p "${S}" || die "Can't mkdir ${S}"
29 cd "${S}" || die "Can't enter ${S}"
31 einfo "Copying ${file}"
32 cp "${DISTDIR}/${file}" "${S}/" || die "Can't copy ${file}"
37 einfo "Copying leinrc"
38 cp "${FILESDIR}/leinrc" "${S}/" || die "Can't copy leinrc"
39 einfo "Patching leinrc"
40 sed -i "s^@@PN@@^${PN}^" "${S}/leinrc" || die "Can't patch leinrc"
42 einfo "Renaming lein-pkg"
43 # Rename generically to help user patching
44 mv "${S}/${MY_PNV}.sh" "${S}/lein" || die "Can't rename to lein"
48 sed -i "s|^LEIN_JAR=.*$|LEIN_JAR=${EPREFIX}/${JAVA_PKG_JARDEST#/}/${PN}.jar|" "${S}/lein" \
49 || die "Can't patch LEIN_JAR in lein"
58 java-pkg_newjar "${MY_PNV}-standalone.jar"
61 fperms 0644 "/etc/leinrc"