diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..29c47e2 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + man + diff --git a/tiff.changes b/tiff.changes index 8344aea..76249bb 100644 --- a/tiff.changes +++ b/tiff.changes @@ -1,3 +1,40 @@ +------------------------------------------------------------------- +Tue Nov 12 14:40:24 UTC 2024 - Marcus Rueckert + +- make doc packages noarch. no need to have those per arch +- ensure that the src rpms are named per build flavor: + You might now ask why. Good question: + + 1. the spec file during the build get patched. `@BUILD_FLAVOR@` + gets replaced with the value. which means the src rpm between + build flavor builds is not identical. Also the last built + src.rpm will be published. with different content and runtime + requires (aka our BuildRequires). + + 2. for historical reasons the internal dependency tracking goes + via the src.rpm package. So without having differently named + src.rpms the build cycle we were trying to solve was not + actually solved. So we append a suffix to the Name attribute + in the preamble now. + +------------------------------------------------------------------- +Mon Nov 11 17:34:34 UTC 2024 - Marcus Rueckert + +- In the previous change to enable the cmake based build + we also needed python3-Sphinx to build the man pages, as unlike + the autotools based build, the cmake based build does not fall + back to the pre-built man pages. + + This causes build cycle. Split out the documentation building to + break the cycle. The Tumbleweed release managers preferred this + solution over a mini package. + +------------------------------------------------------------------- +Sat Nov 9 22:56:55 UTC 2024 - Marcus Rueckert + +- switch build to cmake for the webp build - we need the cmake + finder code + ------------------------------------------------------------------- Wed Sep 18 08:02:11 UTC 2024 - Michael Vetter diff --git a/tiff.spec b/tiff.spec index 319d202..f1ea8f9 100644 --- a/tiff.spec +++ b/tiff.spec @@ -16,9 +16,23 @@ # +%global build_flavor @BUILD_FLAVOR@%{nil} + +%if "%{?build_flavor}" == "man" +%bcond_without tiff_manpages +%else +%bcond_with tiff_manpages +%endif + %define asan_build 0 %define debug_build 0 +%define pkg_name tiff + +%if "%{build_flavor}" == "" Name: tiff +%else +Name: tiff-%{build_flavor} +%endif Version: 4.7.0 Release: 0 Summary: Tools for Converting from and to the Tagged Image File Format @@ -31,6 +45,10 @@ Source2: README.SUSE Source3: baselibs.conf Source99: tiff.keyring Patch0: tiff-4.0.3-seek.patch +%if %{with tiff_manpages} +BuildRequires: %{primary_python}-Sphinx +%endif +BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: libjbig-devel BuildRequires: libjpeg-devel @@ -39,6 +57,7 @@ BuildRequires: lzma-devel BuildRequires: pkgconfig BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(zlib) +Recommends: tiff-docs = %{versiong} %description This package contains the library and support programs for the TIFF @@ -60,56 +79,89 @@ Group: Development/Libraries/C and C++ Requires: glibc-devel Requires: libstdc++-devel Requires: libtiff6 = %{version} +Recommends: libtiff-devel-docs = %{version} %description -n libtiff-devel This package contains the header files and static libraries for developing programs which will manipulate TIFF format image files using the libtiff library. +%if %{with tiff_manpages} + +%package -n tiff-docs +Summary: Development Tools for Programs which will use the libtiff Library +Group: Productivity/Graphics/Convertors +Requires: tiff = %{version} +BuildArch: noarch + +%description -n tiff-docs +This package contains the header files and static libraries for +developing programs which will manipulate TIFF format image files using +the libtiff library. + +This package holds the man pages for the command lint tools. + +%package -n libtiff-devel-docs +Summary: Development Documentation for Programs which will use the libtiff Library +Group: Development/Libraries/C and C++ +Requires: libtiff-devel = %{version} +BuildArch: noarch + +%description -n libtiff-devel-docs +This package contains the header files and static libraries for +developing programs which will manipulate TIFF format image files using +the libtiff library. + +This package holds the development man pages. +%endif + %prep -%autosetup -p1 +%autosetup -p1 -n %{pkg_name}-%{version} %build -CFLAGS="%{optflags} -fPIE" +CFLAGS="%{optflags} -fPIC" %if %{debug_build} CFLAGS="$CFLAGS -O0" %endif # tools are not enabled for now due to test failure `FAIL: tiffcp-32bpp-None-jpeg.sh` -%configure --disable-static +%cmake %if %{asan_build} find -name Makefile | xargs sed -i 's/\(^CFLAGS.*\)/\1 -fsanitize=address/' %endif -%make_build LDFLAGS="-pie" +%cmake_build %install -mkdir -p %{buildroot}/{%{_mandir}/{man1,man3},usr/{bin,lib,include}} -%make_install -for f in `find %{buildroot}/%{_mandir} -type f -print ` ; do - if [ `wc -l <$f` -eq 1 ] && grep -q "^\.so " $f ; then - linkto=`sed -e "s|^\.so ||" $f` - [ -f "`dirname $f`/$linkto" ] && ln -sf "$linkto" $f - fi -done +%cmake_install cp %{SOURCE2} . -rm -rf %{buildroot}%{_datadir}/doc/tiff* +rm -rf %{buildroot}%{_datadir}/doc/{,packages/}tiff* find %{buildroot} -type f -name "*.la" -delete -print +%if %{with tiff_manpages} +rm -rv \ + %{buildroot}%{_bindir} \ + %{buildroot}%{_libdir} \ + %{buildroot}%{_includedir} + +%files -n tiff-docs +%{_mandir}/man1/* + +%files -n libtiff-devel-docs +%{_mandir}/man3/* + +%else %check %if %{asan_build} # ASAN needs /proc to be mounted exit 0 %endif -for i in tools test; do - (cd $i && make %{?_smp_mflags} check) -done +%ctest %ldconfig_scriptlets -n libtiff6 %files %{_bindir}/* %doc README.md VERSION ChangeLog TODO RELEASE-DATE -%{_mandir}/man1/* %files -n libtiff6 %license LICENSE.md @@ -120,6 +172,7 @@ done %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc -%{_mandir}/man3/* +%{_libdir}/cmake/tiff/ +%endif %changelog