f708255
%bcond_with doxy
d8bb0c9
# there's a strange bug with qtwebkit but not reproducible in rawhide/f27
d8bb0c9
%if 0%{?fedora} < 27
d8bb0c9
%bcond_with testsqtwebkit
d8bb0c9
%endif
f708255
Raphael Groner d8b0db9
#%%global gitdate 20160610
Raphael Groner d8b0db9
#%%global commit0 8901a5c0465637e98bb998518ae644198d6728e2
Raphael Groner 6f443fb
%global srcurl  https://github.com/jktjkt/%{name}
Raphael Groner 6f443fb
f708255
Name:           trojita
Raphael Groner 6f443fb
%if 0%{?gitdate}
Raphael Groner 6f443fb
Version:        0.7
1511ce8
Release:        0.14.%{gitdate}git%(c=%{commit0}; echo ${c:0:7} )%{?dist}.1
Raphael Groner 6f443fb
Source0:        %{srcurl}/archive/%{commit0}.tar.gz#/%{name}-%{commit0}.tar.gz
Raphael Groner 6f443fb
%else
Raphael Groner d8b0db9
Version:        0.7
1511ce8
Release:        14%{?dist}
Raphael Groner d8b0db9
Source0:        %{srcurl}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Raphael Groner 6f443fb
%endif
Raphael Groner 6f443fb
# manually generated manpage with help2man
Raphael Groner 6f443fb
# help2man -o trojita.1 --no-info --no-discard-stderr -h --version-string=0.6 /usr/bin/trojita
Raphael Groner 6f443fb
#Source1:        trojita.1
Raphael Groner d8b0db9
Raphael Groner 6f443fb
# python2 ./l10n-fetch-po-files.py ; tar czf %{name}_common-po-20160612.tar.gz po/
Raphael Groner 6f443fb
# calls svn to get latest po files
Raphael Groner d8b0db9
Source10:       %{name}_common-po-20160612.tar.gz
b47affe
d8bb0c9
### upstream patches
a039b3a
# Fix GPG test, otherwise b0rken with gnupg2 v2.1.16
a039b3a
Patch0:         %{srcurl}/commit/be8fd5831afa0a04f14cd6206e6576f03ee59558.patch
17b2e81
# tests: Skip QtWebKit tests when building with ASAN
d8bb0c9
Patch1:         %{srcurl}/commit/73a7b085454ca5b9d8f28529da26c54c5109678a.patch
d8bb0c9
d8bb0c9
## downstream patches
eee5a9d
# rhbz#1401716, increase timeout for CryptographyPGPTest::testDecryption
d8bb0c9
Patch10:         delay-test_Cryptography_PGP.patch
a039b3a
f708255
# Almost everything: dual-licensed under the GPLv2 or GPLv3
f708255
# (with KDE e.V. provision for relicensing)
f708255
# src/XtConnect: BSD
f708255
# src/Imap/Parser/3rdparty/kcodecs.*: LGPLv2
f708255
# Nokia imports: LGPLv2.1 or GPLv3
f708255
# src/Imap/Parser/3rdparty/rfccodecs.cpp: LGPLv2+
f708255
# src/qwwsmtpclient/: GPLv2
f708255
## note that LGPL 2.1 short name is LGPLv2 according to
f708255
## https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
f708255
#License:        GPLv2+ and LGPLv2+ and BSD
f708255
License:        GPLv2+
b47affe
f708255
Summary:        IMAP e-mail client
f708255
URL:            http://%{name}.flaska.net
b47affe
52fe460
# rhbz#1402577 ppc64* FIXME: src/Imap/Parser/Rfc5322HeaderParser.cpp:2238:3:
571865c
# error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
52fe460
# also rhbz#1402580 aarch64 and rhbz#1450505 s390x
52fe460
ExcludeArch:    ppc64 ppc64le aarch64 s390x
166fa92
# rhbz#1402582 FIXME: ragel core dumps
166fa92
ExcludeArch:    armv7hl
571865c
Raphael Groner 5245197
BuildRequires:  kf5-rpm-macros
Raphael Groner d8a6793
%global ctest ctest%{?rhel:3} %{?_smp_mflags} --output-on-failure -VV
Raphael Groner 5245197
Raphael Groner 5245197
# pre-build: generation of additional sources
Raphael Groner 5245197
#BuildRequires:  python2 subversion
Raphael Groner 6f443fb
#BuildRequires:  help2man
Raphael Groner 6f443fb
Raphael Groner 6f443fb
BuildRequires:  pkgconfig(Qt5Core)
Raphael Groner 6f443fb
BuildRequires:  pkgconfig(Qt5DBus)
Raphael Groner 6f443fb
BuildRequires:  pkgconfig(Qt5Gui)
Raphael Groner 6f443fb
BuildRequires:  pkgconfig(Qt5Network)
Raphael Groner 6f443fb
BuildRequires:  pkgconfig(Qt5Sql)
Raphael Groner e96c7cd
BuildRequires:  pkgconfig(Qt5Svg)
Raphael Groner 6f443fb
BuildRequires:  pkgconfig(Qt5Test)
87864c0
BuildRequires:  pkgconfig(Qt5WebKit)
Raphael Groner 6f443fb
BuildRequires:  pkgconfig(Qt5Widgets)
87864c0
BuildRequires:  qt5-qttools-devel
f708255
Raphael Groner 69d31fa
# explicitly install Qt5Svg for runtime, rpmbuild's magic fails
Raphael Groner 69d31fa
Requires:       qt5-qtsvg
Raphael Groner 69d31fa
Raphael Groner 6f443fb
# (optional) features
Raphael Groner 6f443fb
BuildRequires:  pkgconfig(zlib)
Raphael Groner 6f443fb
BuildRequires:  qtkeychain-qt5-devel
f708255
%if 0%{?fedora}
f708255
BuildRequires:  ragel
Raphael Groner 735a1bb
%endif
Raphael Groner 735a1bb
Raphael Groner 735a1bb
# (optional) support for GPG and S/MIME
8d48d78
BuildRequires:  gnupg2-smime
Raphael Groner 6f443fb
BuildRequires:  kf5-gpgmepp-devel
Raphael Groner d8b0db9
BuildRequires:  gpgme-devel
Raphael Groner 6f443fb
BuildRequires:  libgpg-error-devel
Raphael Groner 6f443fb
BuildRequires:  boost-devel
Raphael Groner 6f443fb
BuildRequires:  mimetic-devel
Raphael Groner e96c7cd
# fix for inside mockbuild, gpg: deleting secret key failed: No pinentry
Raphael Groner e96c7cd
BuildRequires:  pinentry
f708255
f708255
%if %{with doxy}
f708255
BuildRequires:  doxygen graphviz
f708255
%endif
f708255
f708255
# needs for %%check
f708255
BuildRequires:  desktop-file-utils
f708255
%if 0%{?fedora}
f708255
BuildRequires:  libappstream-glib
f708255
%endif
f708255
BuildRequires:  xorg-x11-server-Xvfb
f708255
f708255
# provide some icons
f708255
Requires:       hicolor-icon-theme
f708255
f708255
%description
f708255
Trojitá is a IMAP e-mail client which:
f708255
  * Enables you to access your mail anytime, anywhere.
