forked from pool/ansifilter
e83cb78248
* Fix parsing of "(B" reset sequence. * CLI: Add --no-version-info option. * GUI: Layout adjustments. - Remove desktop file from sources (now included in upstream tarball). OBS-URL: https://build.opensuse.org/package/show/devel:tools/ansifilter?expand=0&rev=15
108 lines
2.8 KiB
RPMSpec
108 lines
2.8 KiB
RPMSpec
#
|
|
# spec file for package ansifilter
|
|
#
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
# Copyright (c) 2013 Pascal Bleser.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%bcond_without gui
|
|
Name: ansifilter
|
|
Version: 2.9
|
|
Release: 0
|
|
Summary: ANSI Terminal Escape Code Converter
|
|
License: GPL-3.0+
|
|
Group: Development/Tools/Other
|
|
Url: http://www.andre-simon.de/
|
|
Source: http://www.andre-simon.de/zip/ansifilter-%{version}.tar.bz2
|
|
Source2: http://www.andre-simon.de/zip/ansifilter-%{version}.tar.bz2.asc
|
|
Source99: ansifilter.keyring
|
|
BuildRequires: gcc-c++
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
Ansifilter handles text files containing ANSI terminal escape codes.
|
|
The command sequences may be stripped or be interpreted to generate formatted
|
|
output (HTML, RTF, TeX, LaTeX, BBCode).
|
|
|
|
%if %{with gui}
|
|
%package gui
|
|
Summary: ANSI Terminal Escape Code Converter - Qt GUI
|
|
Group: Development/Tools/Other
|
|
BuildRequires: libqt5-qtbase-devel
|
|
BuildRequires: update-desktop-files
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description gui
|
|
This package provides a Qt Graphical User Interface to run %{name}.
|
|
%endif
|
|
|
|
%prep
|
|
%setup -q
|
|
%if %{with gui}
|
|
# Remove pre-configured files which may cause errors with Leap 42.x.
|
|
rm -v src/qt-gui/moc_*.cpp
|
|
rm -v src/qt-gui/Makefile*
|
|
%endif
|
|
|
|
%build
|
|
make \
|
|
CFLAGS="%{optflags} -fPIC" \
|
|
CXXFLAGS="%{optflags} -std=c++11 -fPIC" \
|
|
QMAKE="qmake-qt5" \
|
|
all \
|
|
%if %{with gui}
|
|
all-gui \
|
|
%endif
|
|
%{?_smp_mflags}
|
|
|
|
%install
|
|
make \
|
|
DESTDIR=%{buildroot} \
|
|
doc_dir="%{_docdir}/%{name}" \
|
|
install \
|
|
%if %{with gui}
|
|
install-gui
|
|
|
|
%suse_update_desktop_file %{name}
|
|
|
|
%if 0%{suse_version} < 1330
|
|
%post gui
|
|
%desktop_database_post
|
|
|
|
%postun gui
|
|
%desktop_database_postun
|
|
%endif
|
|
%endif
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%dir %{_docdir}/%{name}
|
|
%exclude %{_docdir}/%{name}/INSTALL
|
|
%{_docdir}/%{name}/COPYING
|
|
%{_docdir}/%{name}/ChangeLog
|
|
%{_docdir}/%{name}/README
|
|
%{_bindir}/ansifilter
|
|
%{_mandir}/man1/ansifilter.1%{ext_man}
|
|
|
|
%if %{with gui}
|
|
%files gui
|
|
%defattr(-,root,root)
|
|
%{_bindir}/ansifilter-gui
|
|
%{_datadir}/applications/ansifilter.desktop
|
|
%{_datadir}/pixmaps/ansifilter.xpm
|
|
%endif
|
|
|
|
%changelog
|