diff --git a/README.md b/README.md index 0b7dd7b..1f9b665 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # raspberrypi-userland +Libraries for interfacing to Raspberry Pi GPU. + diff --git a/raspberrypi-userland-20121028git-disable_cmake_toolchain_check.patch b/raspberrypi-userland-20121028git-disable_cmake_toolchain_check.patch new file mode 100644 index 0000000..d349592 --- /dev/null +++ b/raspberrypi-userland-20121028git-disable_cmake_toolchain_check.patch @@ -0,0 +1,22 @@ +diff -ru userland-20121028git/makefiles/cmake/arm-linux.cmake userland-20121028git-om/makefiles/cmake/arm-linux.cmake +--- userland-20121028git/makefiles/cmake/arm-linux.cmake 2012-10-28 12:56:34.000000000 +0000 ++++ userland-20121028git-om/makefiles/cmake/arm-linux.cmake 2012-10-28 15:37:48.679038820 +0000 +@@ -1,18 +1,5 @@ + # setup environment for cross compile to arm-linux + +-if (DEFINED CMAKE_TOOLCHAIN_FILE) +-else() +- message(FATAL_ERROR +- " *********************************************************\n" +- " * CMAKE_TOOLCHAIN_FILE not defined *\n" +- " * Please DELETE the build directory and re-run with: *\n" +- " * -DCMAKE_TOOLCHAIN_FILE=toolchain_file.cmake *\n" +- " * *\n" +- " * Toolchain files are in makefiles/cmake/toolchains. *\n" +- " *********************************************************" +- ) +-endif() +- + # pull in headers for android + if(ANDROID) + # diff --git a/raspberrypi-userland-ldconfig b/raspberrypi-userland-ldconfig new file mode 100644 index 0000000..b0a1aeb --- /dev/null +++ b/raspberrypi-userland-ldconfig @@ -0,0 +1 @@ +/opt/vc/lib diff --git a/raspberrypi-userland.spec b/raspberrypi-userland.spec new file mode 100644 index 0000000..0407123 --- /dev/null +++ b/raspberrypi-userland.spec @@ -0,0 +1,173 @@ +Name: raspberrypi-userland +Version: 20140117git +Release: 1mamba +Summary: Libraries for interfacing to Raspberry Pi GPU +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Davide Madrisan +URL: http://www.raspberrypi.org/ +## GITSOURCE git://github.com/raspberrypi/userland.git +Source: git://github.com/raspberrypi/userland.git/master/userland-%{version}.tar.bz2 +Source1: raspberrypi-userland-ldconfig +Source2: tvservice-off +Source3: tvservice-on +Source4: tvservice-ison +Patch0: %{name}-20121028git-disable_cmake_toolchain_check.patch +License: BSD +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libgcc +## AUTOBUILDREQ-END +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: git +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} +ExclusiveArch: arm +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Libraries for interfacing to Raspberry Pi GPU. + +%package -n raspberrypi-utils +Group: System/Tools +Summary: System tools for the Raspberry Pi + +%description -n raspberrypi-utils +This package contains some system tools for the Raspberry Pi. +Source: https://github.com/raspberrypi/userland.git + +%package -n libraspberrypi +Group: System/Libraries +Summary: Libraries for interfacing to Raspberry Pi GPU +Obsoletes: raspberrypi-libs +Provides: raspberrypi-libs = %{?epoch:%epoch:}%{version}-%{release} + +%description -n libraspberrypi +This package contains shared libraries for the Raspberry Pi. + +%package -n libraspberrypi-devel +Group: Development/Libraries +Summary: Development files for the Raspberry Pi GPU +Requires: libraspberrypi = %{?epoch:%epoch:}%{version}-%{release} +Obsoletes: raspberrypi-devel +Provides: raspberrypi-devel = %{?epoch:%epoch:}%{version}-%{release} + +%description -n libraspberrypi-devel +This package contains libraries and header files for developing applications that use Raspberry Pi GPU. + +%prep +%setup -q -n userland-%{version} +# -D -T +#:<< _EOF +#%patch0 -p1 + +%build +#:<< _EOF +# missing -lOpenVG +%cmake \ + -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ + -DCMAKE_BUILD_TYPE=Release +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +for lib in libmmal_core.so libmmal_util.so libvcilcs.so; do + install build/lib/$lib %{buildroot}/opt/vc/lib/$lib +done + +install -D %{S:1} %{buildroot}%{_sysconfdir}/ld.so.conf.d/vmcs.conf + +install -m0755 %{S:2} %{buildroot}/opt/vc/bin/tvservice-off +install -m0755 %{S:3} %{buildroot}/opt/vc/bin/tvservice-on +install -m0755 %{S:4} %{buildroot}/opt/vc/bin/tvservice-ison + +# remove unpackaged files +rm -f %{buildroot}/opt/vc/share/install/vmcs.conf +rm -fr %{buildroot}/opt/vc/src/hello_pi + +# FIXME: VideoCore file server daemon +rm -f %{buildroot}/opt/vc/sbin/vcfiled +rm -f %{buildroot}/opt/vc/share/install/vcfiled +rm -f %{buildroot}/etc/init.d/vcfiled + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -n libraspberrypi -p /sbin/ldconfig +%postun -n libraspberrypi -p /sbin/ldconfig + +%files -n raspberrypi-utils +%defattr(-,root,root) +#/opt/vc/bin/raspicam +/opt/vc/bin/raspistill +/opt/vc/bin/raspivid +/opt/vc/bin/raspiyuv +/opt/vc/bin/tvservice +/opt/vc/bin/tvservice-ison +/opt/vc/bin/tvservice-off +/opt/vc/bin/tvservice-on +/opt/vc/bin/vcgencmd +/opt/vc/bin/vchiq_test +%doc LICENCE + +%files -n libraspberrypi +%defattr(-,root,root) +/opt/vc/lib/libbcm_host.so +/opt/vc/lib/libEGL.so +/opt/vc/lib/libEGL_static.a +/opt/vc/lib/libGLESv2.so +/opt/vc/lib/libGLESv2_static.a +/opt/vc/lib/libkhrn_client.so +/opt/vc/lib/libkhrn_static.a +/opt/vc/lib/libmmal.so +/opt/vc/lib/libmmal_core.so +/opt/vc/lib/libmmal_util.so +/opt/vc/lib/libmmal_vc_client.so +/opt/vc/lib/libopenmaxil.so +/opt/vc/lib/libOpenVG.so +/opt/vc/lib/libvcfiled_check.so +/opt/vc/lib/libvchiq_arm.so +/opt/vc/lib/libvchostif.so +/opt/vc/lib/libvcilcs.so +/opt/vc/lib/libvcos.so +/opt/vc/lib/libvmcs_rpc_client.so +/opt/vc/lib/libWFC.so +%{_sysconfdir}/ld.so.conf.d/vmcs.conf + +%files -n libraspberrypi-devel +%defattr(-,root,root) +%dir /opt/vc/include +/opt/vc/include/EGL +/opt/vc/include/GLES +/opt/vc/include/GLES2 +/opt/vc/include/IL +/opt/vc/include/KHR +/opt/vc/include/VG +/opt/vc/include/WF +/opt/vc/include/interface +/opt/vc/include/vcinclude +/opt/vc/include/*.h + +%changelog +* Fri Jan 17 2014 Silvan Calarco 20140117git-1mamba +- update to 20140117git +- added tvservice-ison script and fixed timings in tvservice-on + +* Mon Nov 25 2013 Silvan Calarco 20131125git-1mamba +- update to 20131125git +- add convenience scripts tvservice-off and tvservice-on to allow workarounding missing power saving support (dpms) + +* Mon Apr 01 2013 Automatic Build System 20130401git-1mamba +- update to 20130401git + +* Tue Feb 12 2013 Davide Madrisan 20130207git-1mamba +- update to 20130207git + +* Sun Dec 02 2012 Davide Madrisan 20121202git-1mamba +- update to 20121202git + +* Sun Oct 28 2012 Davide Madrisan 20121028git-1mamba +- package created by autospec diff --git a/tvservice-ison b/tvservice-ison new file mode 100644 index 0000000..5dc8ff5 --- /dev/null +++ b/tvservice-ison @@ -0,0 +1,2 @@ +#!/bin/bash +/opt/vc/bin/tvservice -s | grep -v "is off" >/dev/null diff --git a/tvservice-off b/tvservice-off new file mode 100644 index 0000000..06c91bb --- /dev/null +++ b/tvservice-off @@ -0,0 +1,2 @@ +#!/bin/bash +/opt/vc/bin/tvservice -o diff --git a/tvservice-on b/tvservice-on new file mode 100644 index 0000000..d6d8e56 --- /dev/null +++ b/tvservice-on @@ -0,0 +1,2 @@ +#!/bin/bash +/opt/vc/bin/tvservice -p ; sleep 1; chvt 63; sleep 1; chvt 1;