## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global commit 660795b2834aebb2217c9849d668b6e4bd4ef810 %global snapdate 20241216 Name: dr_libs # While the individual header-only libraries are versioned, the overall # collection is not, and there are no releases. These libraries follow the # general practices of stb, so see also: # https://github.com/nothings/stb/issues/359 # https://github.com/nothings/stb/issues/1101 %global snapinfo ^%{snapdate}git%{sub %{commit} 1 7} Version: 0%{snapinfo} Release: %autorelease Summary: Single-file audio decoding libraries for C/C++ URL: https://github.com/mackron/dr_libs # See LICENSE. License: Unlicense OR MIT-0 # Additionally, the following are under different terms, but are not used; to # make certain, they are removed in %%prep. # - old/*.h are Unlicense (only) # # The test file sintel_trailer-audio.flac, Source125, is CC-BY-3.0. SourceLicense: (%{license}) AND Unlicense AND CC-BY-3.0 %global dr_flac_version 0.12.43 %global dr_mp3_version 0.6.40 %global dr_wav_version 0.13.17 Source0: %{url}/archive/%{commit}/dr_libs-%{commit}.tar.gz # Upstream does not provide a build system for the tests. We have written a # downstream Makefile that builds and runs all but the “playback” tests. (We do # not want to handle those, since they requires sound hardware on the build # host, and also require an additional “minaudio” dependency.) Source1: Makefile # Upstream instructs that the FLAC library should be tested with the FLAC files # from https://media.xiph.org/. Normally, we would like to test the code the # same way upstream recommends, but there are some reasons not to: # # • There is not a single-file archive for these, so we would have a number # of individual sources. This is annoying but workable. # • These files are HUGE—over 2GiB in total—yet not particularly designed to # exercise a large variety of decoder feeatures. The limited benefit of # packaging them all in the source RPM does not seem worth the cost in # storage and bandwidth. # # We compromise by picking only the single smallest FLAC to test. The Source#: # declarations for the remaining FLAC files and archives of FLAC files are # preserved as comments below. # # Note that none of the FLAC files used for testing are installed, so their # licenses do not affect the License field. # From short film “Elephant’s Dream”, CC-BY-2.5: # https://media.xiph.org/ED/readme.txt # https://media.xiph.org/ED/ED-CM-readme.txt # Having the README in the SRPM ensures we satisfy CC-BY-2.5. #Source100: https://media.xiph.org/ED/EC-CM-readme.txt #Source101: https://media.xiph.org/ED/ED-CM-5.1-DVD-C.flac #Source102: https://media.xiph.org/ED/ED-CM-5.1-DVD-L.flac #Source103: https://media.xiph.org/ED/ED-CM-5.1-DVD-LFE.flac #Source104: https://media.xiph.org/ED/ED-CM-5.1-DVD-LS.flac #Source105: https://media.xiph.org/ED/ED-CM-5.1-DVD-R.flac #Source106: https://media.xiph.org/ED/ED-CM-5.1-DVD-RS.flac #Source107: https://media.xiph.org/ED/ED-CM-5.1-DVD.flac #Source108: https://media.xiph.org/ED/ED-CM-St-16bit.flac # From short film “Big Buck Bunny”, CC-BY-3.0: # https://peach.blender.org/about/ # https://media.xiph.org/BBB/bbb3d/README.txt # Having the README in the SRPM ensures we satisfy CC-BY-3.0. #Source110: https://media.xiph.org/BBB/bbb3d/README.txt#/BBB-README.txt #Source111: https://media.xiph.org/BBB/BigBuckBunny-DVDMaster-5_1-FLAC.zip #Source112: https://media.xiph.org/BBB/BigBuckBunny-stereo.flac #Source113: https://media.xiph.org/BBB/BigBuckBunny-surround.flac #Source114: https://media.xiph.org/BBB/bbb3d/audio/bbb3d_sunflower_soundtrack_surround.flac # From short film “Sintel”, CC-BY-3.0: # https://durian.blender.org/about/ # https://media.xiph.org/sintel/README.txt # Having the README in the SRPM ensures we satisfy CC-BY-3.0. Source120: https://media.xiph.org/sintel/README.txt#/sintel-README.txt #Source121: https://media.xiph.org/sintel/Jan_Morgenstern-Sintel-FLAC.zip #Source122: https://media.xiph.org/sintel/sintel-master-51-flac.zip #Source123: https://media.xiph.org/sintel/sintel-master-51.flac #Source124: https://media.xiph.org/sintel/sintel-master-st.flac Source125: https://media.xiph.org/sintel/sintel_trailer-audio.flac # From short film “Tears of Steel”, CC-BY-3.0: # https://media.xiph.org/tearsofsteel/README.txt # Having the README in the SRPM ensures we satisfy CC-BY-3.0. #Source130: https://media.xiph.org/tearsofsteel/README.txt#/tearsofsteel-README.txt #Source131: https://media.xiph.org/tearsofsteel/tearsofsteel-stereo.flac #Source132: https://media.xiph.org/tearsofsteel/tearsofsteel-surround.flac # From short film “Cosmos Laundromat”, CC-BY-SA-4.0: # https://media.xiph.org/cosmoslaundromat/README.txt # Having the README in the SRPM ensures we satisfy CC-BY-SA-4.0. #Source140: https://media.xiph.org/cosmoslaundromat/README.txt#/cosmoslaundromat-README.txt #Source141: https://media.xiph.org/cosmoslaundromat/Cosmos_Laundromat_1.flac # For tests: BuildRequires: make BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: pkgconfig(flac) BuildRequires: pkgconfig(sndfile) # No compiled binaries are installed, so this would be empty. %global debug_package %{nil} %description %{summary}. %package devel Summary: Development files for dr_libs BuildArch: noarch # Dependent packages should prefer to BuildRequire the -static packages for the # specific dr_libs libraries they use. Provides: dr_libs-static = %{version}-%{release} Requires: dr_flac-devel = %{dr_flac_version}%{snapinfo}-%{release} Requires: dr_flac-static = %{dr_flac_version}%{snapinfo}-%{release} Requires: dr_mp3-devel = %{dr_mp3_version}%{snapinfo}-%{release} Requires: dr_mp3-static = %{dr_mp3_version}%{snapinfo}-%{release} Requires: dr_wav-devel = %{dr_wav_version}%{snapinfo}-%{release} Requires: dr_wav-static = %{dr_wav_version}%{snapinfo}-%{release} %description devel The dr_libs-devel package contains libraries and header files for developing applications that use dr_libs. This is a metapackage that requires the -devel packages for all dr_libs libraries. %package -n dr_flac-devel Summary: FLAC audio decoder Version: %{dr_flac_version}%{snapinfo} BuildArch: noarch Provides: dr_flac-static = %{dr_flac_version}%{snapinfo}-%{release} %description -n dr_flac-devel FLAC audio decoder. %package -n dr_mp3-devel Summary: MP3 audio decoder Version: %{dr_mp3_version}%{snapinfo} BuildArch: noarch Provides: dr_mp3-static = %{dr_mp3_version}%{snapinfo}-%{release} %description -n dr_mp3-devel MP3 audio decoder. Based off minimp3 (https://github.com/lieff/minimp3). %package -n dr_wav-devel Summary: WAV audio loader and writer Version: %{dr_wav_version}%{snapinfo} BuildArch: noarch Provides: dr_wav-static = %{dr_wav_version}%{snapinfo}-%{release} %description -n dr_wav-devel WAV audio loader and writer. %package doc Summary: Documentation for dr_libs BuildArch: noarch %description doc Documentation for dr_libs. %prep %autosetup -n dr_libs-%{commit} cp -p '%{SOURCE1}' tests/ # Remove some unused parts of the source tree that could contribute different # (but acceptable) license terms if they were used—just to prove that we do not # use them. rm -rvf old flacdir='tests/testvectors/flac/tests' mkdir -p "${flacdir}" cp -vp '%{SOURCE125}' "${flacdir}" rm -rvf "${flacdir}/"*.md # If we were testing with ALL of the FLAC files from from # https://media.xiph.org/: #cp -vp \ # '%%{SOURCE101}' '%%{SOURCE102}' '%%{SOURCE103}' '%%{SOURCE104}' \ # '%%{SOURCE105}' '%%{SOURCE106}' '%%{SOURCE107}' '%%{SOURCE108}' \ # '%%{SOURCE112}' '%%{SOURCE113}' '%%{SOURCE114}' \ # '%%{SOURCE123}' '%%{SOURCE124}' '%%{SOURCE125}' \ # '%%{SOURCE131}' '%%{SOURCE132}' \ # '%%{SOURCE141}' \ # "${flacdir}" #for zipfile in '%%{SOURCE111}' '%%{SOURCE121}' '%%{SOURCE122}' #do # unzip "${zipfile}" -d "${flacdir}" #done #mv -v \ # "${flacdir}/Jan_Morgenstern-Sintel-FLAC/"*.flac \ # "${flacdir}/sintel-master-51-flac/"*.flac \ # "${flacdir}" #rm -rvf \ # "${flacdir}/Jan_Morgenstern-Sintel-FLAC" \ # "${flacdir}/sintel-master-51-flac" \ # "${flacdir}/__MACOSX" \ # "${flacdir}/"*.md %build # There is no compiled code to install, since all dr_libs libraries are # header-only. We do need to build the tests. %make_build -C tests %install install -t '%{buildroot}%{_includedir}' -p -m 0644 -D dr_*.h %check # We could append -j1 to override _smp_mflags and prevent interleaving of test # output lines—at the cost of slower execution, of course. %make_build -C tests check # As a sanity check, verify that all of the subpackage version numbers appear # in the corresponding headers. while read -r version header do grep -E "\\bv$(echo "${version}" | sed -r 's/\./\\./g')\\b" \ "%{buildroot}%{_includedir}/${header}" >/dev/null done <<'EOF' %{dr_flac_version} dr_flac.h %{dr_mp3_version} dr_mp3.h %{dr_wav_version} dr_wav.h EOF %files devel # Empty metapackage %files doc %license LICENSE %doc README.md %files -n dr_flac-devel %license LICENSE %{_includedir}/dr_flac.h %files -n dr_mp3-devel %license LICENSE %{_includedir}/dr_mp3.h %files -n dr_wav-devel %license LICENSE %{_includedir}/dr_wav.h %changelog ## START: Generated by rpmautospec * Tue Dec 17 2024 Benjamin A. Beasley - 0^20241216git660795b-1 - Update to 0^20241216git660795b - dr_flac 0.12.43: Fix a possible buffer overflow during decoding. Improve detection of ARM64EC. - dr_mp3 0.6.40: Improve detection of ARM64EC - dr_wav 0.13.17: Fix a possible crash when reading from MS-ADPCM encoded files. Improve detection of ARM64EC. * Thu Dec 12 2024 Benjamin A. Beasley - 0^20240226gitda35f9d-4 - Add a SourceLicense field * Wed Jul 17 2024 Fedora Release Engineering - 0^20240226gitda35f9d-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Tue Feb 27 2024 Benjamin A. Beasley - 0^20240226gitda35f9d-1 - Update to 0^20240226gitda35f9d (dr_wav 0.13.15, dr_mp3 0.6.39, dr_flac 0.12.42) * Wed Jan 24 2024 Fedora Release Engineering - 0^20230806gitd35a3bc-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jan 19 2024 Fedora Release Engineering - 0^20230806gitd35a3bc-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Tue Oct 10 2023 Benjamin A. Beasley - 0^20230806gitd35a3bc-1 - Update to 0^20230806gitd35a3bc (dr_mp3 0.6.37, dr_wav 0.13.12) * Tue Oct 10 2023 Benjamin A. Beasley - 0^20230617git056b6f5-3 - Fedora, EPEL9+: drop the initial “0.” from the Release * Wed Jul 19 2023 Fedora Release Engineering - 0^20230617git056b6f5-0.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Sat Jun 17 2023 Benjamin A. Beasley - 0^20230617git056b6f5-0.1 - Update to 056b6f5 (dr_wav 0.13.10, dr_mp3 0.6.36, dr_flac 0.12.41) * Sat Jun 03 2023 Benjamin A. Beasley - 0^20230522gitc2e2189-0.2 - Remove explicit %%set_build_flags, not needed since F36 * Thu May 25 2023 Benjamin A. Beasley - 0^20230522gitc2e2189-0.1 - Update to c2e2189 (dr_wav 0.13.9, dr_mp3 0.6.35, dr_flac 0.12.40) * Wed Apr 12 2023 Benjamin A. Beasley - 0^20230324git4b3d078-0.1 - Update to 4b3d078 (dr_wav 0.13.8) * Thu Jan 19 2023 Fedora Release Engineering - 0^20220917gitdd762b8-0.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Sun Sep 18 2022 Benjamin A. Beasley - 0^20220917gitdd762b8-0.2 - Fix missing source * Sun Sep 18 2022 Benjamin A. Beasley - 0^20220917gitdd762b8-0.1 - Update to dd762b8 (dr_flac 0.12.39, dr_mp3 0.6.34, dr_wav 0.13.7) * Wed Aug 31 2022 Benjamin A. Beasley - 0^20220410git15f37e3-0.4 - Fix SSE4.1 instructions generated on x86_64 * Sun Jul 31 2022 Benjamin A. Beasley - 0^20220410git15f37e3-0.3 - Update License field to SPDX * Thu Jul 21 2022 Fedora Release Engineering - 0^20220410git15f37e3-0.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Apr 20 2022 Benjamin A. Beasley - 0^20220410git15f37e3-0.1 - Drop “forge” macros to switch to modern snapshot versioning * Sun Apr 10 2022 Benjamin A. Beasley - 0-0.16 - Update to 15f37e3 (dr_flac 0.12.38, dr_mp3 0.6.33, dr_wav 0.13.6) * Thu Mar 31 2022 Benjamin A. Beasley - 0-0.15 - Update to c72913 (dr_flac 0.12.37) * Mon Feb 07 2022 Benjamin A. Beasley - 0-0.14 - Missing parts of previous commit * Mon Feb 07 2022 Benjamin A. Beasley - 0-0.13 - Update to 1e42667 * Thu Jan 20 2022 Fedora Release Engineering - 0-0.12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jan 07 2022 Benjamin A. Beasley - 0-0.11 - Update to 4aff565 (dr_flac 0.12.34) * Wed Dec 22 2021 Benjamin A. Beasley - 0-0.10 - Update to c5e5355 (dr_mp3 0.6.32, dr_flac 0.12.33) * Thu Dec 16 2021 Benjamin A. Beasley - 0-0.9 - Let the -devel packages be noarch * Wed Dec 08 2021 Benjamin A. Beasley - 0-0.8 - Update to 49de65c (dr_wav 0.13.4) * Wed Nov 24 2021 Benjamin A. Beasley - 0-0.7 - Restore missing sintel_trailer-audio.flac source * Wed Nov 24 2021 Benjamin A. Beasley - 0-0.6 - Update to 4a108a8 (dr_wav 0.13.3) * Sat Oct 02 2021 Benjamin A. Beasley - 0-0.5 - Update to f13cbcf (dr_wav 0.13.2) * Fri Sep 24 2021 Benjamin A. Beasley - 0-0.4 - Update to 8900af1 with dr_mp3 0.6.31 * Fri Sep 24 2021 Benjamin A. Beasley - 0-0.3 - Reduce macro indirection in spec file * Tue Aug 17 2021 Benjamin A. Beasley - 0-0.2 - Improved patch for flac seeking tests from upstream * Tue Aug 17 2021 Benjamin A. Beasley - 0-0.1 - Initial package ## END: Generated by rpmautospec