File libparsifal.spec of Package libparsifal

#
# spec file for package libparsifal
#
# Copyright (c) 2012 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:           libparsifal
Version:        1.1.0
Release:        0
Summary:        A validating XML 1.0 parser written in ANSI C
License:        SUSE-Public-Domain
Group:          System/Libraries
Url:            http://www.saunalahti.fi/~samiuus/toni/xmlproc/
Source0:        %{name}-%{version}.tar.bz2
Patch0:         libparsifal-1.1.0-fix-64bit-portability-issue.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Parsifal is a validating XML 1.0 parser written in ANSI C.
Parsifal API is based on SAX2.

Parsifal can be used for parsing XML based messages (such as REST and RSS)
and for application specific data processing e.g. config files, data files
etc. Parsifal can also be used for document-oriented processing (e.g. XHTML
xhtml1-transitional.dtd) and for parsing modular documents because it is
conforming XML 1.0 parser and it supports features like internal and external
general entities, DTD parameter entities and default attributes etc. Parsifal
is ideal for processing large data files and streams since it's SAX based and
consumes very little memory not to mention it is fast enough for most purposes
'cos it's written in C.

%package -n libparsifal-1_1_0
Summary:        A validating XML 1.0 parser written in ANSI C
Group:          System/Libraries

%description -n libparsifal-1_1_0
Parsifal is a validating XML 1.0 parser written in ANSI C.
Parsifal API is based on SAX2.

Parsifal can be used for parsing XML based messages (such as REST and RSS)
and for application specific data processing e.g. config files, data files
etc. Parsifal can also be used for document-oriented processing (e.g. XHTML
xhtml1-transitional.dtd) and for parsing modular documents because it is
conforming XML 1.0 parser and it supports features like internal and external
general entities, DTD parameter entities and default attributes etc. Parsifal
is ideal for processing large data files and streams since it's SAX based and
consumes very little memory not to mention it is fast enough for most purposes
'cos it's written in C.


%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       libparsifal-1_1_0 = %{version}

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


%prep
%setup -q
%patch0 -p1

%build
export CFLAGS="$RPM_OPT_FLAGS"
%configure --with-gnu-ld --disable-static
make %{?_smp_mflags}

%install
make install DESTDIR=%{buildroot}
find %{buildroot} -name '*.la' -exec rm -f {} ';'

# remove executable permissions
find . -type f -perm 755 -exec chmod 644 {} \;

%clean
rm -rf %{buildroot}

%post -n libparsifal-1_1_0 -p /sbin/ldconfig

%postun -n libparsifal-1_1_0 -p /sbin/ldconfig

%files -n libparsifal-1_1_0
%defattr(-,root,root,-)
%doc BUGS ChangeLog COPYING README TODO
%{_libdir}/*-%{version}.so

%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/*.so
%exclude %{_libdir}/*-%{version}.so

%changelog
openSUSE Build Service is sponsored by