diff --git a/swig.spec b/swig.spec index 97f3fcd3bdd2314236550d3822ade16669206309..be9a49fc3facd53be31a9bc3edf20e7f8d45ff92 100644 --- a/swig.spec +++ b/swig.spec @@ -1,6 +1,6 @@ Name: swig Version: 4.3.1 -Release: 1 +Release: 2 Summary: Links C/C++/Objective C to languages for some advanced programing License: GPL-3.0-or-later AND BSD-3-Clause URL: https://swig.sourceforge.net/ @@ -51,19 +51,26 @@ Help document for the swig package. %make_build check || true %install -%make_install -install -d %{buildroot}%{_datadir}/swig -cp -a Examples %{buildroot}%{_datadir}/swig/examples -rm -rf %{buildroot}%{_datadir}/swig/examples/test-suite +# Remove all arch dependent files in Examples/ created during tests +make clean-examples + +pushd Examples/ +# Remove all arch dependent files in Examples/ +find -type f -name 'Makefile.in' -delete -print -# rm files that are not needed for running or rebuilding the examples -find %{buildroot}%{_datadir}/swig \ - -name '*.dsp' -o -name '*.vcproj' -o -name '*.sln' -o \ - -name '*.o' -o -name '*_wrap.c' -o -name '*.csproj' -o \ - -name '*.dsw' | xargs rm +# We don't want to ship files below. +rm -rf test-suite +find -type f -name '*.dsp' -delete -print +find -type f -name '*.dsw' -delete -print -find %{buildroot}%{_datadir}/swig -name '*.h' -perm /111 | \ - xargs --no-run-if-empty chmod -x +# Convert files to UNIX format +for all in `find -type f`; do + dos2unix -k $all + chmod -x $all +done +popd + +%make_install echo "Options:" >help_swig %{buildroot}%{_bindir}/swig --help >>help_swig @@ -87,17 +94,19 @@ install -pm 644 Tools/swig.gdb %{buildroot}%{_datadir}/%{name}/gdb %files %{_bindir}/%{name} %{_datadir}/%{name} -%exclude %{_datadir}/%{name}/examples %license LICENSE LICENSE-GPL LICENSE-UNIVERSITIES COPYRIGHT %files help %license LICENSE LICENSE-GPL LICENSE-UNIVERSITIES %doc Doc/{Devel,Manual} README TODO -%{_datadir}/%{name}/examples +%doc Examples %doc ANNOUNCE CHANGES CHANGES.current %{_mandir}/man1/swig.1* %changelog +* Wed Aug 06 2025 Funda Wang - 4.3.1-2 +- mark examples as doc + * Sat Jun 14 2025 Funda Wang - 4.3.1-1 - update to 4.3.1