%global commit0 8a7a4a39c63000ca5f41ddfce8ce80d792f6b9cc %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: graphene Version: 1.5.1 Release: 0.2.git%{shortcommit0}%{?dist} Summary: A thin layer of types for graphic libraries License: MIT URL: https://github.com/ebassi/graphene/ Source0: https://github.com/ebassi/graphene/archive/%{commit0}/graphene-%{shortcommit0}.tar.gz # https://github.com/ebassi/graphene/issues/80 ExcludeArch: ppc64 BuildRequires: gcc BuildRequires: gobject-introspection-devel BuildRequires: meson BuildRequires: pkgconfig(gobject-2.0) %description Graphene provides a small set of mathematical types needed to implement graphic libraries that deal with 2D and 3D transformations and projections. %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}. %package tests Summary: Tests for the %{name} package Requires: %{name}%{?_isa} = %{version}-%{release} %description tests The %{name}-tests package contains tests that can be used to verify the functionality of the installed %{name} package. %prep %autosetup -n graphene-%{commit0} %build # meson errors out without a utf8 LANG set # https://github.com/mesonbuild/meson/issues/1085 export LANG=en_US.utf8 %meson %meson_build %install %meson_install # Move tests to libexecdir # https://github.com/ebassi/graphene/pull/78 mkdir -p $RPM_BUILD_ROOT%{_libexecdir} mv $RPM_BUILD_ROOT%{_datadir}/installed-tests \ $RPM_BUILD_ROOT%{_libexecdir}/installed-tests %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %license LICENSE %doc README.md %{_libdir}/girepository-1.0/ %{_libdir}/libgraphene-1.0.so.0* %files devel %{_includedir}/graphene-1.0/ %dir %{_libdir}/graphene-1.0 %{_libdir}/graphene-1.0/include/ %{_libdir}/libgraphene-1.0.so %{_libdir}/pkgconfig/graphene-1.0.pc %{_libdir}/pkgconfig/graphene-gobject-1.0.pc %{_datadir}/gir-1.0/ %files tests %{_libexecdir}/installed-tests/ %changelog * Tue Nov 22 2016 Kalev Lember - 1.5.1-0.2.git8a7a4a3 - Install installed tests to libexecdir (#1397317) * Tue Nov 22 2016 Kalev Lember - 1.5.1-0.1.git8a7a4a3 - Initial Fedora packaging