%define devtoolset %{nil} %if 0%{?rhel} %if 0%{?rhel} <= 6 # cc1plus: error: unrecognized command line option "-std=c++11" %define devtoolset 6 %endif %endif %define doc_license %{nil} %define doc_license 1 %if 0%{?rhel}%{?fedora} %if 0%{?rhel} %if 0%{?rhel} < 7 %define doc_license 0 %endif %else %if 0%{?fedora} < 19 %define doc_license 0 %endif %endif %endif %define license_files LICENSE Name: darling-dmg Version: 1.0.4 Release: 4%{?dist} Summary: FUSE module for .dmg files (containing an HFS+ filesystem) License: GPLv3 Group: System Environment/Base URL: https://github.com/darlinghq/darling-dmg Source0: https://github.com/darlinghq/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz # /builddir/build/BUILD/darling-dmg-1.0.4/src/main-fuse.cpp:137:28: error: 'function' is not a member of 'std' Patch0: darling-dmg-1.0.4-gcc7.patch BuildRequires: tar BuildRequires: gzip BuildRequires: libstdc++ BuildRequires: make BuildRequires: cmake BuildRequires: fuse BuildRequires: fuse-devel BuildRequires: icu BuildRequires: libicu-devel BuildRequires: openssl-devel BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: libxml2-devel # for: make test BuildRequires: boost-devel %if 0%{?devtoolset} BuildRequires: devtoolset-%{devtoolset}-gcc BuildRequires: devtoolset-%{devtoolset}-gcc-c++ # Better safe than sorry... BuildRequires: devtoolset-%{devtoolset} BuildRequires: devtoolset-%{devtoolset}-build BuildRequires: devtoolset-%{devtoolset}-libstdc++-devel BuildRequires: devtoolset-%{devtoolset}-libasan-devel BuildRequires: devtoolset-%{devtoolset}-runtime %if %{?devtoolset} >= 6 BuildRequires: devtoolset-%{devtoolset}-make %endif Requires: devtoolset-%{devtoolset} Requires: devtoolset-%{devtoolset}-runtime %else BuildRequires: gcc-c++ %endif Requires: fuse %description This project allows ordinary users to directly mount OS X disk images under Linux via FUSE. %prep %setup -q %patch0 -p1 -b .orig %build %if 0%{?devtoolset} export CC="/opt/rh/devtoolset-%{devtoolset}/root%{_bindir}/gcc" export CPP="/opt/rh/devtoolset-%{devtoolset}/root%{_bindir}/cpp" export CXX="/opt/rh/devtoolset-%{devtoolset}/root%{_bindir}/c++" source /opt/rh/devtoolset-%{devtoolset}/enable %endif %{cmake} -DWITH_TESTS=1 %{__make} VERBOSE=1 %{?_smp_mflags} %install %{__install} -d "%{buildroot}%{_bindir}" %{__install} -p -m 0755 "%{name}" "%{buildroot}%{_bindir}" %{__install} -d "%{buildroot}%{_libdir}" %{__install} -p -m 0755 "libdmg.so" "%{buildroot}%{_libdir}" %check %{__make} %{?_smp_mflags} test %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %if 0%{?doc_license} %license %{license_files} %else %doc %{license_files} %endif %doc README.md %{_bindir}/%{name} %{_libdir}/libdmg.so %changelog * Mon Oct 30 2017 Tomasz Tomasik - 1.0.4-4 - Add post and postun sections. * Mon Oct 30 2017 Tomasz Tomasik - 1.0.4-3 - Fix the files section for EL6. * Mon Oct 30 2017 Tomasz Tomasik - 1.0.4-2 - Enable Devtoolset for EL6. - Add patch for GCC7. * Mon Oct 30 2017 Tomasz Tomasik - 1.0.4-1 - Initial RPM packaging for EL7.