SHA256
1
0
forked from pool/sigil
sigil/sigil.spec
Eric Schirra 47f3cabf2d Accepting request 713272 from home:ecsos
- Update to 0.9.15
  A Beta Release of Sigil ported to QtWebEngine to replace QtWebKit
  * New Features
    - ported to use QtWebEngine (based on Chromium) to replace 
      QtWebkit
    - QtWebEngine plugs many major memory leaks. 
      Memory footprint should stay low to moderate.
    - QtWebEngine has ongoing security and support patches from 
      Qt/Google/Chromium
    - removes the broken/deprecated BookView Editor that relied on 
      QtWebKit
    - created PageEdit app (that uses QtWebEngine) that replaces 
      much BookView functionality
      (see https://github.com/Sigil-Ebook/PageEdit)
    - allows the user to control use of javascript and remote 
      access by epubs when editing to improve overall security
    - adds action to launch one preferred external xhtml editor via
      shortcut or icon
      (can be used to fast launch PageEdit app or any other xhtml 
      open-with editor)
    - adds 5 more plugin quicklaunch buttons to main menu for 
      a total of 10 (with all new icons! Thanks so much Becky!)
  It also includes all of the fixes and updates from Sigil-0.9.14.
  Be aware that Sigil-0.9.15 still enforces the need for epub3 to 
  have and support an NCX so that it generates as backward 
  a compatible epub as possible. This may be relaxed in future 
  releases.
- Changes from 0.9.14
  This Sigil release is primarily to address performance issues and
  memory leaks, but there are a still some new features and other 
  bug fixes as described below.
  
  * Bug Fixes
    - flush all changes to disk before creating a Report so that 
      files sizes are correct
    - stop writing python bytecode to Program Files on Windows
    - remember cover semantics if cover image replaced by Add 
      Existing...
    - fix issues with the Plugin Framework documentation epub
    - more memory leaks plugged
    - minor code cleanups
  * New Features
    - updated to Qt 5.12.3 with Annulen Webkit 5.212 with extra 
      QtCursor memory leak fixes
    - updated to Python 3.7.2
    - updated build docs for macOS, Linux and Windows
    - build system now uses GNUInstallDirs to determine the best 
      installation libdir on Linux
    - updated desktop integration for Linux
    - reduce PCRE cache size to help lower memory footprint
    - improve mapping of hunspell dictionary names to actual 
      language names (thanks BeckyDTP)
    - add warning during import if unmanifested files exist in the
      epub zip archive
    - no longer requires use of non-breaking space entities 
      (or any entities at all!)
    - special spaces are now visisble via syntax highlighting in 
      CodeView
    - dropping epubs on Sigil.app no longer opens an extra empty 
      epub on macOS
    - reload Preview only when needed to help prevent screen 
      flicker and lower memory use
    - enabled Windows automated builds using Apppveyor
    - Windows releases now compiled with Visual Studio 2017
    - characters in HTML files report now uses gumbo for speed
    - allow user's custom plugin icons to survive a plugin update
  Sigil 0.9.14 will mark the last version that uses QtWebKit, 
  and will be the last version to support editing in BookView. 
  (https://github.com/Sigil-Ebook/Sigil/wiki#sigil-moving-to-qtwebengine)
  Be aware that Sigil-0.9.14 still enforces the need for epub3 
  to have and support an NCX so that it generates as backward 
  a compatible epub as possible. 
  This may be relaxed in future releases.

OBS-URL: https://build.opensuse.org/request/show/713272
OBS-URL: https://build.opensuse.org/package/show/Documentation:Tools/sigil?expand=0&rev=28
2019-07-03 16:20:12 +00:00

185 lines
6.5 KiB
RPMSpec

#
# spec file for package sigil
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 2019.06.25
Name: sigil
Version: 0.9.15
Release: 0
Summary: WYSIWYG Ebook Editor
License: GPL-3.0-only
Group: Productivity/Other
Url: http://sigil-ebook.com/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: https://github.com/Sigil-Ebook/Sigil/archive/%{version}.tar.gz
Source1: https://github.com/Sigil-Ebook/Sigil/raw/master/docs/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
BuildRequires: gcc-c++
BuildRequires: hunspell-devel
# upstream use Qt 5.12.3
BuildRequires: libqt5-qtbase-devel >= 5.4.2
BuildRequires: libqt5-qtlocation-devel >= 5.4.2
BuildRequires: libstdc++-devel
BuildRequires: libxerces-c-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: make
BuildRequires: pcre-devel
BuildRequires: python3-devel >= 3.4
BuildRequires: unzip
BuildRequires: update-desktop-files
BuildRequires: zlib-devel
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Multimedia)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5UiTools)
BuildRequires: pkgconfig(Qt5WebChannel)
#BuildRequires: pkgconfig(Qt5WebKit)
BuildRequires: pkgconfig(Qt5WebEngine)
BuildRequires: pkgconfig(Qt5WebKitWidgets)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(Qt5XmlPatterns)
# not need for build, only check for exists
# upstream use for python3-Pillow 5.4.1
BuildRequires: python3-Pillow
BuildRequires: python3-chardet >= 3.0.4
BuildRequires: python3-cssselect >= 1.0.3
BuildRequires: python3-cssutils >= 1.0.2
BuildRequires: python3-html5lib >= 1.0.1
# upstream use for python3-lxml 4.2.6
BuildRequires: python3-lxml
# upstream use for python3-qt5 5.12
BuildRequires: python3-qt5
# upstream use for python3-regex 2018.11.12
BuildRequires: python3-regex
# upstream use for python3-six 1.12.0
BuildRequires: python3-six
BuildRequires: python3-tk
Requires: python3-Pillow
Requires: python3-chardet
Requires: python3-cssselect
Requires: python3-cssutils
Requires: python3-html5lib
Requires: python3-lxml
Requires: python3-regex
Requires: python3-six
Requires: python3-tk
%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
%setup -q -n Sigil-%{version}
%patch0 -p 1
cp -v %{S:1} .
cp -v %{S:2} .
# 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
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
cmake -G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=%_prefix \
-DCMAKE_BUILD_TYPE=Release .
make %{?_smp_mflags}
%install
%make_install
# create a .desktop file:
mkdir -p %{buildroot}%{_datadir}/applications
# install icons for the .desktop file
install -m644 -D src/Resource_Files/icon/app_icon_16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/sigil.png
install -m644 -D src/Resource_Files/icon/app_icon_32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/sigil.png
install -m644 -D src/Resource_Files/icon/app_icon_48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/sigil.png
install -m644 -D src/Resource_Files/icon/app_icon_128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/sigil.png
install -m644 -D src/Resource_Files/icon/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 "/usr/bin/python" | xargs chmod +x
popd
%files
%defattr(-,root,root)
%doc ChangeLog.txt README.md COPYING.txt 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 %{_libdir}/%name
%{_libdir}/%{name}/*
%changelog