11Vendor: Microsoft Corporation
22Distribution: Azure Linux
3- # This package depends on automagic byte compilation
4- # https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
5- %global _python_bytecompile_extra 1
6-
73# these are all substituted by autoconf
84%define pot_file libsmbios
95%define lang_dom libsmbios-2.4
106
117Name: libsmbios
12- Version: 2.4.2
13- Release: 8 %{?dist }
8+ Version: 2.4.3
9+ Release: 1 %{?dist }
1410Summary: Libsmbios C/C++ shared libraries
1511
16- License: GPLv2+ or OSL 2.1
12+ License: GPL-2.0 -or-later or OSL- 2.1
1713URL: https://github.com/dell/libsmbios
1814Source0: https://github.com/dell/libsmbios/archive/v%{version }/libsmbios-%{version }.tar.gz
1915
20- Patch0001: 0001-libsmbios-fix-more-places-with-loop-iterators-with-b.patch
21-
2216BuildRequires: autoconf
2317BuildRequires: automake
2418BuildRequires: cppunit-devel
2519BuildRequires: doxygen
2620BuildRequires: gcc-c++
2721BuildRequires: gettext
2822BuildRequires: gettext-devel
29- BuildRequires: git
3023BuildRequires: help2man
3124BuildRequires: libtool
3225BuildRequires: libxml2-devel
26+ BuildRequires: make
3327BuildRequires: pkgconfig
3428BuildRequires: python3-devel
3529BuildRequires: strace
@@ -94,19 +88,11 @@ This package contains the headers and .a files necessary to compile new client
9488programs against libsmbios.
9589
9690%prep
97- %setup -q -n libsmbios-%{version }
91+ %autosetup -p1
92+
9893find . -type d -exec chmod -f 755 {} \;
9994find doc src -type f -exec chmod -f 644 {} \;
10095chmod 755 src/cppunit/*.sh
101- git init
102- git config user.email " %{name}-owner@fedoraproject.org"
103- git config user.name " Fedora Ninjas"
104- git config gc.auto 0
105- git add .
106- git commit -a -q -m " %{version} baseline."
107- git am %{patches } < /dev/null
108- git config --unset user.email
109- git config --unset user.name
11096
11197%build
11298# this line lets us build an RPM directly from a git tarball
@@ -119,9 +105,8 @@ echo '../configure "$@"' > configure
119105chmod +x ./configure
120106
121107%configure
122-
123108mkdir -p out/libsmbios_c
124- make CFLAGS+= "%{optflags } -Werror" %{? _smp_mflags } 2> &1 | tee build-%{_arch }.log
109+ % make_build CFLAGS+= "%{optflags } -Werror" 2> &1 | tee build-%{_arch }.log
125110
126111echo \%doc _build/build-%{_arch }.log > buildlogs.txt
127112
@@ -150,28 +135,29 @@ find %{buildroot}/%{_includedir} out/libsmbios_c -exec touch -r $TOPDIR/configur
150135
151136mv out/libsmbios_c out/libsmbios_c-%{_arch }
152137
138+ # https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_3
139+ %py_byte_compile %{python3 } %{buildroot }%{python3_sitearch }/
140+
153141rename %{pot_file }.mo %{lang_dom }.mo $(find %{buildroot }/%{_datadir } -name %{pot_file }.mo)
154142%find_lang %{lang_dom }
155143
156144%ldconfig_scriptlets
157-
158145%files -f _build/%{lang_dom }.lang
146+ # Only need to include license once here
147+ %license COPYING-GPL COPYING-OSL
159148%{_libdir }/libsmbios_c.so.*
160149
161150%files -n libsmbios-devel -f _build/buildlogs.txt
162- %doc COPYING-GPL COPYING-OSL README.md src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
151+ %license src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
152+ %doc README.md _build/out/libsmbios_c-%{_arch }
163153%{_includedir }/smbios_c
164154%{_libdir }/libsmbios_c.so
165155%{_libdir }/pkgconfig/* .pc
166- %doc _build/out/libsmbios_c-%{_arch }
167156
168157%files -n smbios-utils
169- %doc COPYING-GPL COPYING-OSL README.md
170- # no other files.
171158
172159%files -n smbios-utils-bin
173- %doc COPYING-GPL COPYING-OSL README.md
174- %doc src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
160+ %license src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
175161%{_sbindir }/smbios-state-byte-ctl
176162%{_mandir }/man? /smbios-state-byte-ctl.*
177163%{_sbindir }/smbios-get-ut-data
@@ -182,12 +168,10 @@ rename %{pot_file}.mo %{lang_dom}.mo $(find %{buildroot}/%{_datadir} -name %{pot
182168%{_mandir }/man? /smbios-sys-info-lite.*
183169
184170%files -n python3-smbios
185- %doc COPYING-GPL COPYING-OSL README.md
186171%{python3_sitearch }/*
187172
188173%files -n smbios-utils-python
189- %doc COPYING-GPL COPYING-OSL README.md
190- %doc src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
174+ %license src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
191175%dir %{_sysconfdir }/libsmbios
192176%config(noreplace) %{_sysconfdir }/libsmbios/*
193177
@@ -215,6 +199,10 @@ rename %{pot_file}.mo %{lang_dom}.mo $(find %{buildroot}/%{_datadir} -name %{pot
215199%{_datadir }/smbios-utils
216200
217201%changelog
202+ * Tue Nov 12 2024 Sumit Jena <v-sumitjena@microsoft.com> - 2.4.3-1
203+ - Update to version 2.4.3
204+ - License verified.
205+
218206* Fri Oct 15 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 2.4.2-8
219207- Initial CBL-Mariner import from Fedora 32 (license: MIT).
220208
0 commit comments