2 # Copyright (C) 2006, Advanced Micro Devices, Inc. All Rights Reserved
3 # Released under the MIT license (see /COPYING)
5 HOMEPAGE = "http://www.perforce.com"
6 DESCRIPTION = "Perforce client and server binaries"
7 MAINTAINER = "Raymond Danks <info-linux@geode.amd.com>"
10 def get_kernelmajorversion(p):
12 r = re.compile("([0-9]+\.[0-9]+).*")
20 arch = bb.data.getVar('TARGET_ARCH', d, 1)
21 os = bb.data.getVar('TARGET_OS', d, 1)
23 if re.match("^linux.*$", os):
24 r = re.compile("([0-9]+\.[0-9]+).*")
25 m = r.match(base_read_file(bb.data.expand('${STAGING_KERNEL_DIR}/kernel-abiversion', d)));
27 if m and re.match("^.*86.*$", arch):
28 os = "linux%s" % m.group(1).replace('.','')
30 if re.match("^i.86$", arch):
32 elif arch == "x86_64":
34 elif re.match("^mips.*$", arch):
37 return "%s%s" % (os, arch)
39 P4ARCH="${@p4_arch(d)}"
40 P4BASEURL="http://filehost.perforce.com/perforce/r${PV}/bin.${P4ARCH}"
43 #Because these files are all named the same thing, regardless of version or arch
45 DL_DIR="${WORKDIR}/${P4ARCH}"
49 ${P4BASEURL}/p4api.tar \
55 PACKAGES += " ${PN}-server"
56 FILES_${PN} = " ${bindir}/p4"
57 FILES_${PN}-server = " ${bindir}/p4d ${bindir}/p4ftpd ${bindir}/p4p ${bindir}/p4web"
60 install -d ${STAGING_INCDIR}/p4api
61 install -m 0644 *.h ${STAGING_INCDIR}/p4api/
63 oe_libinstall -a libclient ${STAGING_LIBDIR}
64 oe_libinstall -a librpc ${STAGING_LIBDIR}
65 oe_libinstall -a libsupp ${STAGING_LIBDIR}
69 install -d ${D}${bindir}
70 install -d ${D}${includedir}/p4api
71 install -d ${D}${libdir}
73 install -m 0644 *.h ${D}${includedir}/p4api/
74 for p4bin in p4 p4d p4ftpd p4p p4web ; do
75 install -m 0755 $p4bin ${D}${bindir}/
78 oe_libinstall -a libclient ${D}${libdir}/
79 oe_libinstall -a librpc ${D}${libdir}/
80 oe_libinstall -a libsupp ${D}${libdir}/