From f7082550ad1915c2f689f86016691be6dbdb0951 Mon Sep 17 00:00:00 2001 From: Raphael Groner Date: Jun 26 2015 09:57:33 +0000 Subject: Initial import (rhbz#1208582). --- diff --git a/.gitignore b/.gitignore index e69de29..dc53059 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/trojita-0.5.tar.bz2 diff --git a/sources b/sources index e69de29..320e9ca 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c583bb4d82620cda1c49e5f1b084f550 trojita-0.5.tar.bz2 diff --git a/trojita.spec b/trojita.spec new file mode 100644 index 0000000..cc935eb --- /dev/null +++ b/trojita.spec @@ -0,0 +1,209 @@ +# FIXME decide between qt5 or qt4 +%bcond_with qt4 +%bcond_with doxy + +%global X_display ":98" +%global _hardened_build 1 + +Name: trojita +Version: 0.5 +Release: 6%{?dist} +# Almost everything: dual-licensed under the GPLv2 or GPLv3 +# (with KDE e.V. provision for relicensing) +# src/XtConnect: BSD +# src/Imap/Parser/3rdparty/kcodecs.*: LGPLv2 +# Nokia imports: LGPLv2.1 or GPLv3 +# src/Imap/Parser/3rdparty/rfccodecs.cpp: LGPLv2+ +# src/qwwsmtpclient/: GPLv2 +## note that LGPL 2.1 short name is LGPLv2 according to +## https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses +#License: GPLv2+ and LGPLv2+ and BSD +License: GPLv2+ +Summary: IMAP e-mail client +URL: http://%{name}.flaska.net +Source: http://downloads.sf.net/%{name}/%{name}-%{version}.tar.bz2 + +BuildRequires: cmake +BuildRequires: zlib-devel +BuildRequires: help2man + +%if %{with qt4} +BuildRequires: qt4-webkit-devel +%else +BuildRequires: qt5-qtwebkit-devel qt5-qttools-devel +%endif + +%if 0%{?fedora} +BuildRequires: ragel +%endif + +%if %{with doxy} +BuildRequires: doxygen graphviz +%endif + +# needs for %%check +BuildRequires: desktop-file-utils +%if 0%{?fedora} +BuildRequires: libappstream-glib +%endif +BuildRequires: xorg-x11-server-Xvfb + +# provide some icons +Requires: hicolor-icon-theme + +%description +Trojitá is a IMAP e-mail client which: + * Enables you to access your mail anytime, anywhere. + * Does not slow you down. If we can improve the productivity of an e-mail + user, we better do. + * Respects open standards and facilitates modern technologies. We value + the vendor-neutrality that IMAP provides and are committed to be as + inter-operable as possible. + * Is efficient — be it at conserving the network bandwidth, keeping memory + use at a reasonable level or not hogging the system's CPU. + * Can be used on many platforms. One UI is not enough for everyone, but our + IMAP core works fine on anything from desktop computers to cell phones + and big ERP systems. + * Plays well with the rest of the ecosystem. We don't like reinventing wheels, + but when the existing wheels quite don't fit the tracks, we're not afraid + of making them work. + +This application is heavily based on Qt and uses WebKit. + + +%prep +%setup -q +# remove 'x-test' language +# https://bugs.kde.org/show_bug.cgi?id=332578 +rm po/%{name}_common_x-test.po po/%{name}_common_nds.po +sed -i -e "/x-test/d" -e "/nds/d" src/Gui/%{name}.desktop + + +%build +mkdir build +pushd build +# change path for the library +# https://bugs.kde.org/show_bug.cgi?id=332579 +%cmake \ + -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir}/%{name} \ + -DCMAKE_INSTALL_RPATH=%{_libdir}/%{name} \ + -DBUILD_SHARED_LIBS:BOOL=OFF \ +%if %{with qt4} +%else + -DWITH_QT5:BOOL=ON \ +%endif + .. +make %{?_smp_mflags} +popd +%if %{with doxy} +doxygen src/Doxyfile +%endif + + +%install +make -C build %{?_smp_mflags} DESTDIR=%{buildroot} install +%find_lang %{name}_common --with-qt +# generate manpage +mkdir -p %{buildroot}%{_mandir}/man1 +help2man -o %{buildroot}%{_mandir}/man1/%{name}.1 --no-info --no-discard-stderr -h-h --version-string=%{version} build/%{name} + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop +# appstream is not available at EPEL +appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml ||: +# do some fake X +# FIXME use xvfb-run +export DISPLAY=%{X_display} +Xvfb %{X_display} & +trap "kill $! || true" EXIT +export CTEST_OUTPUT_ON_FAILURE=BOOL:ON +pushd build +# FIXME html formatting fails for qt5, http://bugs.kde.org/show_bug.cgi?id=345739 +ctest %{?_smp_mflags} --output-on-failure -VV +#-E Html_formatting +popd + + +%post +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + + +%postun +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + + +%posttrans +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + + +%files -f %{name}_common.lang +%license LICENSE +%doc README src/Doxyfile +%{_mandir}/man1/%{name}.1* +%{_libdir}/%{name}/ +%{_bindir}/%{name} +%{_bindir}/be.contacts +%{_datadir}/appdata/*.appdata.xml +%{_datadir}/applications/*.desktop +%{_datadir}/icons/hicolor/32x32/apps/*.png +%{_datadir}/icons/hicolor/scalable/apps/*.svg + +%if 0%{?builddoxy} +# optional developer documentation +%package doc +BuildArch: noarch +Summary: Documentation files for %{name} + +%description doc +%{summary}. + +%files doc +%license LICENSE +%doc _doxygen/* +%endif + + +%changelog +* Fri Jun 26 2015 Raphael Groner - 0.5-6 +- optional BR: at EPEL + +* Wed Jun 24 2015 Raphael Groner - 0.5-5 +- add files validation +- use license GPLv2+ aggregated +- use build conditionals +- insert some comments +- insert BR: zlib-devel (optional imap compression) + +* Wed Apr 01 2015 Raphael Groner - 0.5-4 +- reenable html formatting testcase +- optional doxygen + +* Wed Apr 01 2015 Raphael Groner - 0.5-3 +- ease switching build with qt4 or qt5 +- disable doxygen +- remove toolkit from summary +- use build subfolder +- improve tests execution + +* Tue Mar 31 2015 Raphael Groner - 0.5-2 +- build for qt5 + +* Sat Feb 28 2015 Raphael Groner - 0.5-1 +- clean files section and R: hicolor-icon-theme +- introduce license macro +- use name macro generally +- new upstream version 0.5 +- distribute doxygen files + +* Mon Oct 27 2014 Karel Volný 0.4.1-3 +- Added ragel build requirement + +* Mon Apr 14 2014 Karel Volný 0.4.1-2 +- Fixed icon handling and added comments as per the package review +- https://bugzilla.redhat.com/show_bug.cgi?id=1080411#c2 + +* Tue Mar 25 2014 Karel Volný 0.4.1-1 +- Initial Fedora version based on upstream OBS package