summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorXuelian Bai <xuelian.bai@samsung.com>2021-05-26 23:30:54 +0800
committerXuelian Bai <xuelian.bai@samsung.com>2024-01-25 16:28:58 +0800
commit1011813543554ebfc5cce2d1e84f632dcbfaa954 (patch)
tree2a3d58676bc2322fbe4512dba71f0b00476c0467 /packaging
parent2de1265fca722929785d9acdec4ab728c47a0254 (diff)
downloadSPIRV-Cross-1011813543554ebfc5cce2d1e84f632dcbfaa954.tar.gz
SPIRV-Cross-1011813543554ebfc5cce2d1e84f632dcbfaa954.tar.bz2
SPIRV-Cross-1011813543554ebfc5cce2d1e84f632dcbfaa954.zip
Add build support for Tizentizen
1. Add spec file 2. Add path for find_package to find local glslang and spirv-tools Change-Id: I23b60a588195ea62ebbcc96ba11d95dff17b0d77 Signed-Off-by: Xuelian Bai <xuelian.bai@samsung.com>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/spirv-cross.manifest5
-rw-r--r--packaging/spirv-cross.spec48
2 files changed, 53 insertions, 0 deletions
diff --git a/packaging/spirv-cross.manifest b/packaging/spirv-cross.manifest
new file mode 100644
index 00000000..75b0fa5e
--- /dev/null
+++ b/packaging/spirv-cross.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/spirv-cross.spec b/packaging/spirv-cross.spec
new file mode 100644
index 00000000..db42fdbb
--- /dev/null
+++ b/packaging/spirv-cross.spec
@@ -0,0 +1,48 @@
+Name: spirv-cross
+Version: 1.3.268
+Release: 0
+Summary: Khronos SPIRV-Cross
+Group: Graphics & UI Framework/GL
+License: MIT
+Source: %{name}-%{version}.tar.gz
+Source1001: %{name}.manifest
+
+BuildRequires: cmake
+BuildRequires: pkg-config
+BuildRequires: libtool
+BuildRequires: python3
+BuildRequires: glslang
+BuildRequires: spirv-tools
+
+%define BUILD_TYPE Debug
+
+%description
+SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader languages.
+
+%prep
+%setup -q
+
+%build
+cp %{SOURCE1001} .
+
+# build SPIRV headers
+mkdir build
+cd build
+cmake -DCMAKE_INSTALL_LIBDIR=%{_libdir} -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} -DCMAKE_INSTALL_DATADIR=%{_datadir} -DCMAKE_INSTALL_BINDIR=%{_bindir} ..
+make -j4
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{_libdir} %{buildroot}%{_bindir} %{buildroot}%{_includedir}
+cp -ra ./build/*.a %{buildroot}%{_libdir}
+cp -ra ./build/spirv-cross %{buildroot}%{_bindir}
+cp -ra ./build/spirv-cross-* %{buildroot}%{_bindir}
+cp -ra ./include/* %{buildroot}%{_includedir}
+
+%files
+%manifest %{name}.manifest
+%license LICENSE
+%defattr(-,root,root,-)
+%{_bindir}/*
+%{_includedir}/*
+%{_libdir}/*.a