wok-next view raspberrypi-vc/receipt @ rev 20236
linux-cloop: tiny patch
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Nov 06 10:18:18 2017 +0100 (2017-11-06) |
parents | 1067bb7f1e24 |
children | cd7906120828 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="raspberrypi-vc"
4 GITHASH="1db68b5da75330e4d21fa10b8271c0f463d605d2"
5 VERSION=${GITHASH:0:6}
6 CATEGORY="system-tools"
7 SHORT_DESC="Raspberry Pi VideoCore Tools (vcdbg, vcgencmd, raspivid, etc)."
8 MAINTAINER="pankso@slitaz.org"
9 LICENSE="custom"
10 SOURCE="rpi-firmware"
11 TARBALL="$SOURCE-$VERSION.zip"
12 WEB_SITE="http://www.raspberrypi.org/"
13 WGET_URL="https://codeload.github.com/raspberrypi/firmware/zip/$GITHASH"
14 TAGS="raspberrypi rpi"
15 HOST_ARCH="arm"
17 BUILD_DEPENDS="wget"
18 SPLIT="raspberrypi-vc raspberrypi-boot raspberrypi-boot-x"
20 # Cross tool PATH is not set in genpkg_rules
21 compile_rules()
22 {
23 echo -n "Stripping VideoCore libraries..."
24 ${ARCH}-slitaz-linux-gnueabi-strip -s ${src}/opt/vc/lib/*.so
25 status
26 }
28 # Rules to gen a SliTaz package suitable for Tazpkg.
29 genpkg_rules()
30 {
31 case $PACKAGE in
32 raspberrypi-vc)
33 vc="$fs/opt/vc"
34 mkdir -p ${fs}/opt
35 cp -a ${src}/opt/vc ${fs}/opt
36 echo -n "Cleaning: VC libraries devel files"
37 rm -rf ${vc}/include ${vc}/src ${vc}/lib/*.a
38 status
39 ;;
40 raspberrypi-boot)
41 CAT="system-tools|Raspberry Pi bootloader firmware."
42 mkdir -p $fs/boot
43 for fw in bootcode.bin fixup.dat start.elf
44 do
45 cp -a ${src}/boot/${fw} ${fs}/boot
46 done
47 ;;
48 raspberrypi-boot-x)
49 CAT="system-tools|Raspberry Pi bootloader firmware with Pi camera support."
50 mkdir -p $fs/boot
51 for fw in start_x.elf fixup_x.dat
52 do
53 cp -a ${src}/boot/${fw} ${fs}/boot
54 done
55 ;;
56 esac
57 }
59 # PATH + LD_LIBRARY_PATH
60 post_install_raspberrypi_vc()
61 {
62 # PATH + LD_LIBRARY_PATH
63 if ! fgrep -q '/opt/vc/bin' ${1}/etc/profile; then
64 echo -n "Enabling: /opt/vc/bin /opt/vc/lib"
65 cat >> ${1}/etc/profile << EOT
67 # Raspberry Pi VC tools and libs
68 export PATH=\$PATH:/opt/vc/bin
69 export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/opt/vc/lib
71 EOT
72 status
73 fi
74 true
75 }