# Upstream does not maintain a soversion so we define one here. # abi-compliance-checker will be used to determine if an abi breakage occurs # and the soversion will be incremented. %global soversion 0.0 %global commit 05e958a100d6bdc205767bf5b52fae284c93af1e %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: collada2gltf Version: 0 Release: 3%{?dist} Summary: An open-source command-line pipeline tool that converts COLLADA to glTF License: BSD URL: https://github.com/KhronosGroup/glTF/tree/master/converter/COLLADA2GLTF # Source0: https://github.com/KhronosGroup/glTF/archive/%%{commit}/%%{name}-%%{shortcommit}.tar.gz # converter/COLLADA2GLTF, with dependecies subdir removed Source0: %{name}-%{shortcommit}-repacked.tar.xz # extracted from https://raw.githubusercontent.com/KhronosGroup/glTF/master/LICENSE.md Source1: LICENSE.md BuildRequires: cmake BuildRequires: o3dgc-devel BuildRequires: openCOLLADA-devel BuildRequires: pkgconfig(libpng) BuildRequires: rapidjson-devel Patch0: no-OpenCOLLADA-submodule.diff Patch1: OpenCOLLADA-include_dirs.diff Patch2: OpenCOLLADA-libs.diff Patch3: disable-collada2gltf-executable.diff Patch4: no-internal-o3dgc.diff Patch5: o3dgc-includes.diff Patch6: rapidjson-include.diff Patch7: 0001-set-soversion.patch %description %{name} is an open-source command-line pipeline tool that converts COLLADA to glTF. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: o3dgc-devel Requires: openCOLLADA-devel Requires: rapidjson-devel %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %autosetup -n COLLADA2GLTF -p1 cp -p %{SOURCE1} . %build %cmake \ -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ -DCMAKE_SKIP_RPATH=ON \ -DBUILD_SHARED_LIBS=ON \ -DCONVERT_SHARED=ON \ -Dsoversion=%{soversion} \ . make %{?_smp_mflags} %install install -m 0755 -d %{buildroot}%{_libdir} install -m 0755 -p libcollada2gltfConvert.so.* %{buildroot}%{_libdir} # install devel symlink cp -d -p libcollada2gltfConvert.so %{buildroot}%{_libdir} install -m 0755 -d %{buildroot}%{_includedir}/%{name} install -m 0755 -d %{buildroot}%{_includedir}/%{name}/assetModifiers install -m 0755 -d %{buildroot}%{_includedir}/%{name}/convert install -m 0755 -d %{buildroot}%{_includedir}/%{name}/GLTF install -m 0755 -d %{buildroot}%{_includedir}/%{name}/helpers install -m 0755 -d %{buildroot}%{_includedir}/%{name}/JSON install -m 0755 -d %{buildroot}%{_includedir}/%{name}/shaders install -m 0644 -p *.h %{buildroot}%{_includedir}/%{name} install -m 0644 -p assetModifiers/*.h %{buildroot}%{_includedir}/%{name}/assetModifiers install -m 0644 -p convert/*.h %{buildroot}%{_includedir}/%{name}/convert install -m 0644 -p GLTF/*.h %{buildroot}%{_includedir}/%{name}/GLTF install -m 0644 -p helpers/*.h %{buildroot}%{_includedir}/%{name}/helpers install -m 0644 -p JSON/*.h %{buildroot}%{_includedir}/%{name}/JSON install -m 0644 -p shaders/*.h %{buildroot}%{_includedir}/%{name}/shaders %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc LICENSE.md %{_libdir}/libcollada2gltfConvert.so.* %files devel %{_includedir}/%{name} %{_libdir}/libcollada2gltfConvert.so %changelog * Mon Apr 13 2015 David Tardon - 0-3 - fix requires for -devel * Fri Mar 27 2015 David Tardon - 0-2 - workaround an rpmbuild bug in F-20 * Mon Oct 20 2014 David Tardon - 0-1 - initial import