1*4882a593Smuzhiyun# 2*4882a593Smuzhiyun# ex:ts=4:sw=4:sts=4:et 3*4882a593Smuzhiyun# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- 4*4882a593Smuzhiyun# 5*4882a593Smuzhiyun# Common variable and task for the binary package recipe. 6*4882a593Smuzhiyun# Basic principle: 7*4882a593Smuzhiyun# * The files have been unpacked to ${S} by base.bbclass 8*4882a593Smuzhiyun# * Skip do_configure and do_compile 9*4882a593Smuzhiyun# * Use do_install to install the files to ${D} 10*4882a593Smuzhiyun# 11*4882a593Smuzhiyun# Note: 12*4882a593Smuzhiyun# The "subdir" parameter in the SRC_URI is useful when the input package 13*4882a593Smuzhiyun# is rpm, ipk, deb and so on, for example: 14*4882a593Smuzhiyun# 15*4882a593Smuzhiyun# SRC_URI = "http://foo.com/foo-1.0-r1.i586.rpm;subdir=foo-1.0" 16*4882a593Smuzhiyun# 17*4882a593Smuzhiyun# Then the files would be unpacked to ${WORKDIR}/foo-1.0, otherwise 18*4882a593Smuzhiyun# they would be in ${WORKDIR}. 19*4882a593Smuzhiyun# 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun# Skip the unwanted steps 22*4882a593Smuzhiyundo_configure[noexec] = "1" 23*4882a593Smuzhiyundo_compile[noexec] = "1" 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun# Install the files to ${D} 26*4882a593Smuzhiyunbin_package_do_install () { 27*4882a593Smuzhiyun # Do it carefully 28*4882a593Smuzhiyun [ -d "${S}" ] || exit 1 29*4882a593Smuzhiyun if [ -z "$(ls -A ${S})" ]; then 30*4882a593Smuzhiyun bbfatal bin_package has nothing to install. Be sure the SRC_URI unpacks into S. 31*4882a593Smuzhiyun fi 32*4882a593Smuzhiyun cd ${S} 33*4882a593Smuzhiyun install -d ${D}${base_prefix} 34*4882a593Smuzhiyun tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \ 35*4882a593Smuzhiyun | tar --no-same-owner -xpf - -C ${D}${base_prefix} 36*4882a593Smuzhiyun} 37*4882a593Smuzhiyun 38*4882a593SmuzhiyunFILES:${PN} = "/" 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunEXPORT_FUNCTIONS do_install 41