File docbook-toys.spec of Package docbook-toys

#
# spec file for package docbook-toys (Version 1.51.0)
#
# Copyright (c) 2009 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/
#

# norootforbuild


Name:           docbook-toys
BuildRequires:  docbook-dsssl-stylesheets openjade
%define sysconfdir %{_sysconfdir}
License:        GPL v2 or later
Group:          Productivity/Publishing/DocBook
Provides:       docbook-tools
Requires:       texlive-jadetex openjade docbook_3 docbook_4 iso_ent docbook-dsssl-stylesheets
AutoReqProv:    on
Version:        1.51.0
Release:        415
Summary:        DocBook Tools
Source:         http://www.suse.de/~ke/docbook-toys/docbook-toys-%{version}.tar.bz2
Source1:        %{name}-README.SuSE
Patch0:         docbook-toys-suffix.diff
Patch1:         docbook-toys-outdir.diff
Patch2:         docbook-toys-1.51.0-pdf-exit.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
Url:            http://www.suse.de/~ke/docbook-toys/

%description
A shell script to convert SGML documents based on the DocBook DTD.

For usage information read:

/usr/share/doc/packages/docbook-toys/README



Authors:
--------
    Karl Eichwalder  <ke@suse.de>
    Mark Galassi  <rosalia@cygnus.com>

%define INSTALL install -m755 -s
%define INSTALL_DIR install -d -m755
%define INSTALL_DATA install -m644
%define INSTALL_SCRIPT install -m755

%prep
%setup -q -n docbook-toys-%{version}
%{INSTALL_DATA} %{SOURCE1} README.SuSE
%patch -p 1 -P 0
%patch -p 0 -P 1
%patch -p 1 -P 2

%build
autoreconf -i -f
LIBS=-L/usr/X11R6/lib ./configure \
    --prefix=%{_prefix} \
    --sysconfdir=%sysconfdir \
    --build $RPM_ARCH-suse-linux

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=$RPM_BUILD_ROOT mk_links
mkdir -p $RPM_BUILD_ROOT%sysconfdir/%{name}
# move config files to _sysconfdir
pushd $RPM_BUILD_ROOT%{_datadir}/sgml/docbook/docbook-toys
for f in suse-*.dsl gdp-both.dsl docbook-sloppy.dcl; do
  mv $f $RPM_BUILD_ROOT%sysconfdir/%{name}
  ln -s %sysconfdir/%{name}/$f $f
done
popd

%clean
rm -fr $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc README.SuSE
%doc AUTHORS COPYING NEWS README THANKS TODO
%doc texmf.conf.diff
%doc test
%{_bindir}/*
%{_datadir}/sgml/docbook/docbook-toys
%config %{sysconfdir}/%{name}

%changelog