File limal.spec of Package limal

#
# spec file for package limal (Version 1.6.1)
#
# Copyright (c) 2010 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:           limal
Version:        1.6.1
Release:        8
License:        GPLv2+
Group:          Development/Libraries/C and C++
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        limal-1.6.1.tar.bz2
Patch0:         limal-autodoc-index.patch
Prefix:         /usr
%define		swiglibdir /usr/share/limal/typemaps 
#!BuildIgnore: limal limal-devel limal-perl
BuildRequires:  curl gcc-c++ libblocxx-devel limal-devtools openssl-devel perl-gettext sgml-skel
Url:            http://forge.novell.com/modules/xfmod/project/?limal
Summary:        LiMaL--Core Library
%if 0%{?fedora_version} >= 7
BuildRequires:  perl-ExtUtils-Embed
%endif

%description
LiMaL is an C++ framework enhancement for BloCXX. This package contains
the LiMaL core library which include some basic functionality like
logging and file handling.


%package devel
Requires:       limal = %version
Requires:       limal-devel
Group:          Development/Libraries/C and C++
License:        GPLv2+
Requires:       libblocxx-devel libstdc++-devel pcre-devel limal-devtools
Summary:        LiMaL - Core Library Development Files 

%description devel
LiMaL - Core Library Development Files

%package perl
Requires:       limal-perl
%if 0%{?fedora_version} >= 7
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%else
Requires:       perl = %{perl_version}
%endif
Group:          Development/Libraries/Perl
License:        GPLv2+
Summary:        LiMaL - Core Library Perl Bindings

%description perl
LiMaL - Core Library Perl Bindings

%prep
%setup -n limal-1.6.1
%patch0 -p1

%build
%{prefix}/bin/limaltool limalautoconf
%{prefix}/bin/limaltool limalautomake
autoreconf --force --install --verbose
export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
%{?suse_update_config:%{suse_update_config -f}}
# workaround for fedora gettext check on x86_64
sed -i -e 's/return (int) gettext/return (long) gettext/g' ./configure
./configure --libdir=%{_libdir} --prefix=%{prefix} --mandir=%{_mandir} \
            --sysconfdir=/etc --localstatedir=/var
make %{?jobs:-j%jobs}

%install
make install DESTDIR="$RPM_BUILD_ROOT"
[ -e "%{prefix}/share/limal/devtools/NO_MAKE_CHECK" ] || \
           LIMALDATADIR="$RPM_BUILD_ROOT/usr/share/limal"  \
# required for perl test cases
export LD_LIBRARY_PATH="$RPM_BUILD_ROOT/usr/lib/limal"
make check DESTDIR="$RPM_BUILD_ROOT"
%find_lang %name 

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%clean
rm -rf "$RPM_BUILD_ROOT"

%files -f %name.lang
%defattr(-,root,root)
%dir %{_libdir}/limal
%{_libdir}/limal/lib*.so.*

%files devel
%defattr(-,root,root)
%dir %{_libdir}/limal
%{_libdir}/limal/lib*.so
%{_libdir}/limal/lib*.la
%dir %{_includedir}/limal
%{_includedir}/limal/*.h
%{_includedir}/limal/*.hpp
%{_libdir}/pkgconfig/limal.pc
%dir %{swiglibdir}
%{swiglibdir}/limal*.i
%{swiglibdir}/_blocxx_*.i
%{swiglibdir}/blocxx_*.i
%dir %{swiglibdir}/perl5
%{swiglibdir}/perl5/blocxx_*.i
%{swiglibdir}/perl5/_limal*.i
%doc %{_prefix}/share/doc/packages/limal

%files perl
%defattr(-,root,root)
%dir %{perl_vendorarch}/auto/LIMAL
%{perl_vendorarch}/auto/LIMAL/*
%dir %{perl_vendorarch}/LIMAL
%{perl_vendorarch}/LIMAL/*
%{perl_vendorarch}/*.pm

%changelog
openSUSE Build Service is sponsored by