Blame featherpad.spec

ff8daa7
# For release builds set to 1, for snapshots set to 0
7e4faa8
%global relbuild 1 
ff8daa7
ff8daa7
%if !0%{?relbuild}
ff8daa7
%global commit 73252293ca720d7783372b477f34ca9fad0ad8f6
ff8daa7
%global shortcommit %(c=%{commit}; echo ${c:0:7})
ff8daa7
%global gitdate 20170401
ff8daa7
%global git_ver -git%{gitdate}.%{shortcommit}
ff8daa7
%global git_rel .git%{gitdate}.%{shortcommit}
ff8daa7
%endif # !0%%{?relbuild}
ff8daa7
ff8daa7
%global github_name FeatherPad
ff8daa7
ff8daa7
Name:           featherpad
c17743e
Version:        0.6.1
3855821
Release:        3%{?dist}
ff8daa7
Summary:        Lightweight Qt5 Plain-Text Editor
ff8daa7
ff8daa7
License:        GPLv3+
ff8daa7
URL:            https://github.com/tsujan/%{github_name}
ff8daa7
%if 0%{?relbuild}
7e4faa8
Source0:        %{url}/archive/V%{version}.tar.gz#/%{github_name}-%{version}.tar.gz
ff8daa7
%else  # 0%%{?relbuild}
ff8daa7
Source0:        %{url}/archive/%{commit}.tar.gz#/%{github_name}-%{version}%{?git_ver}.tar.gz
ff8daa7
%endif # 0%%{?relbuild}
ff8daa7
ff8daa7
BuildRequires:  desktop-file-utils
ff8daa7
BuildRequires:  gcc-c++
ff8daa7
BuildRequires:  qt5-qtbase-devel
ff8daa7
BuildRequires:  qt5-qtsvg-devel
ff8daa7
BuildRequires:  qt5-qttools-devel
ff8daa7
BuildRequires:  qt5-qtx11extras-devel
ff8daa7
ff8daa7
Requires:       hicolor-icon-theme
ff8daa7
ff8daa7
%description
ff8daa7
FeatherPad is a lightweight Qt5 plain-text editor for Linux. It is independent
ff8daa7
of any desktop environment and has:
ff8daa7
ff8daa7
* Drag-and-drop support, including tab detachment and attachment;
ff8daa7
* X11 virtual desktop awareness (using tabs on current desktop but opening a 
ff8daa7
  new window on another);
ff8daa7
* An optionally permanent search-bar with a different search entry 
ff8daa7
  for each tab;
ff8daa7
* Instant highlighting of found matches when searching;
ff8daa7
* A docked window for text replacement;
ff8daa7
* Support for showing line numbers and jumping to a specific line;
ff8daa7
* Automatic detection of text encoding as far as possible and optional saving
ff8daa7
  with encoding;
ff8daa7
* Syntax highlighting for common programming languages;
ff8daa7
* Printing;
ff8daa7
* Text zooming;
ff8daa7
* Appropriate but non-interrupting prompts;
ff8daa7
ff8daa7
ff8daa7
%prep
ff8daa7
%if 0%{?relbuild}
ff8daa7
%autosetup -n %{github_name}-%{version} -p 1
ff8daa7
%else  # 0%%{?relbuild}
ff8daa7
%autosetup -n %{github_name}-%{commit} -p 1
ff8daa7
%endif # 0%%{?relbuild}
ff8daa7
ff8daa7
%build
ff8daa7
mkdir %{_target_platform}
ff8daa7
pushd %{_target_platform}
ff8daa7
%{qmake_qt5} ..
ff8daa7
%make_build
ff8daa7
popd
ff8daa7
ff8daa7
ff8daa7
%install
ff8daa7
make install INSTALL_ROOT=%{buildroot} -C %{_target_platform}
ff8daa7
%find_lang %{name} --with-qt
ff8daa7
ff8daa7
%check
ff8daa7
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
ff8daa7
ff8daa7
ff8daa7
ff8daa7
%files -f %{name}.lang
ff8daa7
%license COPYING
ff8daa7
%{_bindir}/%{name}
ff8daa7
%{_datadir}/applications/%{name}.desktop
ff8daa7
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
ff8daa7
%dir %{_datadir}/%{name}
ff8daa7
%{_datadir}/%{name}/help
ff8daa7
%dir %{_datadir}/%{name}/translations
ff8daa7
ff8daa7
ff8daa7
%changelog
3855821
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-3
3855821
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3855821
f7af23f
* Thu Jan 11 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.1-2
f7af23f
- Remove obsolete scriptlets
f7af23f
c17743e
* Fri Oct 20 2017 Christian Dersch <lupinix@mailbox.org> - 0.6.1-1
c17743e
- new version
c17743e
4abf58f
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-3
4abf58f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
4abf58f
788472d
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-2
788472d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
788472d
7e4faa8
* Sat May  6 2017 Christian Dersch <lupinix@mailbox.org> 0.6-1
1d957db
- new version (0.6 release)
7e4faa8
ff8daa7
* Sun Apr  9 2017 Christian Dersch <lupinix@mailbox.org> 0.6-0.1.git20170401.7325229
ff8daa7
- initial build (review rhbz #1440542)