]> pilppa.com Git - familiar-h63xx-build.git/commitdiff
gnupg: add 1.4.3-2 from Debian.
authorRene Wagner <rw@handhelds.org>
Tue, 1 Aug 2006 21:35:51 +0000 (23:35 +0200)
committerRene Wagner <rw@handhelds.org>
Tue, 1 Aug 2006 21:35:51 +0000 (23:35 +0200)
Signed-off-by: Rene Wagner <rw@handhelds.org>
org.handhelds.familiar/classes/base.bbclass
org.handhelds.familiar/classes/debian-vampyre.bbclass
org.handhelds.familiar/classes/package_ipk.bbclass
org.handhelds.familiar/packages/gnupg/gnupg_1.4.3-2.bb [new file with mode: 0644]

index 66563f34d379452fecbf251266fcb0b6d4427532..e270ffd7b2d59ba20b05b7db787dea66d29435a6 100644 (file)
@@ -446,6 +446,7 @@ python base_do_patch() {
                bb.build.exec_func("do_patchcleancmd", d)
 
        workdir = bb.data.getVar('WORKDIR', d, 1)
+       i = 0
        for url in src_uri:
 
                (type, host, path, user, pswd, parm) = bb.decodeurl(url)
@@ -479,6 +480,11 @@ python base_do_patch() {
                bb.data.setVarFlag("do_patchcmd", "func", 1, d)
                bb.data.setVarFlag("do_patchcmd", "dirs", "${WORKDIR} ${S}", d)
                bb.build.exec_func("do_patchcmd", d)
+
+               if bb.data.getVar("patch_applied", d):
+                       bb.data.setVar("PATCH_APPLIED_NUM", i, d)
+                       bb.build.exec_func("patch_applied", d)
+               i += 1
 }
 
 
index a7bb6a5f56167ef43f5c46ab4400e052b325d453..f00965ff1726408cffe23b46535535627d2d6572 100644 (file)
@@ -10,9 +10,77 @@ PR = "${@(bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1] or '1
 
 DEBIAN_ARCHIVE ?= "main"
 DEBIAN_BASE_URI = "${DEBIAN_MIRROR}/${DEBIAN_ARCHIVE}/${@bb.data.getVar('PN', d, 1)[0]}/${PN}"
-SRC_URI = "${DEBIAN_BASE_URI}/${PN}_${PV}.orig.tar.gz \
-           ${DEBIAN_BASE_URI}/${PN}_${PV}-${PR}.diff.gz;patch=1"
+SRC_URI_prepend = "${DEBIAN_BASE_URI}/${PN}_${PV}.orig.tar.gz \
+                   ${DEBIAN_BASE_URI}/${PN}_${PV}-${PR}.diff.gz;patch=1 "
 
+python do_dpatch () {
+       plist = (base_read_file("%s/debian/patches/00list" % bb.data.getVar("S", d, 1)) or "").split()
+       for p in plist:
+               bb.note("Applying patch '%s'" % p)
+               bb.data.setVar("do_patchcmd", bb.data.getVar("PATCHCMD", d, 1) % (1, p, "${S}/debian/patches/%s.dpatch" % p), d)
+               bb.data.setVarFlag("do_patchcmd", "func", 1, d)
+               bb.data.setVarFlag("do_patchcmd", "dirs", "${WORKDIR} ${S}", d)
+               bb.build.exec_func("do_patchcmd", d)
+}
+
+python patch_applied() {
+       if bb.data.getVar("PATCH_APPLIED_NUM", d, 1) != 0:
+               return
+
+       import os
+       import os.path
+       
+       dpatch = False
+       try:
+               os.stat(os.path.join(bb.data.getVar("S", d, 1), "debian", "patches", "00list"))
+               dpatch = True
+       except Exception, e:
+               pass
+       
+       if dpatch:
+               bb.event.fire(bb.build.TaskStarted("do_dpatch", d))
+               bb.build.exec_func("do_dpatch", d)
+               bb.event.fire(bb.build.TaskSucceeded("do_dpatch", d))
+}
+
+def parse_control(bbvar, field, d):
+       import bb
+       import re
+       
+       readable = False
+       try:
+               control = (base_read_file("%s/debian/control" % bb.data.getVar("S", d, 1)) or "").split("\n")
+               readable = True
+       except Exception, e:
+               pass
+
+       if readable:
+               pkg = None
+               r = re.compile("([a-zA-Z]*): (.*)$")
+
+               fields = {}
+               for line in control:
+                       m = r.match(line)
+                       if m:
+                               if m.group(1) == "Package":
+                                       pkg = m.group(2)
+                               if not pkg or pkg == bb.data.getVar("PN", d, 1):
+                                       fields[m.group(1)] = m.group(2)
+               if fields.has_key(field):
+                       return fields[field]
+
+       return ""
+
+def flatten(s):
+       return ' '.join(s.split(','))
+
+DESCRIPTION = "${@parse_control('DESCRIPTION', 'Description', d)}"
+SECTION = "${@parse_control('SECTION', 'Section', d)}"
+PRIORITY = "${@parse_control('PRIORITY', 'Priority', d)}"
+RCONFLICTS_${PN} = "${@flatten(parse_control('RCONFLICTS', 'Conflicts', d))}"
+RREPLACES_${PN} = "${@flatten(parse_control('RREPLACES', 'Replaces', d))}"
+RPROVIDES_${PN} = "${@flatten(parse_control('RPROVIDES', 'Provides', d))}"
+       
 do_install_append () {
        mkdir -p ${D}${datadir}/doc/${PN}
        rm -f ${D}${datadir}/doc/${PN}/changelog.Debian*
index 6d3e1eb686bd65cfcf735a7d91d1a7170b3b4aec..568d216484b542f4f880f7736dc7d70baf50981e 100644 (file)
@@ -168,10 +168,10 @@ python do_package_ipk () {
                # more fields
                rdepends = explode_deps(bb.data.getVar("RDEPENDS", localdata, 1) or "")
                rrecommends = explode_deps(bb.data.getVar("RRECOMMENDS", localdata, 1) or "")
-               rsuggests = (bb.data.getVar("RSUGGESTS", localdata, 1) or "").split()
-               rprovides = (bb.data.getVar("RPROVIDES", localdata, 1) or "").split()
-               rreplaces = (bb.data.getVar("RREPLACES", localdata, 1) or "").split()
-               rconflicts = (bb.data.getVar("RCONFLICTS", localdata, 1) or "").split()
+               rsuggests = explode_deps(bb.data.getVar("RSUGGESTS", localdata, 1) or "")
+               rprovides = explode_deps(bb.data.getVar("RPROVIDES", localdata, 1) or "")
+               rreplaces = explode_deps(bb.data.getVar("RREPLACES", localdata, 1) or "")
+               rconflicts = explode_deps(bb.data.getVar("RCONFLICTS", localdata, 1) or "")
                if rdepends:
                        ctrlfile.write("Depends: %s\n" % ", ".join(rdepends))
                if rsuggests:
diff --git a/org.handhelds.familiar/packages/gnupg/gnupg_1.4.3-2.bb b/org.handhelds.familiar/packages/gnupg/gnupg_1.4.3-2.bb
new file mode 100644 (file)
index 0000000..4b7dc44
--- /dev/null
@@ -0,0 +1,20 @@
+LICENSE = "GPLv2"
+DEPENDS = "zlib bzip2"
+DEPENDS += "readline"
+
+inherit autotools gettext debian-vampyre
+
+EXTRA_OECONF = "--disable-ldap \
+               --with-zlib=${STAGING_LIBDIR}/.. \
+               --with-bzip2=${STAGING_LIBDIR}/.. \
+               --disable-selinux-support"
+EXTRA_OECONF += "--with-readline=${STAGING_LIBDIR}/.."
+#   --without-readline      do not support fancy command line editing
+
+do_install () {
+       autotools_do_install
+       install -d ${D}${docdir}/${PN}
+       mv ${D}${datadir}/${PN}/* ${D}/${docdir}/${PN}/ || :
+       mv ${D}${prefix}/doc/* ${D}/${docdir}/${PN}/ || :
+}
+