[ansifilter/el6] Initial SETUP.

Christopher Meng cicku at fedoraproject.org
Tue Jul 22 01:54:42 UTC 2014


commit a6baf6c45d84f40a10b7d05e4ceca4e678a1c80c
Author: Christopher Meng <i at cicku.me>
Date:   Tue Jul 22 09:02:25 2014 +0800

    Initial SETUP.

 .gitignore         |    1 +
 af_icon.png        |  Bin 0 -> 17091 bytes
 ansifilter.desktop |    9 +++++
 ansifilter.spec    |   86 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources            |    1 +
 5 files changed, 97 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..dc7941c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/ansifilter-1.8.tar.gz
diff --git a/af_icon.png b/af_icon.png
new file mode 100644
index 0000000..8c0d5da
Binary files /dev/null and b/af_icon.png differ
diff --git a/ansifilter.desktop b/ansifilter.desktop
new file mode 100644
index 0000000..300a6b9
--- /dev/null
+++ b/ansifilter.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Ansifilter
+GenericName=Escape code converter
+Comment=ANSI terminal escape code converter
+Exec=ansifilter-gui %f
+Icon=ansifilter
+Type=Application
+Terminal=false
+Categories=Utility;TextTools;FileTools;
diff --git a/ansifilter.spec b/ansifilter.spec
new file mode 100644
index 0000000..3a6ee2a
--- /dev/null
+++ b/ansifilter.spec
@@ -0,0 +1,86 @@
+%global with_gui 1
+
+Name:           ansifilter
+Version:        1.8
+Release:        2%{?dist}
+Summary:        ANSI terminal escape code converter
+License:        GPLv3+
+URL:            http://www.andre-simon.de/doku/ansifilter/ansifilter.php
+Source0:        http://www.andre-simon.de/zip/%{name}-%{version}.tar.gz
+%if 0%{?with_gui}
+Source1:        ansifilter.desktop
+Source2:        http://www.andre-simon.de/img/af_icon.png
+%endif
+
+%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 0%{?with_gui}
+%package        gui
+Summary:        GUI for %{name} based on Qt4
+BuildRequires:  desktop-file-utils
+BuildRequires:  qt4-devel
+
+%description    gui
+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).
+
+This is a GUI of %{name} based on Qt4.
+%endif
+
+%prep
+%setup -q
+# Multilib fix.
+sed -i s'|/usr/lib|%{_libdir}|g' src/qt-gui/Makefile
+# Remove redundant moc files which will cause errors during building.
+rm -frv src/qt-gui/moc_*.cpp
+# CLTR quickfix
+find . -type f -exec sed -i 's/\r$//' {} + -print
+
+%build
+# Upstream embed the cli code in gui so no need to requires cli using GUI
+# program, in order to achieve this we need to preserve the objects with -c.
+%make_build CFLAGS="%{optflags} -c" LDFLAGS="%{?__global_ldflags}"
+%if 0%{?with_gui}
+# %%_qt4_qmake will respect the redhat-rpm-config
+%make_build all-gui QMAKE="%{_qt4_qmake}"
+%endif
+
+%install
+%make_install INSTALL_DATA="install -pm644" INSTALL_PROGRAM="install -pm755"
+%if 0%{?with_gui}
+make install-gui INSTALL_DATA="install -pm644" INSTALL_PROGRAM="install -pm755" DESTDIR=%{buildroot}
+
+desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{S:1}
+
+install -pDm644 %{S:2} %{buildroot}%{_datadir}/pixmaps/%{name}.png
+%endif
+
+rm -frv %{buildroot}%{_pkgdocdir}
+
+%files
+%doc ChangeLog COPYING README
+%{_bindir}/ansifilter
+%{_mandir}/man1/ansifilter.1*
+
+%if 0%{?with_gui}
+%files gui
+%doc ChangeLog COPYING README
+%{_bindir}/ansifilter-gui
+%{_datadir}/applications/%{name}.desktop
+%{_datadir}/pixmaps/%{name}.png
+%endif
+
+%changelog
+* Thu Jun 26 2014 Christopher Meng <rpm at cicku.me> - 1.8-2
+- Correct the license.
+- desktop file added for gui program.
+
+* Mon Apr 21 2014 Christopher Meng <rpm at cicku.me> - 1.8-1
+- Update to 1.8
+
+* Tue Dec 31 2013 Christopher Meng <rpm at cicku.me> - 1.7-1
+- Initial Package.
diff --git a/sources b/sources
index e69de29..c9b4baf 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+b92442d841c1ea7b6d4139cdc61f38bc  ansifilter-1.8.tar.gz


More information about the scm-commits mailing list