diff --git a/unifdef.spec b/unifdef.spec index 86e07f3..71e02ec 100644 --- a/unifdef.spec +++ b/unifdef.spec @@ -1,3 +1,9 @@ +# The upstream Makefile installs unifdefall.sh as unifdefall, which makes +# sense. Older versions of this package installed it as unifdefall.sh; for +# compatibility on stable branches that had such older versions, we still +# provide that path via a symlink. +%bcond all_sh 1 + Name: unifdef Version: 2.12 Release: %autorelease @@ -57,7 +63,7 @@ additional text that they delimit, while otherwise leaving the file alone. %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/ +rm -rv FreeBSD/ %build @@ -66,6 +72,9 @@ rm --recursive --verbose FreeBSD/ %install %make_install prefix='%{_prefix}' +%if %{with all_sh} +ln -s unifdefall '%{buildroot}%{_bindir}/unifdefall.sh' +%endif %check @@ -84,6 +93,9 @@ PATH="%{buildroot}%{_bindir}:${PATH}" %make_build test %{_bindir}/unifdef %{_bindir}/unifdefall +%if %{with all_sh} +%{_bindir}/unifdefall.sh +%endif %{_mandir}/man1/unifdef.1* %{_mandir}/man1/unifdefall.1*