From ff8daa77a68bdebf80a69fec8d8b700464e120b4 Mon Sep 17 00:00:00 2001 From: Christian Dersch Date: Apr 10 2017 15:45:44 +0000 Subject: initial import (rhbz #1440542) --- diff --git a/.gitignore b/.gitignore index e69de29..a8fbb5e 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/FeatherPad-0.6-git20170401.7325229.tar.gz diff --git a/featherpad.spec b/featherpad.spec new file mode 100644 index 0000000..7a2cc03 --- /dev/null +++ b/featherpad.spec @@ -0,0 +1,105 @@ +# For release builds set to 1, for snapshots set to 0 +%global relbuild 0 + +%if !0%{?relbuild} +%global commit 73252293ca720d7783372b477f34ca9fad0ad8f6 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global gitdate 20170401 +%global git_ver -git%{gitdate}.%{shortcommit} +%global git_rel .git%{gitdate}.%{shortcommit} +%endif # !0%%{?relbuild} + +%global github_name FeatherPad + +Name: featherpad +Version: 0.6 +# pre-release snapshot, works much better than last release (0.5.8) +Release: 0.1%{?git_rel}%{?dist} +Summary: Lightweight Qt5 Plain-Text Editor + +License: GPLv3+ +URL: https://github.com/tsujan/%{github_name} +%if 0%{?relbuild} +Source0: %{url}/archive/%{version}.tar.gz#/%{github_name}-%{version}.tar.gz +%else # 0%%{?relbuild} +Source0: %{url}/archive/%{commit}.tar.gz#/%{github_name}-%{version}%{?git_ver}.tar.gz +%endif # 0%%{?relbuild} + +BuildRequires: desktop-file-utils +BuildRequires: gcc-c++ +BuildRequires: qt5-qtbase-devel +BuildRequires: qt5-qtsvg-devel +BuildRequires: qt5-qttools-devel +BuildRequires: qt5-qtx11extras-devel + +Requires: hicolor-icon-theme + +%description +FeatherPad is a lightweight Qt5 plain-text editor for Linux. It is independent +of any desktop environment and has: + +* Drag-and-drop support, including tab detachment and attachment; +* X11 virtual desktop awareness (using tabs on current desktop but opening a + new window on another); +* An optionally permanent search-bar with a different search entry + for each tab; +* Instant highlighting of found matches when searching; +* A docked window for text replacement; +* Support for showing line numbers and jumping to a specific line; +* Automatic detection of text encoding as far as possible and optional saving + with encoding; +* Syntax highlighting for common programming languages; +* Printing; +* Text zooming; +* Appropriate but non-interrupting prompts; + + +%prep +%if 0%{?relbuild} +%autosetup -n %{github_name}-%{version} -p 1 +%else # 0%%{?relbuild} +%autosetup -n %{github_name}-%{commit} -p 1 +%endif # 0%%{?relbuild} + +%build +mkdir %{_target_platform} +pushd %{_target_platform} +%{qmake_qt5} .. +%make_build +popd + + +%install +make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} +%find_lang %{name} --with-qt + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop + + +%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}.lang +%license COPYING +%{_bindir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/help +%dir %{_datadir}/%{name}/translations + + +%changelog +* Sun Apr 9 2017 Christian Dersch 0.6-0.1.git20170401.7325229 +- initial build (review rhbz #1440542) diff --git a/sources b/sources index e69de29..72e7278 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (FeatherPad-0.6-git20170401.7325229.tar.gz) = 261b5c233628dd6e6885de84775b503ad9ec13daa75118435fedbcc0e19f9a719fa5490317c5449087a4cdc8cabca52ee6b3b07db7dce09733727b3cb0329166