Name: libsmbios-cpp Version: 2.3.3 Release: 1%{?dist} Summary: Libsmbios C++ shared libraries License: (GPLv2+ or OSL 2.1) and Boost URL: https://github.com/dell/libsmbios Source0: %{url}/archive/v%{version}/libsmbios-%{version}.tar.gz Patch0: disable-unwanted-components.patch BuildRequires: libxml2-devel BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: gcc-c++ BuildRequires: hardlink # libsmbios only ever makes sense on intel compatible arches # no DMI tables on ppc, s390, etc. ExclusiveArch: x86_64 %{ix86} # The EPEL libsmbios package previously contained the C++ interface. RHEL 7.5 # added libsmbios, but without the C++ interface. Conflict with the final EPEL # NVR to reflect the conflicting files. See rhbz#1562440 for more info. Conflicts: libsmbios <= 2.3.3-7 %description Libsmbios is a library and utilities that can be used by client programs to get information from standard BIOS tables, such as the SMBIOS table. This package provides the C++-based libsmbios library, with a C++ interface. It is not actively maintained, but provided for backwards compatibility. New programs should use the libsmbios C interface. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Conflicts: libsmbios-devel <= 2.3.3-7 %description devel Libsmbios is a library and utilities that can be used by client programs to get information from standard BIOS tables, such as the SMBIOS table. This package contains the headers and .a files necessary to compile new client programs against libsmbios. %prep %autosetup -n libsmbios-%{version} find . -type d -exec chmod -f 755 {} \; find doc src -type f -exec chmod -f 644 {} \; %build # this line lets us build an RPM directly from a git tarball # and retains any customized version information we might have [ -e ./configure ] || PACKAGE_VERSION=%{version} ./autogen.sh --no-configure mkdir _build cd _build echo '../configure "$@"' > configure chmod +x ./configure %configure \ --enable-libsmbios_cxx \ --disable-doxygen \ --disable-graphviz \ --disable-python mkdir -p out/libsmbios_c mkdir -p out/libsmbios_c++ make CFLAGS="-Werror" %{?_smp_mflags} 2>&1 | tee build-%{_arch}.log echo \%doc _build/build-%{_arch}.log > buildlogs.txt %install cd _build TOPDIR=.. make install DESTDIR=%{buildroot} INSTALL="%{__install} -p" mkdir -p %{buildroot}/%{_includedir} cp -a $TOPDIR/src/include/smbios %{buildroot}/%{_includedir}/ cp -a out/public-include/smbios %{buildroot}/%{_includedir}/ rm %{buildroot}/%{_libdir}/lib*.{la,a} find %{buildroot}/%{_includedir} out/libsmbios_c++ -exec touch -r $TOPDIR/configure.ac {} \; mv out/libsmbios_c++ out/libsmbios_c++-%{_arch} # hardlink files to save some space. /usr/sbin/hardlink -c -v %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %license COPYING COPYING-GPL COPYING-OSL src/include/smbios/config/boost_LICENSE_1_0_txt %{_libdir}/libsmbios.so.* %files devel %doc README.md %{_includedir}/smbios %{_libdir}/libsmbios.so %{_libdir}/pkgconfig/libsmbios_c++.pc %doc _build/out/libsmbios_c++-%{_arch} %changelog * Tue May 22 2018 Carl George - 2.3.3-1 - Initial package based on libsmbios spec file