File yodl.spec of Package yodl.4890

#
# spec file for package yodl
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#


Name:           yodl
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  grep
BuildRequires:  icmake
BuildRequires:  sed
BuildRequires:  texlive-latex
%if 0%{?suse_version} > 1220
BuildRequires:  texlive-collection-binextra
BuildRequires:  texlive-collection-latex
BuildRequires:  tex(a4.sty)
BuildRequires:  tex(epsf.sty)
%else
BuildRequires:  texlive-bin
%endif
Version:        3.03.0
Release:        0
Summary:        Yet One-other Document Language
License:        GPL-3.0
Group:          Development/Tools/Doc Generators
Url:            http://yodl.sourceforge.net/
Source:         http://sourceforge.net/projects/yodl/files/yodl/%{version}/%{name}_%{version}.orig.tar.gz
# suse specific
Patch0:         %{name}-doc-packages.patch
Patch1:         yodl-CVE-2016-10375.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
YODL is a package that consists of programs, some shell scripts, and
auxiliary "lib" files for which hold macro files. The whole purpose of
the package is to provide a simple-to-use and extensible document
language that can be used to convert documents in the YODL format to a
variety of other formats. In this purpose, YODL somewhat resembles
generic markup languages.

%prep
%setup -q
%patch0
%patch1 -p1

sed -i s,"#define COPT.*","#define COPT \"%{optflags}\"", ./build

%build
./build programs
./build man
./build manual
./build macros

%install
cp -a tmp/install/* %{buildroot}
chmod +x %{buildroot}%{_bindir}/yodl2whatever
(cd %{buildroot}%{_bindir}; for i in html latex man ms sgml txt xml; do ln -s yodl2whatever yodl2$i; done)

rm -f %{buildroot}%{_docdir}/yodl.dvi
rm -f %{buildroot}%{_docdir}/yodl.latex
rm -f %{buildroot}%{_docdir}/yodl.txt

%files
%defattr(-,root,root)
%doc AUTHORS.txt changelog LICENSE README.* CHANGES

%{_bindir}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*

%doc %{_mandir}/man1/*
%doc %{_mandir}/man7/*

%changelog
openSUSE Build Service is sponsored by