aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-07-23 01:44:59 +0200
committerJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-07-23 01:44:59 +0200
commitf60686a7b5357e27471fdd997e456e47677c2162 (patch)
treef650d9502594111ced81126ca9e93f72adfd88de
parentREADME: note about using ELPA and CTAN backends (diff)
downloadg-sorcery-f60686a7b5357e27471fdd997e456e47677c2162.tar.gz
g-sorcery-f60686a7b5357e27471fdd997e456e47677c2162.tar.bz2
g-sorcery-f60686a7b5357e27471fdd997e456e47677c2162.zip
CTAN backend: work with tar.xz sources
-rw-r--r--gs_ctan/ctan_db.py1
-rw-r--r--gs_ctan/data/gs-ctan.eclass29
2 files changed, 24 insertions, 6 deletions
diff --git a/gs_ctan/ctan_db.py b/gs_ctan/ctan_db.py
index 0c52395..0a60744 100644
--- a/gs_ctan/ctan_db.py
+++ b/gs_ctan/ctan_db.py
@@ -153,7 +153,6 @@ class CtanDBGenerator(DBGenerator):
homepage = "http://www.ctan.org/tex-archive" + catalogue
catalogue = catalogue[:-len(realname)]
else:
- continue #todo: work with tlpkg packages
source_type = "tar.xz"
base_src_uri = "http://mirror.ctan.org/systems/texlive/tlnet/archive/"
catalogue = ""
diff --git a/gs_ctan/data/gs-ctan.eclass b/gs_ctan/data/gs-ctan.eclass
index e72fce3..eba6183 100644
--- a/gs_ctan/data/gs-ctan.eclass
+++ b/gs_ctan/data/gs-ctan.eclass
@@ -39,7 +39,11 @@ GSCTAN_FETCH_CMD="wget"
inherit latex-package
-EXPORT_FUNCTIONS src_unpack
+if [[ ${SOURCE_TYPE} = "zip" ]]; then
+ EXPORT_FUNCTIONS src_unpack
+else
+ EXPORT_FUNCTIONS src_{unpack,install}
+fi
SUFFIX="${SOURCE_TYPE}"
@@ -55,9 +59,24 @@ gs-ctan_fetch() {
}
gs-ctan_src_unpack() {
- if [[ x${DIGEST_SOURCES} = x ]]; then
- gs-ctan_fetch
+ if [[ ${SOURCE_TYPE} = "zip" ]]; then
+ if [[ x${DIGEST_SOURCES} = x ]]; then
+ gs-ctan_fetch
+ fi
+ unpack ${P}.${SUFFIX}
+ mv ${PN} ${P} || die
+ else
+ if [[ x${DIGEST_SOURCES} = x ]]; then
+ gs-ctan_fetch
+ fi
+ mkdir ${S} || die
+ cd ${S} || die
+ unpack ${P}.${SUFFIX}
+ rm -rf tlpkg || die
fi
- unpack ${P}.${SUFFIX}
- mv ${PN} ${P} || die
+}
+
+gs-ctan_src_install() {
+ insinto ${TEXMF}
+ doins -r *
}