wok rev 16523

raspberrypi-vc: strip down package and up PATH LD_LIBRARY_PATH in /etc/profile
author Christophe Lincoln <pankso@slitaz.org>
date Sat Apr 26 02:27:59 2014 +0200 (2014-04-26)
parents f9b13fb97dda
children 732bef1172a4
files raspberrypi-vc/receipt
line diff
     1.1 --- a/raspberrypi-vc/receipt	Sat Apr 26 02:04:47 2014 +0200
     1.2 +++ b/raspberrypi-vc/receipt	Sat Apr 26 02:27:59 2014 +0200
     1.3 @@ -16,9 +16,36 @@
     1.4  
     1.5  BUILD_DEPENDS="wget"
     1.6  
     1.7 +# Cross tool PATH is not set in genpkg_rules
     1.8 +compile_rules()
     1.9 +{
    1.10 +	echo -n "Stripping VideoCore libraries..."
    1.11 +	${ARCH}-slitaz-linux-gnueabi-strip -s ${src}/opt/vc/lib/*.so
    1.12 +	status
    1.13 +}
    1.14 +
    1.15  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.16  genpkg_rules()
    1.17  {
    1.18 -	mkdir -p $fs/opt
    1.19 +	vc="$fs/opt/vc"
    1.20 +	mkdir -p ${fs}/opt
    1.21  	cp -a ${src}/opt/vc ${fs}/opt
    1.22 +	echo -n "Cleaning: VC libraries devel files"
    1.23 +	rm -rf ${vc}/include ${vc}/src ${vc}/lib/*.a
    1.24 +	status
    1.25  }
    1.26 +
    1.27 +# PATH + LD_LIBRARY_PATH
    1.28 +post_install()
    1.29 +{
    1.30 +	# PATH + LD_LIBRARY_PATH
    1.31 +	echo -n "Enabling: /opt/vc/bin /opt/vc/lib"
    1.32 +	cat >> ${1}/etc/profile << EOT
    1.33 +
    1.34 +# Raspberry Pi VC tools and libs
    1.35 +export PATH=$PATH:/opt/vc/bin
    1.36 +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/vc/lib
    1.37 +
    1.38 +EOT
    1.39 +	status
    1.40 +}