# these are all substituted by autoconf %define pot_file libsmbios %define lang_dom libsmbios-2.4 Name: libsmbios Version: 2.4.2 Release: 3 Summary: Interface with the SMBIOS tables License: GPLv2+ or OSL 2.1 URL: https://github.com/dell/libsmbios Source0: https://github.com/dell/libsmbios/archive/v%{version}/libsmbios-%{version}.tar.gz Patch0001: 0001-libsmbios-fix-more-places-with-loop-iterators-with-b.patch BuildRequires: autoconf automake cppunit-devel doxygen gcc-c++ gettext gettext-devel BuildRequires: git help2man libtool libxml2-devel pkgconfig python3-devel strace valgrind ExclusiveArch: x86_64 %{ix86} %description This package provides a library to interface with the SMBIOS tables. It also provides extensions for proprietary methods of interfacing with Dell specific SMBIOS tables. %package -n python3-smbios Summary: Python interface to Libsmbios C library Requires: %{name} = %{version}-%{release} python3 Obsoletes: python-smbios < 2.4.1 %description -n python3-smbios This package provides a Python interface to %{name}. %package -n smbios-utils Summary: Meta-package that pulls in all smbios binaries and python scripts Requires: smbios-utils-bin smbios-utils-python %description -n smbios-utils This is a meta-package that pulls in the binary libsmbios executables as well as the python executables. %package -n smbios-utils-bin Summary: Binary utilities that use %{name} Requires: %{name} = %{version}-%{release} %description -n smbios-utils-bin Get BIOS information, such as System product name, product id, service tag and asset tag. %package -n smbios-utils-python Summary: Python executables that use %{name} Requires: python3-smbios = %{version}-%{release} %description -n smbios-utils-python Get BIOS information, such as System product name, product id, service tag and asset tag. Set service and asset tags on Dell machines. Manipulate wireless cards/bluetooth on Dell laptops. Set BIOS password on select Dell systems. Update BIOS on select Dell systems. Set LCD brightness on select Dell laptops. %package devel Summary: Development headers and archives Requires: %{name} = %{version}-%{release} %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. %package_help %prep %autosetup -n libsmbios-%{version} -p1 -Sgit %build [ -e ./configure ] || PACKAGE_VERSION=%{version} ./autogen.sh --no-configure mkdir _build cd _build echo '../configure "$@"' > configure chmod +x ./configure %configure mkdir -p out/libsmbios_c make CFLAGS+="%{optflags} -Werror" %{?_smp_mflags} 2>&1 | tee build-%{_arch}.log echo \%doc _build/build-%{_arch}.log > buildlogs.txt %check runtest() { mkdir _$1$2 pushd _$1$2 ../configure make -e $1 CFLAGS="$CFLAGS -DDEBUG_OUTPUT_ALL" 2>&1 | tee $1$2.log touch -r ../configure.ac $1$2-%{_arch}.log make -e $1 2>&1 | tee $1$2.log popd echo \%doc _$1$2/$1$2-%{_arch}.log >> _build/buildlogs.txt } VALGRIND="strace -f" runtest check strace > /dev/null || echo FAILED strace check runtest valgrind > /dev/null || echo FAILED valgrind check runtest check > /dev/null || echo FAILED check %install cd _build TOPDIR=.. %make_install %delete_la_and_a find %{buildroot}/%{_includedir} out/libsmbios_c -exec touch -r $TOPDIR/configure.ac {} \; mv out/libsmbios_c out/libsmbios_c-%{_arch} rename %{pot_file}.mo %{lang_dom}.mo $(find %{buildroot}/%{_datadir} -name %{pot_file}.mo) %find_lang %{lang_dom} %pre %post /sbin/ldconfig %preun %postun /sbin/ldconfig %files -f _build/%{lang_dom}.lang %{_libdir}/libsmbios_c.so.* %files -n libsmbios-devel -f _build/buildlogs.txt %doc COPYING-GPL COPYING-OSL README.md src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt %{_includedir}/smbios_c %{_libdir}/libsmbios_c.so %{_libdir}/pkgconfig/*.pc %doc _build/out/libsmbios_c-%{_arch} %files -n smbios-utils %doc COPYING-GPL COPYING-OSL README.md %files -n smbios-utils-bin %doc COPYING-GPL COPYING-OSL README.md %doc src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt %{_sbindir}/smbios-state-byte-ctl %{_sbindir}/smbios-get-ut-data %{_sbindir}/smbios-upflag-ctl %{_sbindir}/smbios-sys-info-lite %files -n python3-smbios %doc COPYING-GPL COPYING-OSL README.md %{python3_sitearch}/* %files -n smbios-utils-python %doc COPYING-GPL COPYING-OSL README.md %doc src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt %dir %{_sysconfdir}/libsmbios %config(noreplace) %{_sysconfdir}/libsmbios/* %{_sbindir}/smbios-battery-ctl %{_sbindir}/smbios-sys-info %{_sbindir}/smbios-token-ctl %{_sbindir}/smbios-passwd %{_sbindir}/smbios-wakeup-ctl %{_sbindir}/smbios-wireless-ctl %{_sbindir}/smbios-lcd-brightness %{_sbindir}/smbios-keyboard-ctl %{_sbindir}/smbios-thermal-ctl %{_datadir}/smbios-utils %files help %{_mandir}/man?/smbios-* %changelog * Tue Dec 10 2019 openEuler Buildteam - 2.4.2-3 - Package init