public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jauhien Piatlicki" <piatlicki@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/g-sorcery:master commit in: g_sorcery/, gs_ctan/
Date: Mon, 22 Jul 2013 16:42:21 +0000 (UTC)	[thread overview]
Message-ID: <1374511323.4d19c47fdf6e2126b30f7eb9671628518fc8678a.jauhien@gentoo> (raw)

commit:     4d19c47fdf6e2126b30f7eb9671628518fc8678a
Author:     Jauhien Piatlicki (jauhien) <piatlicki <AT> gmail <DOT> com>
AuthorDate: Mon Jul 22 16:42:03 2013 +0000
Commit:     Jauhien Piatlicki <piatlicki <AT> gmail <DOT> com>
CommitDate: Mon Jul 22 16:42:03 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/g-sorcery.git;a=commit;h=4d19c47f

CTAN backend: generate a given ebuild works

---
 g_sorcery/package_db.py |  1 -
 gs_ctan/backend.py      |  5 ++---
 gs_ctan/ebuild.py       | 18 ++++++++++++++++++
 3 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/g_sorcery/package_db.py b/g_sorcery/package_db.py
index 1dc1016..7ff4398 100644
--- a/g_sorcery/package_db.py
+++ b/g_sorcery/package_db.py
@@ -648,4 +648,3 @@ class DBGenerator(object):
                         result = True
                         break
         return result
-

diff --git a/gs_ctan/backend.py b/gs_ctan/backend.py
index 70f2e05..42a4a83 100644
--- a/gs_ctan/backend.py
+++ b/gs_ctan/backend.py
@@ -15,12 +15,11 @@ import os
 
 from g_sorcery.backend import Backend
 from g_sorcery.metadata import MetadataGenerator
-from g_sorcery.ebuild import EbuildGenerator
 from g_sorcery.eclass import EclassGenerator
 from g_sorcery.fileutils import get_pkgpath
 
 from .ctan_db import CtanDBGenerator
-from .ebuild import CtanEbuildWithoutDigestGenerator
+from .ebuild import CtanEbuildWithoutDigestGenerator, CtanEbuildWithDigestGenerator
 
 
 class CtanEclassGenerator(EclassGenerator):
@@ -29,5 +28,5 @@ class CtanEclassGenerator(EclassGenerator):
         
 
 instance = Backend(CtanDBGenerator,
-                   EbuildGenerator, CtanEbuildWithoutDigestGenerator,
+                   CtanEbuildWithDigestGenerator, CtanEbuildWithoutDigestGenerator,
                    CtanEclassGenerator, MetadataGenerator)

diff --git a/gs_ctan/ebuild.py b/gs_ctan/ebuild.py
index 3358605..a800cbd 100644
--- a/gs_ctan/ebuild.py
+++ b/gs_ctan/ebuild.py
@@ -37,3 +37,21 @@ class CtanEbuildWithoutDigestGenerator(DefaultEbuildGenerator):
         layout = Layout(vars_before_inherit, inherit, vars_after_description, vars_after_keywords)
 
         super(CtanEbuildWithoutDigestGenerator, self).__init__(package_db, layout)
+
+class CtanEbuildWithDigestGenerator(DefaultEbuildGenerator):
+    def __init__(self, package_db):
+
+        vars_before_inherit = \
+          ["base_src_uri", "catalogue", "source_type", "realname", ("digest_sources", "yes")]
+
+        inherit = ["gs-ctan"]
+        
+        vars_after_description = \
+          ["homepage", ("src_uri", "${BASE_SRC_URI}${CATALOGUE}${REALNAME}.${SOURCE_TYPE} -> ${P}.${SOURCE_TYPE}"), "license"]
+
+        vars_after_keywords = \
+          ["depend", "rdepend"]
+
+        layout = Layout(vars_before_inherit, inherit, vars_after_description, vars_after_keywords)
+
+        super(CtanEbuildWithDigestGenerator, self).__init__(package_db, layout)


             reply	other threads:[~2013-07-22 16:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-22 16:42 Jauhien Piatlicki [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-07-19 17:11 [gentoo-commits] proj/g-sorcery:master commit in: g_sorcery/, gs_ctan/ Jauhien Piatlicki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1374511323.4d19c47fdf6e2126b30f7eb9671628518fc8678a.jauhien@gentoo \
    --to=piatlicki@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox