SHA256
1
0
forked from pool/sigil

- Update to 2.3.1

* Bug Fixes
    - fix to prevent double epub load warnings
    - fix to prevent load warnings without details from causing a crash
    - fix to prevent rename templates from using characters forbidden in file names and paths
    - fix to better restoreState when MainWindow is Maximized of FullScreen
    - fix lost External Editor Preference when browse cancelled (BeckyEbook)
    - fix for crashes related to serious epub load exceptions
    - better handle epubs with missing NCX files

OBS-URL: https://build.opensuse.org/package/show/Documentation:Tools/sigil?expand=0&rev=95
This commit is contained in:
Eric Schirra 2024-09-07 15:26:23 +00:00 committed by Git OBS Bridge
commit 130969e249
11 changed files with 2391 additions and 0 deletions

26
.gitattributes vendored Normal file
View File

@ -0,0 +1,26 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
## Specific LFS patterns
Sigil_User_Guide_2022.05.17.epub filter=lfs diff=lfs merge=lfs -text
Sigil_User_Guide_2024.08.15.epub filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:adb2b392c614d309a30aa8c09230ec619638cb6a442cb66966fc7220017975b5
size 8894634

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ef39c2255e9da69883daf5546f359cb22f2d7350bccd808405b868bd19e64337
size 12641984

3
sigil-2.2.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0f491d703424557b5829d60e08ac17747735d54c14a92c470f448515caf4bfb1
size 26131954

3
sigil-2.3.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:640e637ce234c564aa746bbc9d7b04aab4571b294f1282e5237e6765cd39551b
size 17480782

3
sigil-2.3.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:12e84d9a1fc41e60903557ea03801cd0004d8b75dfcebeb44c3a9b1fd8fa97ea
size 17475697

View File

@ -0,0 +1,20 @@
diff -Pdpru Sigil-0.9.0.orig/src/Dialogs/About.cpp Sigil-0.9.0/src/Dialogs/About.cpp
--- Sigil-0.9.0.orig/src/Dialogs/About.cpp 2015-11-04 14:52:16.000000000 +0100
+++ Sigil-0.9.0/src/Dialogs/About.cpp 2015-11-29 10:12:53.023905765 +0100
@@ -75,6 +75,7 @@ About::About(QWidget *parent)
QDateTime About::GetUTCBuildTime()
{
+ /*
QString time_string = QString::fromLatin1(__TIME__);
QString date_string = QString::fromLatin1(__DATE__);
Q_ASSERT(!date_string.isEmpty());
@@ -83,6 +84,8 @@ QDateTime About::GetUTCBuildTime()
QRegularExpressionMatch mo = date_match.match(date_string);
QDate date(mo.captured(3).toInt(), MonthIndexFromString(mo.captured(1)), mo.captured(2).toInt());
return QDateTime(date, QTime::fromString(time_string, "hh:mm:ss")).toUTC();
+ */
+ return QDateTime( QDate::fromString("@DATE@", "yyyyMMdd"), QTime::fromString( "@TIME@", "hh:mm:ss" ) ).toUTC();
}

2106
sigil.changes Normal file

File diff suppressed because it is too large Load Diff

11
sigil.desktop Normal file
View File

@ -0,0 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Sigil
GenericName=Ebook editor
Comment=WYSIWYG ebook editor
Icon=sigil
Exec=sigil %u
Terminal=false
MimeType=application/epub+zip;
Categories=Application;Qt;TextEditor;

212
sigil.spec Normal file
View File

@ -0,0 +1,212 @@
#
# spec file for package sigil
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define sigil_doc_version 2024.08.15
Name: sigil
Version: 2.3.1
Release: 0
Summary: WYSIWYG Ebook Editor
License: GPL-3.0-only
Group: Productivity/Other
URL: https://sigil-ebook.com/
Source0: https://github.com/Sigil-Ebook/Sigil/archive/%{version}/%{name}-%{version}.tar.gz
#Source1: https://github.com/Sigil-Ebook/Sigil/raw/master/docs/Sigil_User_Guide_%%{sigil_doc_version}_eopub3.epub
Source1: https://github.com/Sigil-Ebook/sigil-user-guide/releases/download/%{sigil_doc_version}/Sigil_User_Guide_%{sigil_doc_version}.epub
Source2: %{name}.desktop
# PATCH-FIX-OPENSUSE Disabled __DATE__ and __TIME__ which is replaced later in pre section
Patch0: %{name}-gt-0.9.0-Dialogs-About.cpp.patch
BuildRequires: boost-devel
BuildRequires: cmake >= 3.0
BuildRequires: dos2unix
BuildRequires: fdupes
%if 0%{?suse_version} <= 1600
BuildRequires: gcc12
BuildRequires: gcc12-c++
%else
BuildRequires: gcc
BuildRequires: gcc-c++
%endif
BuildRequires: libstdc++-devel
BuildRequires: libxerces-c-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: make
BuildRequires: pkgconfig
BuildRequires: qt6-base-devel >= 6.4.0
# not need for build, only check for exists
# upstream use for python3-Pillow 7.1.2
BuildRequires: python3-Pillow >= 5.0.0
# upstream use python3-certifi 2020.6.20
BuildRequires: python3-certifi
# upstream use python3-chardet 3.0.4
BuildRequires: python3-chardet >= 3.0.4
# upstream use python3-css-parser 1.0.4
BuildRequires: python3-css-parser >= 1.0.4
# upstream use python3-cssselect 1.1.0
BuildRequires: python3-cssselect >= 1.0.3
# upstream use python3-cssutils ?
BuildRequires: python3-cssutils >= 1.0.2
# upstream use 3.6.0
BuildRequires: python3-devel >= 3.6
# upstream use python3-dulwich 0.20.5
BuildRequires: python3-dulwich >= 0.20.2
# upstream use python3-html5lib >= 1.1
BuildRequires: python3-html5lib
# upstream use for python3-lxml 4.5.1
BuildRequires: python3-lxml >= 4.4.2
# upstream use for python3-qt5 5.12.3
BuildRequires: python3-qt5
# upstream use for python3-regex 2020.6.8
BuildRequires: python3-regex
# upstream use for python3-six 1.15.0
BuildRequires: python3-six >= 1.14.0
# upstream use for python3-urllib3 1.25.9
BuildRequires: python3-urllib3 >= 1.24
# upstream use python3-tk ?
BuildRequires: python3-tk
BuildRequires: unzip
BuildRequires: update-desktop-files
BuildRequires: zlib-devel
BuildRequires: cmake(Qt6Concurrent)
BuildRequires: cmake(Qt6Core5Compat)
BuildRequires: cmake(Qt6Linguist)
BuildRequires: cmake(Qt6Network)
BuildRequires: cmake(Qt6PrintSupport)
BuildRequires: cmake(Qt6Svg)
BuildRequires: cmake(Qt6UiTools)
BuildRequires: cmake(Qt6WebEngineCore)
BuildRequires: cmake(Qt6WebEngineWidgets)
BuildRequires: cmake(Qt6Widgets)
BuildRequires: cmake(Qt6Xml)
BuildRequires: pkgconfig(hunspell)
BuildRequires: pkgconfig(libpcre)
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(minizip)
Requires: python3-Pillow
Requires: python3-certifi
Requires: python3-chardet
Requires: python3-css-parser
Requires: python3-cssselect
Requires: python3-cssutils
Requires: python3-dulwich
Requires: python3-html5lib
Requires: python3-lxml
Requires: python3-regex
Requires: python3-six
Requires: python3-tk
Requires: python3-urllib3
%description
Sigil is an editor for the EPUB format. It is designed for WYSIWYG
editing of EPUB files and for converting other formats to EPUB. It
also provides support for direct XHTML, CSS and XPGT editing. You can
use it to add any of the metadata entries supported by the EPUB
specification and create a hierarchical Table of Contents.
%prep
%autosetup -p1 -n Sigil-%{version}
cp -v %{SOURCE1} .
cp -v %{SOURCE2} .
# rpmlint
#FIXME MANUAL UPDATE OF DATE REQUIRED HERE!!!!
# Fix "Your file uses __DATE and __TIME__ this causes the package to rebuild
# when not needed warning"
# http://sourceforge.net/tracker/?func=detail&atid=102439&aid=3314371&group_id=2439
#
# We use the ChangeLog date
_date=$(date -u -r ChangeLog.txt -I)
_time=$(date -u -r ChangeLog.txt +%%T)
# Change it:
find . -type f -name About.cpp -exec sed -i "s/@DATE@/$_date/;s/@TIME@/$_time/g" {} +
sed -i 's/\r//' ChangeLog.txt README.md COPYING.txt
dos2unix src/Resource_Files/python3lib/meta*.py
dos2unix src/Resource_Files/python3lib/opf_*.py
# rpmlint:
find . -type f -exec sed -i -e 's|#!\/usr\/bin\/env python3|#!\/usr\/bin\/python3|g' {} +
find . -type f -exec sed -i -e 's|#!\/usr\/bin\/env python|#!\/usr\/bin\/python3|g' {} +
%build
%if 0%{?suse_version} <= 1600
export CC=gcc-12
export CXX=g++-12
%endif
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
%cmake_qt6 -G "Unix Makefiles" \
-DTRY_NEWER_FINDPYTHON3=1
%qt6_build
%install
%qt6_install
# create a .desktop file:
mkdir -p %{buildroot}%{_datadir}/applications
# install icons for the .desktop file
install -m644 -D src/Resource_Files/icon/app_icons_orig/app_icon_16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/sigil.png
install -m644 -D src/Resource_Files/icon/app_icons_orig/app_icon_32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/sigil.png
install -m644 -D src/Resource_Files/icon/app_icons_orig/app_icon_48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/sigil.png
install -m644 -D src/Resource_Files/icon/app_icons_orig/app_icon_128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/sigil.png
install -m644 -D src/Resource_Files/icon/app_icons_orig/app_icon_256.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/sigil.png
install -m644 %{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file %{name}
%fdupes -s %{buildroot}
# fix rpmlint: non-executable-script
pushd %{buildroot}%{_datadir}
grep -lr "%{_bindir}/python" | xargs chmod +x
popd
%files
%license COPYING.txt
%doc ChangeLog.txt README.md Sigil_User_Guide_%{sigil_doc_version}.epub
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/icons/hicolor/
%dir %{_datadir}/icons/hicolor/16x16
%dir %{_datadir}/icons/hicolor/16x16/apps
%dir %{_datadir}/icons/hicolor/32x32
%dir %{_datadir}/icons/hicolor/32x32/apps
%dir %{_datadir}/icons/hicolor/48x48
%dir %{_datadir}/icons/hicolor/48x48/apps
%dir %{_datadir}/icons/hicolor/128x128
%dir %{_datadir}/icons/hicolor/128x128/apps
%dir %{_datadir}/icons/hicolor/256x256
%dir %{_datadir}/icons/hicolor/256x256/apps
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/pixmaps/*.png
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/translations
%{_datadir}/%{name}/translations/*
%dir %{_datadir}/%{name}/*dictionaries
%{_datadir}/%{name}/*dictionaries/*
%{_datadir}/%{name}/examples
%{_datadir}/%{name}/python3lib
%{_datadir}/%{name}/polyfills
%{_datadir}/%{name}/plugin_launchers
%dir %{_datadir}/%{name}/iconthemes
%{_datadir}/%{name}/iconthemes/*.rcc
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*
%changelog