## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 27; 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: Pencil2D Version: 0.6.6 Release: %autorelease Summary: Create traditional hand-drawn animation using both bitmap and vector graphics # The entire source is GPL-2.0-only, except: # # The following sources are copied and modified from an unknown version # (copyright date 2016) of the Qt example. Since they are based on example code # rather than library code, we do not consider this a case of bundling. # - core_lib/src/interface/flowlayout.{h,cpp} are BSD-3-Clause # # The following sources are derived, but not copied, from QAquarelle, which is # GPL-2.0-or-later; however, it is not clearly indicated that the resulting # source file is under the same license, so we assume the overall project # license of GPL-2.0-only applies. # - core_lib/src/tool/strokemanager.cpp is derived from GPL-2.0-or-later # code, but is probably GPL-2.0-only # # Additionally, the following are under other allowed licenses but, for one # reason or another, do not contribute to the licenses of the binary RPMs. # # The following sources belong to a bundled copy of the miniz library (version # 2.1.0 as of this writing); they are removed in %%prep in order to use the # system miniz library, and their licenses do not contribute to the licenses of # the binary RPMs. # - core_lib/src/miniz.cpp is MIT # - core_lib/src/miniz.h appears to be Unlicense, although there is some # ambiguity # # The following source belongs to a bundled copy of Catch (catch2) (version # 2.5.0 as of this writing); it is removed in %%prep in order to use the system # Catch library. Because version 2.x (catch2) is header-only, it is treated as # a static library and would contribute to the licenses of the binary RPMs, # except that it is used only for test executables that are not installed. # - tests/src/catch.hpp is BSL-1.0 License: GPL-2.0-only AND BSD-3-Clause URL: https://github.com/pencil2d/pencil Source: %{url}/archive/v%{version}/pencil-%{version}.tar.gz # Add a LICENSE.QT.TXT file for BSD-3-Clause code from Qt # https://github.com/pencil2d/pencil/pull/1757 # Modified for 0.6.6 to remove mention of source files not yet introduced. Patch: 0001-Add-a-LICENSE.QT.TXT-file-for-BSD-3-Clause-code-from.patch # Fix deprecated top-level developer_name in AppData XML # https://github.com/pencil2d/pencil/pull/1796 Patch: %{url}/pull/1796.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: gcc-c++ BuildRequires: make BuildRequires: pkgconfig(Qt5) # app/app.pro: # QT += core widgets gui xml multimedia svg network # core_lib/core_lib.pro: # QT += core widgets gui xml xmlpatterns multimedia svg # tests/tests.pro: # QT += core widgets gui xml xmlpatterns multimedia svg testlib BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Multimedia) BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5Svg) BuildRequires: pkgconfig(Qt5Test) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5Xml) BuildRequires: pkgconfig(Qt5XmlPatterns) BuildRequires: miniz-devel # Header-only: BuildRequires: catch2-static BuildRequires: desktop-file-utils # Required by guidelines (https://pagure.io/packaging-committee/issue/1053): BuildRequires: libappstream-glib # Matches what gnome-software and others use: BuildRequires: appstream BuildRequires: help2man BuildRequires: xorg-x11-server-Xvfb # Required to import and export videos. This is essential functionality for an # animation tool, so we make it a hard dependency. BuildRequires: /usr/bin/ffmpeg Requires: /usr/bin/ffmpeg # Provides plugins required for loading SVG icons # https://github.com/pencil2d/pencil/pull/1796#issuecomment-1805940297 Requires: qt5-qtsvg # For %%{_datadir}/icons/hicolor Requires: hicolor-icon-theme %global app_id org.pencil2d.Pencil2D %description %{summary}. %prep %autosetup -n pencil-%{version} -p1 # Unbundle miniz rm -v core_lib/src/miniz.h core_lib/src/miniz.cpp sed -r -i '/\bminiz\.(h|cpp)/d' core_lib/core_lib.pro echo 'LIBS_PRIVATE += -lminiz' | tee -a */*.pro >/dev/null # Unbundle catch2 rm -v tests/src/catch.hpp sed -r -i '/\bcatch\.hpp/d' tests/tests.pro echo 'INCLUDEPATH += "%{_includedir}/catch2"' >> tests/tests.pro %build # We want the compiled-in version information to describe this as a release # build to the user. We could set DEFINES+=PENCIL2D_RELEASE, but that would set # QT_NO_DEBUG_OUTPUT; we would rather preserve that to help with debugging, as # it does no harm except for a slight impact on performance. Instead, we define # PENCIL2D_RELEASE_BUILD directly. See common.pri for details. %{qmake_qt5} PREFIX='%{_prefix}' DEFINES+=PENCIL2D_RELEASE_BUILD %make_build # Sometimes the formatting in help2man-generated man pages is of poor to # marginal quality; in this case, it is good enough that it is not worth # furnishing a hand-written man page. We need xvfb-run to generate the man page # because the application aborts when it is run in a headless environment. xvfb-run -a -- help2man --no-info --output=pencil2d.1 ./bin/pencil2d %install %make_install INSTALL_ROOT='%{buildroot}' install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 pencil2d.1 %check desktop-file-validate '%{buildroot}%{_datadir}/applications/%{app_id}.desktop' appstream-util validate-relax --nonet \ '%{buildroot}%{_metainfodir}/%{app_id}.metainfo.xml' appstreamcli validate --no-net --explain \ '%{buildroot}%{_metainfodir}/%{app_id}.metainfo.xml' # Run catch tests ./tests/bin/tests %files %license LICENSE.TXT LICENSE.QT.TXT %doc README.md %doc ChangeLog.md %{_bindir}/pencil2d %{_mandir}/man1/pencil2d.1* %{_datadir}/applications/%{app_id}.desktop %{_datadir}/icons/hicolor/*/apps/%{app_id}.png %{_metainfodir}/%{app_id}.metainfo.xml %{_datadir}/mime/packages/%{app_id}.xml %{_datadir}/bash-completion/completions/pencil2d %{_datadir}/zsh/site-functions/_pencil2d %changelog * Fri Nov 10 2023 Benjamin A. Beasley - 0.6.6-27 - Add qt5-qtsvg dependency (fix blank/missing icons) * Thu Nov 09 2023 Benjamin A. Beasley - 0.6.6-26 - Fix deprecated top-level developer_name in AppData XML * Thu Nov 09 2023 Benjamin A. Beasley - 0.6.6-25 - Ask appstreamcli to explain validation findings * Thu Nov 09 2023 Benjamin A. Beasley - 0.6.6-24 - Correct appstreamcli invocation (--nonet no longer works) * Wed Jul 19 2023 Fedora Release Engineering - 0.6.6-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Apr 26 2023 Benjamin A. Beasley - 0.6.6-21 - Drop conditionals for pre-F38 releases * Thu Apr 13 2023 Benjamin A. Beasley - 0.6.6-20 - Drop ix86 support (leaf package) * Thu Apr 13 2023 Benjamin A. Beasley - 0.6.6-19 - Package the readme and changelog files as documentation * Thu Apr 13 2023 Benjamin A. Beasley - 0.6.6-18 - Add a hard dependency on ffmpeg for import/export * Thu Apr 13 2023 Benjamin A. Beasley - 0.6.6-17 - Add a man page * Thu Apr 13 2023 Benjamin A. Beasley - 0.6.6-16 - Make the application report that it is a release build * Thu Apr 13 2023 Benjamin A. Beasley - 0.6.6-15 - Ensure BSD-3-Clause license text is present in the binary RPMs * Thu Apr 13 2023 Benjamin A. Beasley - 0.6.6-14 - Validate AppData XML, as required by guidelines * Thu Apr 13 2023 Benjamin A. Beasley - 0.6.6-13 - Update License to SPDX; unbundle miniz and catch2 * Wed Apr 12 2023 Benjamin A. Beasley - 0.6.6-12 - Do not package developer documentation sources * Wed Apr 12 2023 Benjamin A. Beasley - 0.6.6-11 - Use pkgconfig(…) style for Qt5 BuildRequires * Wed Apr 12 2023 Benjamin A. Beasley - 0.6.6-10 - General spec-file tidying; stricter file patterns * Wed Jan 18 2023 Fedora Release Engineering - 0.6.6-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Wed Jul 20 2022 Fedora Release Engineering - 0.6.6-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Jan 19 2022 Fedora Release Engineering - 0.6.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Sun Aug 22 2021 Andy Mender - 0.6.6-3 - Add patch to fix stack size in tests * Wed Jul 21 2021 Fedora Release Engineering - 0.6.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Sun Mar 7 2021 Andy Mender - 0.6.6-1 - Update to version 0.6.6 - Remove CJK character workaround * Mon Jan 25 2021 Fedora Release Engineering - 0.6.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Sun Nov 29 2020 Andy Mender - 0.6.5-3 - Re-enable tests * Mon Nov 23 2020 Andy Mender - 0.6.5-2 - Change URL and Source0 to primary upstream URL - List only mandatory BuildRequires - Fix buildroot name in %%prep stage - Clean up %%build stage - Add locale fix for CJK filenames in test resources - Add tests to %%check stage (currently disabled) - Fix %%files paths * Wed Aug 26 2020 Luis M. Segundo - 0.6.5-1 - Update to 0.6.5 * Sat Aug 01 2020 Fedora Release Engineering - 0.6.4-5 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Mon Jul 27 2020 Fedora Release Engineering - 0.6.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Mon Jul 13 2020 Marie Loise Nolden - 0.6.4-4 - Fix for Qt 5.15.0 * Tue Jan 28 2020 Fedora Release Engineering - 0.6.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Wed Jul 24 2019 Fedora Release Engineering - 0.6.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Mon Jun 03 2019 Luis M. Segundo - 0.6.4-1 - Update to 0.6.4 * Thu Mar 21 2019 Luis Bazan - 0.6.3-2 - Fix comment #17 BZ #1632851 and #1691144 * Sun Mar 17 2019 Luis M. Segundo - 0.6.3-1 - Update to 0.6.3 * Thu Jan 31 2019 Fedora Release Engineering - 0.6.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sun Sep 16 2018 Luis M. Segundo - 0.6.2-1 - first release