File txt2tags.spec of Package txt2tags

# txt2tags.spec
# Copyright (c) 2013 Christoph Junghans <>
# Originally written by
# Fixed for Application:Geo by
# This file is under MIT license

Name:           txt2tags
Version:        2.6
Release:        1
Summary:        Converts text files to HTML, XHTML, sgml, LaTeX, man and others
Group:          Productivity/Text/Convertors
License:        GPL-2.0
Source:         %{name}-%{version}.tar.bz2
Requires:       python
BuildArch:      noarch
BuildRequires:  fdupes gettext-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-root
Txt2tags is a generic text converter. From a simple text file with minimal
markup, it generates documents on the following formats: HTML, XHTML, sgml,
LaTeX, Lout, man, Magic Point (mgp), MoinMoin and Adobe PageMaker. Supports
heading, font beautifiers, verbatim, quote, link, lists, table and image.
There are GUI, Web and cmdline interfaces. It's a single Python script and
no external commands or libraries are needed.
%setup -q

# compile the translated messages for all languages
%define LANGS $(cd po; ls *.po | cut -d. -f1)
for lang in %{LANGS}; do
        msgfmt -o po/$ po/$lang.po
#chmod 744 extras/*
# executables
install -d %{buildroot}%{_bindir}
install -m 0755 %{name} %{buildroot}%{_bindir}
# man pages
install -d %{buildroot}/%{_mandir}/man1
install -m 0644 doc/ %{buildroot}/%{_mandir}/man1/txt2tags.1
rm doc/
cd doc
for lang in $(ls -p1 | grep / | cut -d/ -f1); do
  if [ ! -z $(ls $lang | grep .man) ]; then
    install -d %{buildroot}/%{_mandir}/$lang/man1
    install -m 0644 $lang/$(ls $lang | grep .man) %{buildroot}/%{_mandir}/$lang/man1/txt2tags.1
    rm $lang/$(ls $lang | grep .man)
cd ..
# translations
for lang in %{LANGS}; do
        install -d \
        install -m 0644 po/$ \
rm -rf %{buildroot}
%doc doc/ extras/ samples/

openSUSE Build Service is sponsored by