2 # Copyright (C) 2006, Advanced Micro Devices, Inc. All Rights Reserved
3 # Released under the MIT license (see /COPYING)
5 DESCRIPTION = "Perforce client and server binaries"
6 HOMEPAGE = "http://www.perforce.com"
11 arch = bb.data.getVar('TARGET_ARCH', d, 1)
12 os = bb.data.getVar('TARGET_OS', d, 1)
14 if re.match("^linux.*$", os):
15 r = re.compile("([0-9]+\.[0-9]+).*")
16 m = r.match(base_read_file(bb.data.expand('${STAGING_KERNEL_DIR}/kernel-abiversion', d)));
18 if m and re.match("^.*86.*$", arch):
19 os = "linux%s" % m.group(1).replace('.','')
21 if re.match("^i.86$", arch):
23 elif arch == "x86_64":
25 elif re.match("^mips.*$", arch):
28 return "%s%s" % (os, arch)
30 P4ARCH = "${@p4_arch(d)}"
31 P4BASEURL = "http://filehost.perforce.com/perforce/r${PV}/bin.${P4ARCH}"
33 #Because these files are all named the same thing, regardless of version or arch
35 DL_DIR="${WORKDIR}/${P4ARCH}"
39 ${P4BASEURL}/p4api.tar \
46 PACKAGES += " ${PN}-server"
47 FILES_${PN} = " ${bindir}/p4"
48 FILES_${PN}-server = " ${bindir}/p4d ${bindir}/p4ftpd ${bindir}/p4p ${bindir}/p4web"
51 install -d ${STAGING_INCDIR}/p4api
52 install -m 0644 *.h ${STAGING_INCDIR}/p4api/
54 oe_libinstall -a libclient ${STAGING_LIBDIR}
55 oe_libinstall -a librpc ${STAGING_LIBDIR}
56 oe_libinstall -a libsupp ${STAGING_LIBDIR}
60 install -d ${D}${bindir}
61 install -d ${D}${includedir}/p4api
62 install -d ${D}${libdir}
64 install -m 0644 *.h ${D}${includedir}/p4api/
65 for p4bin in p4 p4d p4ftpd p4p p4web ; do
66 install -m 0755 $p4bin ${D}${bindir}/
69 oe_libinstall -a libclient ${D}${libdir}/
70 oe_libinstall -a librpc ${D}${libdir}/
71 oe_libinstall -a libsupp ${D}${libdir}/