## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 7; 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 # Doxygen HTML help is not suitable for packaging due to a minified JavaScript # bundle inserted by Doxygen itself. See discussion at # https://bugzilla.redhat.com/show_bug.cgi?id=2006555. # # We can enable the Doxygen PDF documentation as a substitute. %bcond_without doc_pdf Name: libdxflib Version: 3.26.4 %global so_version 3 Release: %autorelease Summary: A C++ library for reading and writing DXF files # The entire source is GPL-2.0-or-later, except: # - examples/readwrite/ is under “GNU Library General Public License”; since # no version is specified, this is LGPL-2.0-or-later; this affects the # License of the -doc subpackage License: GPL-2.0-or-later URL: https://www.ribbonsoft.com/en/90-dxflib Source0: https://qcad.org/archives/dxflib/dxflib-%{version}-src.tar.gz BuildRequires: gcc-c++ BuildRequires: make BuildRequires: qt6-qtbase-devel %global common_description %{expand: dxflib is a C++ library for reading and writing DXF files.} %description %{common_description} %package devel Summary: Development files for libdxflib Requires: libdxflib%{?_isa} = %{version}-%{release} %description devel %{common_description} The libdxflib-devel package contains libraries and header files for developing applications that use dxflib. %package doc Summary: Documentation and examples for libdxflib # See comment above the base package’s License: License: GPL-2.0-or-later AND LGPL-2.0-or-later BuildArch: noarch %if %{with doc_pdf} BuildRequires: doxygen BuildRequires: doxygen-latex %endif %description doc %{common_description} The libdxflib-doc package contains documentation and examples for dxflib. %prep %autosetup -n dxflib-%{version}-src # Build as a shared library sed -r -i 's/(CONFIG \+= )staticlib/\1shared/' dxflib.pro %if %{with doc_pdf} # We enable the Doxygen PDF documentation as a substitute. We must enable # GENERATE_LATEX and LATEX_BATCHMODE; the rest are precautionary and should # already be set as we like them. We also disable GENERATE_HTML, since we will # not use it. sed -r -i \ -e "s/^([[:blank:]]*(GENERATE_LATEX|LATEX_BATCHMODE|USE_PDFLATEX|\ PDF_HYPERLINKS)[[:blank:]]*=[[:blank:]]*)NO[[:blank:]]*/\1YES/" \ -e "s/^([[:blank:]]*(LATEX_TIMESTAMP|GENERATE_HTML)\ [[:blank:]]*=[[:blank:]]*)YES[[:blank:]]*/\1NO/" \ dxflib.doxygen %endif %build %{qmake_qt6} VERSION='%{version}' %make_build %if %{with doc_pdf} mkdir -p doc doxygen dxflib.doxygen %make_build -C doc/classref/latex %endif %install # The upstream build system does not have install targets. install -t '%{buildroot}%{_includedir}/dxflib' -D -p -m 0644 src/*.h # Use cp instead of install to preserve symlinks: install -d '%{buildroot}%{_libdir}' cp -p libdxflib.so* '%{buildroot}%{_libdir}' # However, we currently still have an extra copy of the shared library. Ensure # that all but the most fully-versioned file are symlinks. sofile="$(basename "$( find '%{buildroot}%{_libdir}' -type f -name 'libdxflib.so.*.*.*' -print -quit )")" find '%{buildroot}%{_libdir}' -type f ! -name "${sofile}" \ -execdir ln -s -v -f "${sofile}" '{}' ';' # Generate pkgconfig file install -d %{buildroot}%{_libdir}/pkgconfig cat << 'EOF' > '%{buildroot}%{_libdir}/pkgconfig/dxflib.pc' prefix=%{_prefix} exec_prefix=%{_exec_prefix} libdir=%{_libdir} includedir=%{_includedir} Name: dxflib Description: A C++ library for reading and writing DXF files Version: %{version} Libs: -L${libdir} -ldxflib Cflags: -I${includedir}/dxflib EOF %files %license gpl-2.0greater.txt dxflib_commercial_license.txt %{_libdir}/libdxflib.so.%{so_version}{,.*} %files devel %{_includedir}/dxflib/ %{_libdir}/libdxflib.so %{_libdir}/pkgconfig/dxflib.pc %files doc %license gpl-2.0greater.txt dxflib_commercial_license.txt %doc examples/ %if %{with doc_pdf} %doc doc/classref/latex/refman.pdf %endif %changelog * Tue Dec 20 2022 Benjamin A. Beasley 3.26.4-7 - Trivially simplify some files lists * Tue Dec 20 2022 Benjamin A. Beasley 3.26.4-6 - Indicate dirs. in files lists with trailing slashes * Fri Aug 05 2022 Benjamin A. Beasley 3.26.4-5 - Update License to SPDX * Thu Jul 21 2022 Fedora Release Engineering 3.26.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Thu Jul 07 2022 Benjamin A. Beasley 3.26.4-3 - Fix extra newline in description * Fri Apr 01 2022 Benjamin A. Beasley 3.26.4-2 - Package documentation and examples * Fri Apr 01 2022 Benjamin A. Beasley 3.26.4-1 - Update to 3.26.4 (close RHBZ#1996851) * Fri Apr 01 2022 Benjamin A. Beasley 3.17.0-19 - Build with qmake from Qt6 instead of Qt4 * Fri Apr 01 2022 Benjamin A. Beasley 3.17.0-18 - General spec file cleanup - Use HTTPS URL - Do not glob over the .so version - Use stricter file patterns in general - Drop obsolete %%%%ldconfig_scriptlets macro * Thu Jan 20 2022 Fedora Release Engineering - 3.17.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Jul 22 2021 Fedora Release Engineering - 3.17.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Jan 26 2021 Fedora Release Engineering - 3.17.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Jul 28 2020 Fedora Release Engineering - 3.17.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Wed Jan 29 2020 Fedora Release Engineering - 3.17.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Jul 25 2019 Fedora Release Engineering - 3.17.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri Feb 01 2019 Fedora Release Engineering - 3.17.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 3.17.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Thu Mar 08 2018 Rex Dieter - 3.17.0-6 - fix scriptlets, better Qt dep, use %%qmake_qt4 * Tue Feb 20 2018 Samuel Rakitničan - Use ldconfig_scriptlets macro * Wed Feb 07 2018 Fedora Release Engineering - 3.17.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Aug 03 2017 Fedora Release Engineering - 3.17.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 3.17.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Jun 02 2017 Samuel Rakitničan - 3.17.0-2 - Remove unicode trademark character from description - Use macro for make - Pass the option to qmake to disable linking against Qt * Wed May 31 2017 Samuel Rakitničan - 3.17.0-1 - Initial build