## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 9; 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 Name: unifdef Version: 2.12 Release: %autorelease Summary: Selectively remove C preprocessor conditionals # The entire source is BSD-2-Clause, except: # # BSD-3-Clause: # - unifdef.1 # - FreeBSD/* (removed in %%prep, not used in the build) # # From unifdef.c: # # This code was derived from software contributed to Berkeley by Dave Yost. # It was rewritten to support ANSI C by Tony Finch. The original version of # unifdef carried the 4-clause BSD copyright licence. None of its code # remains in this version (though some of the names remain) so it now carries # a more liberal licence. License: BSD-2-Clause AND BSD-3-Clause URL: https://dotat.at/prog/unifdef/ %global forgeurl https://github.com/fanf2/unifdef # We package from the manual release archive on the website rather than from # the automatic GitHub archive, # %%{forgeurl}/archive/unifdef-%%{version}/unifdef-unifdef-%%{version}.tar.gz # even though the latter has advantages for auditability. Building unifdef # requires version.h and version.sh at the top level, and producing these # requires git history. For 2.12, the release archive and GitHub archive were # manually compared, and no unexpected discrepancies were found. Source: https://dotat.at/prog/unifdef/unifdef-%{version}.tar.xz # tests: support both *BSD and Linux ls -l permissions output # https://github.com/fanf2/unifdef/pull/14 Patch: %{forgeurl}/pull/14.patch # Fix fgets(..., size=1) # https://github.com/fanf2/unifdef/pull/15 # # Further discussion in https://github.com/fanf2/unifdef/pull/19 and # https://gcc.gnu.org/PR120205. Patch: %{forgeurl}/pull/15.patch # Don't use C23 constexpr keyword # https://github.com/fanf2/unifdef/pull/19 # Fixes compatibility with GCC 15, which defaults to C23 Patch: %{forgeurl}/pull/19.patch BuildRequires: gcc BuildRequires: make %description The unifdef utility selectively processes conditional C preprocessor #if and #ifdef directives. It removes from a file both the directives and the additional text that they delimit, while otherwise leaving the file alone. %prep %autosetup -p1 # Show that we do not use the sources in FreeBSD – even though this does not # simplify the License, since unifdef.1 is still BSD-3-Clause. rm --recursive --verbose FreeBSD/ %build %make_build %install %make_install prefix='%{_prefix}' %check PATH="%{buildroot}%{_bindir}:${PATH}" %make_build test %files %license COPYING # We do not install Changelog as documentation because it is a verbose dump of # git history, and the result would be larger than the rest of the package # combined. %doc README # Just a nicely text-formatted version of the man page %doc unifdef.txt %{_bindir}/unifdef %{_bindir}/unifdefall %{_mandir}/man1/unifdef.1* %{_mandir}/man1/unifdefall.1* %changelog ## START: Generated by rpmautospec * Fri Jul 17 2026 Fedora Release Engineering - 2.12-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild * Sun May 24 2026 Benjamin A. Beasley - 2.12-8 - Use various long options * Sat Jan 17 2026 Fedora Release Engineering - 2.12-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild * Fri Jul 25 2025 Fedora Release Engineering - 2.12-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Sat May 10 2025 Benjamin A. Beasley - 2.12-5 - Apply a patch for whitespace test regressions * Fri May 09 2025 Benjamin A. Beasley - 2.12-4 - F43+: drop spec-file conditionals and allow branches to diverge * Thu May 08 2025 Benjamin A. Beasley - 2.12-3 - Ensure build flags are set in EPEL8/9 * Thu May 08 2025 Benjamin A. Beasley - 2.12-2 - Run the tests * Thu May 08 2025 Benjamin A. Beasley - 2.12-1 - Update to 2.12 (close RHBZ#1803209) * Thu May 08 2025 Benjamin A. Beasley - 2.10-42 - Install README and unifdef.txt as documentation * Thu May 08 2025 Benjamin A. Beasley - 2.10-41 - Properly package the license text * Thu May 08 2025 Benjamin A. Beasley - 2.10-40 - Fix description * Thu May 08 2025 Benjamin A. Beasley - 2.10-39 - Update URLs to HTTPS * Thu May 08 2025 Benjamin A. Beasley - 2.10-38 - Document license breakdown and original license * Thu May 08 2025 Benjamin A. Beasley - 2.10-37 - Remove spurious BuildRequires on pkgconfig * Thu May 08 2025 Benjamin A. Beasley - 2.10-36 - Use modern %%make_build/%%make_install macros - Beginning with Fedora 43, no longer install unifdefall.sh (vs. unifdefall without the .sh extension) - The unifdefall(1) man page is now installed - Properly list man pages in %%files * Thu May 08 2025 Benjamin A. Beasley - 2.10-35 - Patch for GCC 15 / C23 (fix RHBZ#2341483) * Thu May 08 2025 Benjamin A. Beasley - 2.10-34 - Do not number the sole Source * Thu May 08 2025 Benjamin A. Beasley - 2.10-33 - Update Summary and description from upstream * Thu May 08 2025 Benjamin A. Beasley - 2.10-32 - Whitespace adjustments in the spec file * Sun Jan 19 2025 Fedora Release Engineering - 2.10-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Sat Jul 20 2024 Fedora Release Engineering - 2.10-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sat Jan 27 2024 Fedora Release Engineering - 2.10-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sat Jul 22 2023 Fedora Release Engineering - 2.10-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Sat Jan 21 2023 Fedora Release Engineering - 2.10-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Sat Jul 23 2022 Fedora Release Engineering - 2.10-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Sat Jan 22 2022 Fedora Release Engineering - 2.10-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 2.10-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Wed Jan 27 2021 Fedora Release Engineering - 2.10-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 2.10-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Fri Jan 31 2020 Fedora Release Engineering - 2.10-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Sat Jul 27 2019 Fedora Release Engineering - 2.10-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sun Feb 03 2019 Fedora Release Engineering - 2.10-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sat Jul 14 2018 Fedora Release Engineering - 2.10-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Feb 09 2018 Fedora Release Engineering - 2.10-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Aug 03 2017 Fedora Release Engineering - 2.10-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 2.10-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 2.10-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Fri Feb 05 2016 Fedora Release Engineering - 2.10-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Fri Jun 19 2015 Fedora Release Engineering - 2.10-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Mon Aug 18 2014 Fedora Release Engineering - 2.10-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sun Jun 08 2014 Fedora Release Engineering - 2.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed Feb 26 2014 Eric Smith - 2.10-1 - Update to latest upstream. * Sun Aug 04 2013 Fedora Release Engineering - 2.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sun Jun 09 2013 Eric Smith - 2.9-1 - Update to latest upstream. * Fri Feb 15 2013 Fedora Release Engineering - 2.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sun Jul 22 2012 Fedora Release Engineering - 2.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Sat Jan 14 2012 Fedora Release Engineering - 2.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Sat Apr 30 2011 Eric Smith 2.6-1 - Update to latest upstream - Upstream now includes their own strlcmp, so we no longer need to use libbsd * Mon Feb 07 2011 Fedora Release Engineering - 1.334-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Thu Feb 11 2010 Eric Smith 1.334-1 - Remove package name from summary - Change URL from FreeBSD CVS to project home page - Update source to upstream 1.334 - No longer need getline() patch - Use strlcpy from libbsd * Fri Jan 15 2010 Kyle McMartin 1.171-10 - fix unifdef ftbfs * Sun Jul 26 2009 Fedora Release Engineering - 1.171-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Wed Feb 25 2009 Fedora Release Engineering - 1.171-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Mon Feb 18 2008 Fedora Release Engineering - 1.171-7 - Autorebuild for GCC 4.3 * Wed Aug 22 2007 David Woodhouse - 1.171-6 - Rebuild * Sat Jul 15 2006 David Woodhouse - 1.171-5 - Don't redefine %%dist * Fri Jul 14 2006 Jesse Keating - 1.171-4 - Minor specfile cleanups from review * Tue May 2 2006 David Woodhouse - 1.171-3 - Minor specfile cleanups from review * Wed Apr 26 2006 David Woodhouse - 1.171-2 - Change BuildRoot * Tue Apr 25 2006 David Woodhouse - 1.171-1 - Initial import from FreeBSD CVS ## END: Generated by rpmautospec