Name: txt2tags Version: 2.4 Release: 7%{?dist} Summary: Converts text files to HTML, XHTML, sgml, LaTeX, man URL: http://txt2tags.sourceforge.net/ Source0: http://dl.sf.net/txt2tags/txt2tags-%{version}.tgz Source1: 48px-txt2tags_icon.png License: GPLv2 Group: Applications/Text Requires: python BuildRequires: gettext-devel, desktop-file-utils Requires(post): scrollkeeper, desktop-file-utils Requires(postun): scrollkeeper, desktop-file-utils BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %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 ### Remove executable flag %{__chmod} 0644 extras/* ### Create locale files for file in $(ls -1 po/*.po); do msgfmt -o ${file//.po/.mo} $file done %install %{__rm} -rf %{buildroot} %{__install} -Dp -m0755 txt2tags %{buildroot}%{_bindir}/txt2tags ### Install translated manpages %{__install} -Dp -m0644 doc/manpage.man %{buildroot}%{_mandir}/man1/txt2tags.1 for file in $(ls -1 doc/manpage-*.man); do lang="${file##doc/manpage-}" lang="${lang%%.man}" %{__install} -Dp -m0644 $file %{buildroot}%{_mandir}/$lang/man1/txt2tags.1 done ### Install locale files for file in $(ls -1 po/*.mo); do basename="${file##po/}" lang="${basename%%.mo}" %{__install} -Dp -m0644 $file %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/txt2tags.mo done mkdir -p %{buildroot}%{_datadir}/pixmaps %{__install} -D -m644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.png cat > %{name}.desktop << EOF [Desktop Entry] Encoding=UTF-8 StartupNotify=true Name=TextToTags Comment=A generic text converter. Exec=txt2tags Icon=%{name}.png Terminal=false Type=Application EOF mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install --vendor=fedora \ --dir %{buildroot}%{_datadir}/applications \ --add-category X-Fedora \ --add-category Development \ %{name}.desktop %find_lang %{name} %post scrollkeeper-update -q || : %postun scrollkeeper-update -q || : %clean %{__rm} -rf %{buildroot} %files -f %{name}.lang %defattr(-, root, root) %doc ChangeLog COPYING README TODO doc/*.pdf extras/ samples/ %doc %{_mandir}/man1/txt2tags.1* %doc %{_mandir}/*/man1/txt2tags.1* %{_datadir}/applications/* %{_datadir}/pixmaps/* %{_bindir}/txt2tags %changelog * Tue May 20 2008 Matthias Haase - 2.4-7 - Rebuild for Fedora 9 * Tue Nov 13 2007 Matthias Haase - 2.4-6 - Rebuild for Fedora 8 * Sun Jun 3 2007 Matthias Haase - 2.4-5 - Rebuild for Fedora 7 - Category application removed to match desktop entry specification * Mon Feb 26 2007 Matthias Haase - 2.4-4 - Rebuild on Fedora Core 6, dist tag changed - Desktop file and icon added * Mon Jan 29 2007 Dag Wieers - 2.4-1 - Initial package. (using DAR)