File xindy.spec of Package xindy

#
# spec file for package xindy
#
# Copyright (c) 2011 SUSE LINUX Products 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:           xindy
Version:        2.3.99pre1
Release:        1
Group:          Productivity/Text/Utilities
Summary:        Index generator for structured documents like LaTeX or SGML
License:        GPL-2.0
Url:            http://xindy.sf.net/

Source:         xindy-2.4~pre1.tar.xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  clisp flex texlive-latex xz

Source1:        fix-echo-expansion.dpatch.diff
Source2:        fix-FHS.dpatch.diff
Source3:        help-option.dpatch.diff
Source4:        fix-manpages.dpatch.diff
Source5:        fix-alphabets-doc-geometry.dpatch.diff
Source6:        fix-configure.dpatch.diff
# Need this at runtime for indexing to work correctly:
Requires:       clisp

Requires:       xindy-rules = %version

%description
xindy is an index processor that can be used to generate book-like
indexes for arbitrary document-preparation systems. This includes
systems such as TeX and LaTeX, the roff-family, SGML/XML-based
systems (e.g. HTML) that process some kind of text and generate
indexing information. The kernel system is not fixed to any specific
system, but can be configured to work together with such systems.

In comparison to other index processors xindy has several powerful
features that make it an ideal framework for describing and
generating complex indices, addressing especially international
indexing.

%package rules
License:        GPL-2.0
Summary:        Rule files for Xindy
Group:          Productivity/Publishing/TeX
BuildArch:      noarch

%description rules
xindy is an index processor that can be used to generate book-like
indexes for arbitrary document-preparation systems.

This package contains the rule files (the knowledge base) of xindy.

%package doc
License:        GPL-2.0
Summary:        Documentation for Xindy
Group:          Documentation/Other
BuildArch:      noarch

%description doc
Documentation for the Xindy index generator.

%prep
%setup -qn %name-2.4-SNAPSHOT
for i in "%{S:1}" "%{S:2}" "%{S:3}" "%{S:4}" "%{S:5}" "%{S:6}"; do
	# Debian at its best
	patch -p1 -i "$i";
	i="${i##*/}";
	patch -p1 -i "debian/patches/${i%.diff}";
done;

%build
%configure --docdir=%_docdir/%name
# no -j
make;

%install
make install DESTDIR="%buildroot";
rm -f "%buildroot/%_prefix/VERSION";

%files
%defattr(-,root,root)
%_bindir/*
%_libdir/%name

%files rules
%defattr(-,root,root)
%_datadir/%name

%files doc
%defattr(-,root,root)
%doc %_mandir/*/*
%doc %_docdir/*

%changelog