File mallard-rng.spec of Package mallard-rng

#
# spec file for package mallard-rng
#
# 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:           mallard-rng
Version:        1.0.2
Release:        2%{?dist}
Summary:        RELAX NG schemas for all Mallard versions
License:        MIT
Url:            http://projectmallard.org/download/
Source0:        http://projectmallard.org/download/%{name}-%{version}.tar.bz2
Patch0:		mallard-1.0.2-opensuse.patch
Group:		Documentation/Other
BuildRequires:  make automake pkg-config
Requires:	sgml-skel >= 0.7
Requires(post): sgml-skel >= 0.7
Requires(postun): sgml-skel >= 0.7

BuildArch:      noarch
      
%description
RELAX NG schemas for all Mallard versions and extensions that have been marked
final.

%package devel
Summary:        A Library to Manipulate XML Files
Group:          Development/Tools/Other

%description devel
RELAX NG schemas for all Mallard versions and extensions that have been marked
final. Development files.

%prep
%setup -q
%patch0 -p0


%build
autoreconf
%configure
make %{?_smp_mflags}


%install
%make_install
cp catalog mallard.xml
install -d %{buildroot}%{_sysconfdir}/xml/catalog.d
cp mallard.xml %{buildroot}%{_sysconfdir}/xml/catalog.d/
rm %{buildroot}%{_sysconfdir}/xml/catalog.d/catalog
# Fixup catalog paths
sed -i'' 's#"\.\./#"%{_datadir}/xml/#' %{buildroot}%{_sysconfdir}/xml/catalog.d/*

%post
update-xml-catalog

%postun
update-xml-catalog

%files
%defattr(-,root,root)
%doc AUTHORS NEWS README
%license COPYING
%{_datadir}/xml/mallard
%config(noreplace) %{_sysconfdir}/xml/catalog.d/mallard.xml

%files devel
%defattr(-,root,root)
%{_datadir}/pkgconfig/mallard-rng.pc

%changelog
openSUSE Build Service is sponsored by