summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorRaymond Danks <raymond@edanks.com>2006-07-24 16:18:35 +0000
committerRaymond Danks <raymond@edanks.com>2006-07-24 16:18:35 +0000
commitc4bf4bf5935b9759aede7888b80367fb5c7508bc (patch)
treed112ff1f668c2e0983892f7eb992e77f8cd42558 /packages
parenta1609131d4a87be0fa6d2d397e0ae743d47d6af6 (diff)
p4 - Initial add.
Diffstat (limited to 'packages')
-rw-r--r--packages/p4/.mtn2git_empty0
-rw-r--r--packages/p4/p4.inc81
-rw-r--r--packages/p4/p4_04.2.bb5
-rw-r--r--packages/p4/p4_05.2.bb5
4 files changed, 91 insertions, 0 deletions
diff --git a/packages/p4/.mtn2git_empty b/packages/p4/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/p4/.mtn2git_empty
diff --git a/packages/p4/p4.inc b/packages/p4/p4.inc
new file mode 100644
index 0000000000..a473cfeea1
--- /dev/null
+++ b/packages/p4/p4.inc
@@ -0,0 +1,81 @@
+# p4 .bb build file
+# Copyright (C) 2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see /COPYING)
+
+HOMEPAGE = "http://www.perforce.com"
+DESCRIPTION = "Perforce client and server binaries"
+MAINTAINER = "Raymond Danks <info-linux@geode.amd.com>"
+LICENSE = "Perforce"
+
+def get_kernelmajorversion(p):
+ import re
+ r = re.compile("([0-9]+\.[0-9]+).*")
+ m = r.match(p);
+ if m:
+ return m.group(1)
+ return None
+
+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}"
+S="${WORKDIR}"
+
+#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"
+
+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/packages/p4/p4_04.2.bb b/packages/p4/p4_04.2.bb
new file mode 100644
index 0000000000..7e1ac53785
--- /dev/null
+++ b/packages/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)
+
+include p4.inc
diff --git a/packages/p4/p4_05.2.bb b/packages/p4/p4_05.2.bb
new file mode 100644
index 0000000000..7e1ac53785
--- /dev/null
+++ b/packages/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)
+
+include p4.inc