f708255
  * Does not slow you down. If we can improve the productivity of an e-mail
f708255
    user, we better do.
f708255
  * Respects open standards and facilitates modern technologies. We value
f708255
    the vendor-neutrality that IMAP provides and are committed to be as
f708255
    inter-operable as possible.
f708255
  * Is efficient — be it at conserving the network bandwidth, keeping memory
f708255
    use at a reasonable level or not hogging the system's CPU.
f708255
  * Can be used on many platforms. One UI is not enough for everyone, but our
f708255
    IMAP core works fine on anything from desktop computers to cell phones
f708255
    and big ERP systems.
f708255
  * Plays well with the rest of the ecosystem. We don't like reinventing wheels,
f708255
    but when the existing wheels quite don't fit the tracks, we're not afraid
f708255
    of making them work.
f708255
f708255
This application is heavily based on Qt and uses WebKit.
f708255
f708255
f708255
%prep
Raphael Groner 6f443fb
%if 0%{?gitdate}
d8bb0c9
%setup -qn%{name}-%{commit0} -a10
Raphael Groner 6f443fb
%else
d8bb0c9
%autosetup -p1 -a10
Raphael Groner 6f443fb
%endif
f708255
f708255
%build
d8bb0c9
%if %{without testsqtwebkit}
d8bb0c9
export CXXFLAGS="%{optflags} -DSKIP_WEBKIT_TESTS"
d8bb0c9
%endif
Raphael Groner 6f443fb
mkdir -p %{_target_platform}
Raphael Groner 6f443fb
pushd %{_target_platform}
Raphael Groner e96c7cd
# change path for the library, https://bugs.kde.org/show_bug.cgi?id=332579
Raphael Groner 5245197
%cmake_kf5 .. \
f708255
    -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir}/%{name} \
f708255
    -DCMAKE_INSTALL_RPATH=%{_libdir}/%{name} \
Raphael Groner d8b0db9
    -DBUILD_SHARED_LIBS:BOOL=OFF
