File libxmlada.spec of Package libxmlada

#
# spec file for package libxmlada
#
# Copyright (c) 2011 R. Tyler Croy <tyler@linux.com>
#
# 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

%define makefile "Makefile.opensuse"

Name:           libxmlada
Version:        3.2.1
Release:        1
Summary:        XML/Ada, a full XML suite for Ada programmers (runtime)

Group:          System/Libraries
License:        GPLv2
URL:            http://libre.adacore.com/
Source0:        %{name}-%{version}.tar.bz2
BuildRoot:     %{_tmppath}/%{name}-%{version}-build
# BuildArch:      noarch

BuildRequires:  gcc-ada
BuildRequires:  chrpath
Requires:       gcc-ada

Patch1:         custom_build_gpr.patch
Patch2:         makefile_opensuse.patch

%description

XML/Ada is a set of modules that provide a simple manipulation of XML streams.
It supports the whole XML 1.0 specifications, and can parse any file that
follows this standard (including the contents of the DTD). It also provides
support for a number of other standard associated with XML, like SAX, DOM, and
XML Schemas. In addition, it includes a module to manipulate Unicode streams,
since this is required by the XML standard.

%package -n libxmlada3_2_1
Summary:        XML/Ada library
Group:          Development/Libraries/Other

%description    -n libxmlada3_2_1
Package for the XML/Ada library version 3.2.1 from AdaCore

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries/Other
Requires:       libxmlada3_2_1 = %{version}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%package        doc
Summary:        Documentation files for %{name}
Group:          Documentation/Other
Requires:       %{name} = %{version}

%description    doc
The %{name}-doc package contains documentation and manuals for the libraries in %{name}-devel

%prep
%setup -q
%patch1
%patch2


%build
%configure
make %{?_smp_mflags} -f %{makefile}


%install
%__install -d "%{buildroot}%{_bindir}"
%__install -d "%{buildroot}%{_libdir}"
%__install -d "%{buildroot}%{_datadir}"
%__install -d "%{buildroot}%{_includedir}"

make install DESTDIR=%{buildroot} BINDIR=%{_bindir} \
        LIBDIR=%{_libdir} INCLUDEDIR=%{_includedir} -f %{makefile}
find %{buildroot} -name '*.la' -exec rm -f {} ';'
find %{buildroot} -name '*.ali' -exec rm -f {} ';'


%clean
rm -rf %{buildroot}


%post -n libxmlada3_2_1 -p /sbin/ldconfig

%postun -n libxmlada3_2_1 -p /sbin/ldconfig


%files -n libxmlada3_2_1
%defattr(-,root,root,-)
%doc
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root,-)
%doc
%{_includedir}/*
%{_libdir}/*.so
%{_bindir}/xmlada-config


%changelog
openSUSE Build Service is sponsored by