Name: txt2tags Version: 2.6 Release: %mkrel 3 Summary: Converts text files to HTML, XHTML, sgml, LaTeX, man, etc Group: Text tools License: GPLv2 URL: http://txt2tags.sourceforge.net Source0: http://txt2tags.sourceforge.net/src/%{name}-%{version}.tgz Requires: python BuildArch: noarch BuildRequires: gettext %description 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. %prep %setup -q %build # compile the translated messages for all languages %define LANGS $(cd po; ls *.po | cut -d. -f1) for lang in %{LANGS}; do msgfmt -o po/$lang.mo po/$lang.po done %install # executables install -d %{buildroot}%{_bindir} install -m 0755 %{name} %{buildroot}%{_bindir} # man pages install -d %{buildroot}/%{_mandir}/man1 install -m 0644 doc/manpage.man %{buildroot}/%{_mandir}/man1/txt2tags.1 rm doc/manpage.man pushd 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) fi done popd # translations for lang in %{LANGS}; do install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES install -m 0644 po/$lang.mo %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/txt2tags.mo done %find_lang %{name} %files -f %{name}.lang %doc ChangeLog README %doc doc/ extras/ samples/ %{_bindir}/%{name} %{_mandir}/man1/txt2tags.1* %changelog * Mon Jan 14 2013 umeabot <umeabot> 2.6-3.mga3 + Revision: 384931 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sat Jul 21 2012 wally <wally> 2.6-2.mga3 + Revision: 273073 - use find_lang macro * Sat Jul 21 2012 solbu <solbu> 2.6-1.mga3 + Revision: 273036 - Import Mandriva package - Spec cleanup - Fix License tag - New version