Raphael Groner 6f443fb
popd
d8bb0c9
Raphael Groner 6f443fb
%make_build -C %{_target_platform}
b47affe
f708255
%if %{with doxy}
f708255
doxygen src/Doxyfile
f708255
%endif
f708255
f708255
%install
Raphael Groner 6f443fb
%make_install -C %{_target_platform}
f708255
%find_lang %{name}_common --with-qt
Raphael Groner 6f443fb
#install -m644 -p -D %{SOURCE1} %{buildroot}%{_mandir}/man1/%{name}.1
Rex Dieter 2d5e6cf
f708255
f708255
%check
f708255
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
Raphael Groner 4203fb7
# appstream is not available in EPEL
Raphael Groner 4203fb7
%if 0%{?fedora}
Raphael Groner 4203fb7
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
Raphael Groner 4203fb7
%endif
2c5ce65
# do tests in some fake X
Raphael Groner e96c7cd
#xvfb-run -a find %{_target_platform} -name test_\* -print -exec '{}' \;
Raphael Groner e96c7cd
pushd %{_target_platform}
Raphael Groner cc72dc9
xvfb-run -a %ctest
2c5ce65
f708255
%files -f %{name}_common.lang
f708255
%license LICENSE
f708255
%doc README src/Doxyfile
Raphael Groner 6f443fb
#%%{_mandir}/man1/%{name}.1*
f708255
%{_libdir}/%{name}/
f708255
%{_bindir}/%{name}
f708255
%{_bindir}/be.contacts
f708255
%{_datadir}/appdata/*.appdata.xml
f708255
%{_datadir}/applications/*.desktop
f708255
%{_datadir}/icons/hicolor/32x32/apps/*.png
f708255
%{_datadir}/icons/hicolor/scalable/apps/*.svg
f708255
2fb6025
%if %{with doxy}
f708255
# optional developer documentation
f708255
%package doc
f708255
BuildArch: noarch
f708255
Summary:   Documentation files for %{name}
f708255
f708255
%description doc
f708255
%{summary}.
f708255
f708255
%files doc
f708255
%license LICENSE
f708255
%doc _doxygen/*
f708255
%endif
f708255
f708255
f708255
%changelog
1511ce8
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7-14
1511ce8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
1511ce8
3411647
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7-13
3411647
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
3411647
ba99109
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7-12
ba99109
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ba99109
ccdbd92
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7-11
ccdbd92
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
ccdbd92
768a69c
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7-10
768a69c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
768a69c
d8bb0c9
* Mon Jun 05 2017 Raphael Groner <projects.rg@smart.ms> - 0.7-9
d8bb0c9
- add patch to skip instable tests for qtwebkit
d8bb0c9
- merge unpacking of po files into setup command
d8bb0c9
52fe460
* Fri May 12 2017 Raphael Groner <projects.rg@smart.ms> - 0.7-8
52fe460
- add s390x to exluded architectures
52fe460
3913449
* Mon Feb 27 2017 Raphael Groner <projects.rg@smart.ms> - 0.7-8
3913449
- rebuilt
3913449
a6c2fd2
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7-7
a6c2fd2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
a6c2fd2
53e3dfb
* Sat Dec 10 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.7-6
53e3dfb
- Rebuild for gpgme 1.18
53e3dfb
eee5a9d
* Wed Dec 07 2016 Builder <projects.rg@smart.ms> - 0.7-5
571865c
- add ExcludeArch
a039b3a
- fix gpg test
8d48d78
- add BR: gnupg2-smime
8d48d78
Raphael Groner 83a2fb1
* Sat Jul 02 2016 Raphael Groner <projects.rg@smart.ms> - 0.7-4
Raphael Groner 83a2fb1
- [epel7] rebuild for qtkeychain-0.7.0
Raphael Groner 83a2fb1
Raphael Groner 69d31fa
* Sat Jun 25 2016 Raphael Groner <projects.rg@smart.ms> - 0.7-3
Raphael Groner 69d31fa
- explicitly R: qt5-qtsvg
Raphael Groner 69d31fa
Raphael Groner 735a1bb
* Sat Jun 25 2016 Raphael Groner <projects.rg@smart.ms> - 0.7-2
Raphael Groner 735a1bb
- [epel7] enable gpg and mimetic
Raphael Groner 5245197
- [epel7] fix cmake for kf5
Raphael Groner 5245197
- improve some comments
Raphael Groner 4203fb7
- [epel7] appstream is not available
Raphael Groner cc72dc9
- [epel7] fix ctest
Raphael Groner 735a1bb
Raphael Groner d8b0db9
* Sun Jun 12 2016 Raphael Groner <projects.rg@smart.ms> - 0.7-1
Raphael Groner d8b0db9
- official upstream version
Raphael Groner d8b0db9
Raphael Groner 6f443fb
* Sun Jun 12 2016 Raphael Groner <projects.rg@smart.ms> - 0.7-0.1.20160610git8901a5c
Raphael Groner 6f443fb
- switch to git snapshot
Raphael Groner 6f443fb
- add support for GPG and MIME
Raphael Groner 6f443fb
- drop manpage
Raphael Groner 6f443fb
- use target build folder
Raphael Groner 6f443fb
d106448
* Mon May 23 2016 Nikos Roussos <comzeradd@fedoraproject.org> 0.6-6
d106448
- Rebuild for qtkeychain new release
d106448
Raphael Groner a1bacdd
* Fri May 20 2016 Raphael Groner <projects.rg@smart.ms> - 0.6-5
Raphael Groner a1bacdd
- rebuild due to qtkeychain ABI change
Raphael Groner a1bacdd
8bca24f
* Tue Apr 05 2016 Raphael Groner <projects.rg@smart.ms> - 0.6-4
8bca24f
- reenable tests on all arches, icu/gcc6 bug is fixed, rhbz#1307633, rhbz#1309731
8bca24f
Rex Dieter 2d5e6cf
* Tue Mar 08 2016 Rex Dieter <rdieter@fedoraproject.org> 0.6-3
Rex Dieter 2d5e6cf
- drop DBUS_FATAL_WARNINGS=0 hack, rhbz#1309731 fixed
Rex Dieter 2d5e6cf
- use pregenerated trojita manpage (built-time one is bad)
Rex Dieter 2d5e6cf
2c5ce65
* Sun Feb 21 2016 Raphael Groner <projects.rg@smart.ms> - 0.6-2
2c5ce65
- use xvfb-run -a
2c5ce65
- workaround for FTBFS cause of dbus, rhbz#1309731
bf13806
- disable fatal warnings
2c5ce65
276a280
* Tue Feb 02 2016 Raphael Groner <projects.rg@smart.ms> - 0.6-1
276a280
- new version
276a280
- use xvfb-run
276a280
87864c0
* Wed Dec 16 2015 Raphael Groner <projects.rg@smart.ms> - 0.5a-2.20151216gitefa30f3
87864c0
- add QtKeyChain
87864c0
- drop qt4
87864c0
b47affe
* Wed Dec 16 2015 Raphael Groner <projects.rg@smart.ms> - 0.5a-1.20151216gitefa30f3
b47affe
- use latest upstream snapshot as post-release
b47affe
- finally well Qt5.6 support!
b47affe
bd1d4f6
* Sat Dec 12 2015 Raphael Groner <projects.rg@smart.ms> - 0.5-9
bd1d4f6
- add upstream patches for Qt5.x
bd1d4f6
49f1a11
* Mon Oct 05 2015 Raphael Groner <projects.rg@smart.ms> - 0.5-8
49f1a11
- add missing headers inclusion, rhbz#1266712
49f1a11
2fb6025
* Fri Jun 26 2015 Raphael Groner <projects.rg@smart.ms> - 0.5-7
2fb6025
- fix build conditional for optional doxygen
2fb6025
f708255
* Fri Jun 26 2015 Raphael Groner <projects.rg@smart.ms> - 0.5-6
f708255
- optional BR: at EPEL
f708255
f708255
* Wed Jun 24 2015 Raphael Groner <projects.rg@smart.ms> - 0.5-5
f708255
- add files validation
f708255
- use license GPLv2+ aggregated
f708255
- use build conditionals
f708255
- insert some comments
f708255
- insert BR: zlib-devel (optional imap compression)
f708255
f708255
* Wed Apr 01 2015 Raphael Groner <projects.rg@smart.ms> - 0.5-4
f708255
- reenable html formatting testcase
f708255
- optional doxygen
f708255
f708255
* Wed Apr 01 2015 Raphael Groner <projects.rg@smart.ms> - 0.5-3
f708255
- ease switching build with qt4 or qt5
f708255
- disable doxygen
f708255
- remove toolkit from summary
f708255
- use build subfolder
f708255
- improve tests execution
f708255
f708255
* Tue Mar 31 2015 Raphael Groner <projects.rg@smart.ms> - 0.5-2
f708255
- build for qt5
f708255
f708255
* Sat Feb 28 2015 Raphael Groner <projects.rg (AT) smart.ms> - 0.5-1
f708255
- clean files section and R: hicolor-icon-theme
f708255
- introduce license macro
f708255
- use name macro generally
f708255
- new upstream version 0.5
f708255
- distribute doxygen files
f708255
f708255
* Mon Oct 27 2014 Karel Volný <kvolny@redhat.com> 0.4.1-3
f708255
- Added ragel build requirement
f708255
f708255
* Mon Apr 14 2014 Karel Volný <kvolny@redhat.com> 0.4.1-2
f708255
- Fixed icon handling and added comments as per the package review
f708255
- https://bugzilla.redhat.com/show_bug.cgi?id=1080411#c2
f708255
f708255
* Tue Mar 25 2014 Karel Volný <kvolny@redhat.com> 0.4.1-1
f708255
- Initial Fedora version based on upstream OBS package