%global github_owner wereturtle %global github_name ghostwriter %global github_commit ae060c4ab63d27ccd959e7046a8828dfd0f12429 %global commitdate 20180415 %global shortcommit %(c=%{github_commit}; echo ${c:0:7}) Name: ghostwriter Version: 1.6.2 #Release: 4.%{commitdate}git%{shortcommit}%{?dist} Release: 4%{?dist} Group: Applications/Productivity License: GPLv3 URL: https://wereturtle.github.io/ghostwriter/ Summary: A cross-platform, aesthetic, distraction-free Markdown editor # Original URL (for git snapshot): #Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{github_name}-%{github_commit}.tar.gz # Original URL (for stable release): Source0: https://github.com/%{github_owner}/%{github_name}/archive/v%{version}/%{github_name}-%{version}.tar.gz BuildRequires: coreutils BuildRequires: gcc gcc-c++ make BuildRequires: pkgconfig BuildRequires: desktop-file-utils BuildRequires: qt5-linguist #BuildRequires: qt5-qtbase-devel BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Concurrent) BuildRequires: pkgconfig(Qt5Multimedia) BuildRequires: pkgconfig(Qt5PrintSupport) BuildRequires: pkgconfig(Qt5Svg) BuildRequires: pkgconfig(Qt5WebKitWidgets) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(hunspell) # https://fedoraproject.org/wiki/Packaging:Scriptlets # https://fedoraproject.org/wiki/PackagingDrafts/ScriptletSnippets Requires(post): coreutils Requires(postun): coreutils Requires(posttrans): coreutils # gtk-update-icon-cache #Requires(post): gtk-update-icon-cache Requires(postun): gtk-update-icon-cache Requires(posttrans): gtk-update-icon-cache # update-mime-database #Requires(post): shared-mime-info #Requires(postun): shared-mime-info #Requires(posttrans): shared-mime-info # update-desktop-database Requires(post): desktop-file-utils Requires(postun): desktop-file-utils #Requires(posttrans): desktop-file-utils # glib-compile-schemas #Requires(post): glib2 #Requires(postun): glib2 #Requires(posttrans): glib2 # ldconfig #Requires(post): glibc /sbin/ldconfig #Requires(postun): glibc /sbin/ldconfig #Requires(posttrans): glibc /sbin/ldconfig %description ghostwriter is a Windows and Linux text editor for Markdown, which is a plain text markup format created by John Gruber. For more information about Markdown, please visit John Gruber’s website at http://www.daringfireball.net. ghostwriter provides a relaxing, distraction-free writing environment, whether your masterpiece be that next blog post, your school paper, or your NaNoWriMo novel. %prep %{autosetup} %build lrelease-qt5 "%{name}.pro" %qmake_qt5 PREFIX="%{_prefix}" %{make_build} %install %make_install INSTALL_ROOT="%{buildroot}" %check /usr/bin/desktop-file-validate "%{buildroot}/%{_datadir}/applications/%{name}.desktop" #/usr/bin/appstream-util validate-relax --nonet "%{buildroot}%{_metainfodir}/%{appname}.appdata.xml" %post /bin/touch --no-create "%{_datadir}/icons/hicolor" &> /dev/null || : #/usr/bin/update-mime-database -n %{_datadir}/mime &>/dev/null || : /usr/bin/update-desktop-database &> /dev/null || : #/sbin/ldconfig %postun #if [[ "${1}" -eq "0" ]] ; then # /usr/bin/glib-compile-schemas "%{_datadir}/glib-2.0/schemas" &> /dev/null || : #fi /usr/bin/update-desktop-database &> /dev/null || : 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 || : #/usr/bin/update-mime-database -n %{_datadir}/mime &>/dev/null || : fi #/sbin/ldconfig %posttrans #/usr/bin/glib-compile-schemas "%{_datadir}/glib-2.0/schemas" &> /dev/null || : /usr/bin/gtk-update-icon-cache "%{_datadir}/icons/hicolor" &> /dev/null || : #update-mime-database -n %{_datadir}/mime &>/dev/null || : %files %doc README.md CREDITS.md CONTRIBUTING.md %license COPYING %{_bindir}/%{name} %{_datadir}/%{name} %{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*x*/apps/%{name}.png %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{_datadir}/pixmaps/%{name}.xpm %{_mandir}/man1/%{name}.1.gz %changelog * Fri May 04 2018 Tomasz Tomasik - 1.6.2-4 - SPEC file cleanups - Update requirements for EL7 - Rebuilt for EL7 * Sat Apr 28 2018 opensuse-packaging@opensuse.org - Update to version 1.6.2.0.git20180415: * Bump up version number. Update translations. * Fix line break tokenizing to not include paragraph breaks. * Fixes #315. Work around slow load of QPrinter constructor in Fedora 27 by lazy loading the class for default printer settings only when needed for printing rather than during app startup. * Bump up version number. * Work around Qt 5.10 bug where application will crash on loading another document if the text cursor is not first set to the beginning of the document. * Update timestamp in appdata * Fixes #302. Look for default translations for Qt elements to use in ghostwriter's translations path if they are not found on the standard Qt path * Update credits with Chinese translation author * Add qtbase_* to translations * fix broken french translation file