# 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 4dd217dae1e3ee93ca2aa8cb25d0a08df8e36742 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: o3dgc Version: 0 Release: 3%{?dist} Summary: An open 3D graphics compression library # the BSD-licensed sources are src/o3dgc_common_lib/inc/o3dgcArithmeticCodec.h # and src/o3dgc_common_lib/src/o3dgcArithmeticCodec.cpp License: MIT and BSD URL: https://github.com/amd/rest3d/tree/master/server/o3dgc # https://github.com/amd/rest3d/archive/%%{commit}/%%{name}-%%{shortcommit}.tar.gz # only server/o3dgc directory Source0: %{name}-%{shortcommit}-repacked.tar.xz Source1: https://raw.githubusercontent.com/amd/rest3d/master/LICENSE.md BuildRequires: cmake Patch0: 0001-build-shared-libraries.patch %description %{name} is a library providing an efficient implementation of patent free MPEG tools for 3D graphics compression. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %autosetup -n %{name} -p3 cp -p %{SOURCE1} . # otherwise Fedora-specific flags passed through CXXFLAGS are not used sed -i -e /CMAKE_CXX_FLAGS/d src/test/CMakeLists.txt %build cd src %cmake -DCMAKE_SKIP_RPATH=ON -DCMAKE_BUILD_TYPE="RelWithDebInfo" -Dsoversion=%{soversion} -DCXXFLAGS="%{optflags}" . make %{?_smp_mflags} %install cd src install -m 0755 -d %{buildroot}%{_libdir} install -m 0755 -p o3dgc_common_lib/libo3dgc_common_lib.so.* o3dgc_decode_lib/libo3dgc_dec_lib.so.* o3dgc_encode_lib/libo3dgc_enc_lib.so.* %{buildroot}%{_libdir} # install devel symlinks cp -d -p o3dgc_common_lib/libo3dgc_common_lib.so o3dgc_decode_lib/libo3dgc_dec_lib.so o3dgc_encode_lib/libo3dgc_enc_lib.so %{buildroot}%{_libdir} install -m 0755 -d %{buildroot}%{_includedir}/%{name} install -m 0644 -p o3dgc_common_lib/inc/* o3dgc_decode_lib/inc/* o3dgc_encode_lib/inc/* %{buildroot}%{_includedir}/%{name} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc LICENSE.md README.md %{_libdir}/libo3dgc_common_lib.so.* %{_libdir}/libo3dgc_dec_lib.so.* %{_libdir}/libo3dgc_enc_lib.so.* %files devel %{_includedir}/%{name} %{_libdir}/libo3dgc_common_lib.so %{_libdir}/libo3dgc_dec_lib.so %{_libdir}/libo3dgc_enc_lib.so %changelog * Sat Apr 11 2015 David Tardon - 0-3 - add BSD to licenses * Fri Mar 27 2015 David Tardon - 0-2 - build with fedora-specific flags * Mon Oct 20 2014 David Tardon - 0-1 - initial import