aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-08-29 03:03:20 +0200
committerJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-08-29 03:03:20 +0200
commitc1a70d3e8052097f3040fef02ea82fb06c72e664 (patch)
treeba524307cab4bc9e8ec3644611e005908182d3d4
parentsetup.py: pypi config (diff)
downloadgs-elpa-c1a70d3e8052097f3040fef02ea82fb06c72e664.tar.gz
gs-elpa-c1a70d3e8052097f3040fef02ea82fb06c72e664.tar.bz2
gs-elpa-c1a70d3e8052097f3040fef02ea82fb06c72e664.zip
refactoring of eclasses
-rw-r--r--gs_elpa/data/gs-elpa.eclass (renamed from gs_elpa/data/g-elpa.eclass)41
-rw-r--r--gs_elpa/ebuild.py4
-rw-r--r--gs_elpa/elpa_db.py2
3 files changed, 13 insertions, 34 deletions
diff --git a/gs_elpa/data/g-elpa.eclass b/gs_elpa/data/gs-elpa.eclass
index ad9bb65..2a621f4 100644
--- a/gs_elpa/data/g-elpa.eclass
+++ b/gs_elpa/data/gs-elpa.eclass
@@ -1,16 +1,16 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-# automatically generated by g-elpa
+# automatically generated by gs-elpa
# please do not edit this file
#
# Original Author: Jauhien Piatlicki <piatlicki@gmail.com>
# Purpose: support installation of elisp packages for emacs
-# from overlays generated by g-elpa
+# from overlays generated by gs-elpa
#
# Bugs to piatlicki@gmail.com
#
-# @ECLASS: g-elpa.eclass
+# @ECLASS: gs-elpa.eclass
#
# @ECLASS-VARIABLE: REPO_URI
# @DESCRIPTION: address of a repository of elisp packages
@@ -24,15 +24,8 @@
# @ECLASS-VARIABLE: REALNAME
# @DESCRIPTION: real name of a package in the repository
#
-# @ECLASS-VARIABLE: GELPA_STORE_DIR
-# @DESCRIPTION: store location for downloaded sources
-GELPA_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
-#
-# @ECLASS-VARIABLE: GELPA_FETCH_CMD
-# @DESCRIPTION: fetch command
-GELPA_FETCH_CMD="wget"
-inherit elisp
+inherit elisp g-sorcery
EXPORT_FUNCTIONS src_{unpack,compile,install}
@@ -44,35 +37,21 @@ fi
SOURCEFILE=${REALNAME}-${PV}.${SUFFIX}
-g-elpa_fetch() {
- addwrite "${GELPA_STORE_DIR}"
- pushd "${GELPA_STORE_DIR}" >/dev/null || die "can't chdir to ${GELPA_STORE_DIR}"
- if [[ ! -f "${SOURCEFILE}" ]]; then
- $GELPA_FETCH_CMD ${REPO_URI}${SOURCEFILE} || die
- fi
- popd >/dev/null || die
-}
-
-g-elpa_src_unpack() {
- if [[ x${DIGEST_SOURCES} = x ]]; then
- g-elpa_fetch
- fi
-
- if [[ ${SOURCE_TYPE} != "single" ]]; then
- tar xvf ${GELPA_STORE_DIR}/${SOURCEFILE} || die
- else
+gs-elpa_src_unpack() {
+ g-sorcery_src_unpack
+ if [[ ${SOURCE_TYPE} = "single" ]]; then
mkdir ${P} || die
- cp ${GELPA_STORE_DIR}/${SOURCEFILE} ./${P} || die
+ mv ./${SOURCEFILE} ./${P} || die
fi
}
-g-elpa_src_compile() {
+gs-elpa_src_compile() {
rm -f ${PN}-pkg.el || die
elisp-make-autoload-file || die
elisp_src_compile || die
}
-g-elpa_src_install() {
+gs-elpa_src_install() {
local sitefile="50${PN}-gentoo.el"
cat <<EOF >> ${sitefile} || die
(add-to-list 'load-path "@SITELISP@")
diff --git a/gs_elpa/ebuild.py b/gs_elpa/ebuild.py
index e7fd502..460ccfa 100644
--- a/gs_elpa/ebuild.py
+++ b/gs_elpa/ebuild.py
@@ -29,7 +29,7 @@ class ElpaEbuildWithDigestGenerator(DefaultEbuildGenerator):
vars_before_inherit = \
["repo_uri", "source_type", "realname", ("digest_sources", "yes")]
- inherit = ["g-elpa"]
+ inherit = ["g-sorcery", "gs-elpa"]
vars_after_description = \
["homepage", ("src_uri", "${REPO_URI}${REALNAME}-${PV}.${SUFFIX}")]
@@ -51,7 +51,7 @@ class ElpaEbuildWithoutDigestGenerator(DefaultEbuildGenerator):
vars_before_inherit = \
["repo_uri", "source_type", "realname"]
- inherit = ["g-elpa"]
+ inherit = ["g-sorcery", "gs-elpa"]
vars_after_description = \
["homepage"]
diff --git a/gs_elpa/elpa_db.py b/gs_elpa/elpa_db.py
index b7ffefb..8f8cd6d 100644
--- a/gs_elpa/elpa_db.py
+++ b/gs_elpa/elpa_db.py
@@ -107,7 +107,7 @@ class ElpaDBGenerator(DBGenerator):
'repo_uri' : repo_uri,
'realname' : realname,
#eclass entry
- 'eclasses' : ['g-elpa'],
+ 'eclasses' : ['g-sorcery', 'gs-elpa'],
#metadata entries
'maintainer' : [{'email' : 'piatlicki@gmail.com',
'name' : 'Jauhien Piatlicki'}],