summaryrefslogtreecommitdiff
path: root/recipes/p4
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/p4
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/p4')
-rw-r--r--recipes/p4/p4.inc72
-rw-r--r--recipes/p4/p4_04.2.bb5
-rw-r--r--recipes/p4/p4_05.2.bb5
3 files changed, 82 insertions, 0 deletions
diff --git a/recipes/p4/p4.inc b/recipes/p4/p4.inc
new file mode 100644
index 0000000000..9439f73674
--- /dev/null
+++ b/recipes/p4/p4.inc
@@ -0,0 +1,72 @@
+# p4 .bb build file
+# Copyright (C) 2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see /COPYING)
+
+DESCRIPTION = "Perforce client and server binaries"
+HOMEPAGE = "http://www.perforce.com"
+LICENSE = "Perforce"
+
+def p4_arch(d):
+ import bb, re
+ arch = bb.data.getVar('TARGET_ARCH', d, 1)
+ os = bb.data.getVar('TARGET_OS', d, 1)
+
+ if re.match("^linux.*$", os):
+ r = re.compile("([0-9]+\.[0-9]+).*")
+ m = r.match(base_read_file(bb.data.expand('${STAGING_KERNEL_DIR}/kernel-abiversion', d)));
+ os = "linux"
+ if m and re.match("^.*86.*$", arch):
+ os = "linux%s" % m.group(1).replace('.','')
+
+ if re.match("^i.86$", arch):
+ arch = "x86"
+ elif arch == "x86_64":
+ arch = "amd64"
+ elif re.match("^mips.*$", arch):
+ arch = "mips"
+
+ return "%s%s" % (os, arch)
+
+P4ARCH = "${@p4_arch(d)}"
+P4BASEURL = "http://filehost.perforce.com/perforce/r${PV}/bin.${P4ARCH}"
+
+#Because these files are all named the same thing, regardless of version or arch
+PREMIRRORS=""
+DL_DIR="${WORKDIR}/${P4ARCH}"
+
+SRC_URI="\
+ ${P4BASEURL}/p4 \
+ ${P4BASEURL}/p4api.tar \
+ ${P4BASEURL}/p4d \
+ ${P4BASEURL}/p4ftpd \
+ ${P4BASEURL}/p4p \
+ ${P4BASEURL}/p4web"
+S = "${WORKDIR}"
+
+PACKAGES += " ${PN}-server"
+FILES_${PN} = " ${bindir}/p4"
+FILES_${PN}-server = " ${bindir}/p4d ${bindir}/p4ftpd ${bindir}/p4p ${bindir}/p4web"
+
+do_stage() {
+ install -d ${STAGING_INCDIR}/p4api
+ install -m 0644 *.h ${STAGING_INCDIR}/p4api/
+
+ oe_libinstall -a libclient ${STAGING_LIBDIR}
+ oe_libinstall -a librpc ${STAGING_LIBDIR}
+ oe_libinstall -a libsupp ${STAGING_LIBDIR}
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -d ${D}${includedir}/p4api
+ install -d ${D}${libdir}
+
+ install -m 0644 *.h ${D}${includedir}/p4api/
+ for p4bin in p4 p4d p4ftpd p4p p4web ; do
+ install -m 0755 $p4bin ${D}${bindir}/
+ done
+
+ oe_libinstall -a libclient ${D}${libdir}/
+ oe_libinstall -a librpc ${D}${libdir}/
+ oe_libinstall -a libsupp ${D}${libdir}/
+}
diff --git a/recipes/p4/p4_04.2.bb b/recipes/p4/p4_04.2.bb
new file mode 100644
index 0000000000..def797726c
--- /dev/null
+++ b/recipes/p4/p4_04.2.bb
@@ -0,0 +1,5 @@
+# p4 .bb build file
+# Copyright (C) 2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see /COPYING)
+
+require p4.inc
diff --git a/recipes/p4/p4_05.2.bb b/recipes/p4/p4_05.2.bb
new file mode 100644
index 0000000000..def797726c
--- /dev/null
+++ b/recipes/p4/p4_05.2.bb
@@ -0,0 +1,5 @@
+# p4 .bb build file
+# Copyright (C) 2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see /COPYING)
+
+require p4.inc