diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..527f547 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/libetnaviv-60105d1.tar.gz diff --git a/0001-etna.h-include-other-headers-from-the-same-directory.patch b/0001-etna.h-include-other-headers-from-the-same-directory.patch new file mode 100644 index 0000000..a4c4d4f --- /dev/null +++ b/0001-etna.h-include-other-headers-from-the-same-directory.patch @@ -0,0 +1,30 @@ +From e61d9e169b05fcab4971ed8b05e6d94c85cb9c6d Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Fri, 26 Apr 2019 11:39:41 +0200 +Subject: [PATCH] etna.h: include other headers from the same directory + +Allows us to do #include instad of +-I/usr/include/etnaviv + #include when installed. +--- + src/etna.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/etna.h b/src/etna.h +index 16c12e7..78c66c7 100644 +--- a/src/etna.h ++++ b/src/etna.h +@@ -27,10 +27,10 @@ + #ifndef H_ETNA + #define H_ETNA + +-#include +-#include +-#include +-#include ++#include "common.xml.h" ++#include "cmdstream.xml.h" ++#include "etna_util.h" ++#include "viv.h" + + #include + #include diff --git a/libetnaviv.spec b/libetnaviv.spec new file mode 100644 index 0000000..87ef1f1 --- /dev/null +++ b/libetnaviv.spec @@ -0,0 +1,56 @@ +%global commit 60105d1b0755e48b37d779d8a2b9c4b458b5a2fd +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +# We don't build any binaries. +%undefine _debugsource_packages + +Name: libetnaviv +Version: 1.0.0 +Release: 1.20141102git%{shortcommit}%{?dist} +Summary: Vivante GPU user-space driver + +Group: User Interface/X Hardware Support +License: MIT +URL: https://github.com/etnaviv/libetnaviv.git +Source0: https://github.com/etnaviv/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz +# https://github.com/etnaviv/libetnaviv/pull/2 +Patch0: https://github.com/lkundrak/libetnaviv/commit/e61d9e169.patch#/0001-etna.h-include-other-headers-from-the-same-directory.patch + +%description +Project Etnaviv is an open source user-space driver for the Vivante GCxxx +series of embedded GPUs. + + +%package -n etnaviv-headers +Summary: Header files for etnaviv. +BuildArch: noarch + + +%description -n etnaviv-headers +Header files for etnaviv. + + +%prep +%setup -q -n %{name}-%{commit} +%patch0 -p1 + + +%build +# We don't actually build libetnaviv. It would only work with the out-of-tree +# galcore kernel module and needs its headers to build anyway. +# We just need the headers. + + +%install +mkdir -p %{buildroot}%{_includedir}/etnaviv/ +install -pm644 src/*.h %{buildroot}%{_includedir}/etnaviv/ + + +%files -n etnaviv-headers +%{_includedir}/etnaviv +%doc README.md + + +%changelog +* Wed Apr 24 2019 Lubomir Rintel - 1.0.0-1.20141101gitb8fb7b53 +- Initial packaging diff --git a/sources b/sources new file mode 100644 index 0000000..60bb52e --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (libetnaviv-60105d1.tar.gz) = 770b0b6052b0cac757d5052602b8175d5f3b0c9c83c304675db10eed93cb7549c9319c6dc63d0986307454a8a2d4072d0e0cab73c6d5d150fe8ce7b6271596cd