File ipa.spec of Package ipa
#
# spec file for package ipa
#
# Copyright (c) 2015, Martin Hauke <mardnh@gmx.de>
#
# 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: ipa
Version: 0.5.2
Release: 0
Summary: IP Association Library
License: GPL-2.0
Group: Productivity/Networking/Diagnostic
Url: http://tools.netsa.cert.org/ipa
Source: http://tools.netsa.cert.org/releases/%{name}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: glib2-devel
BuildRequires: pkg-config
BuildRequires: python-devel
BuildRequires: python-netsa
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
IPA (IP Association) is a library for maintaining associations between IP
addresses and any number of labels which categorize those addresses.
IPA is an IP address annotation system. IPA provides a flexible and efficient
repository of IP address information, tools for querying and maintaining the
data, and shared libraries and modules for IPA data access by client
applications.
%package devel
Summary: Development files for the the ipa library
License: GPL-2.0
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
Static libraries and C header files for libipa.
%package -n python-ipa
Summary: Python interface to IPA
License: GPL-2.0
Group: Development/Languages/Python
Requires: %{name} = %{version}
%description -n python-ipa
Python interface to IP Association Library (IPA).
%prep
%setup -q
%build
%configure \
--with-bundled-libairdbc
make %{?_smp_mflags}
%install
%make_install
rm -f %{buildroot}/%{_libdir}/*.{la,a}
# Workaround for building and packaging the python module the correct way
rm -rf %{buildroot}/%{python_sitelib}/*
cd python
python setup.py build
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes %{buildroot}/%{python_sitelib}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README
%doc sql/
%{_bindir}/ipaexport
%{_bindir}/ipaimport
%{_bindir}/ipaquery
%{_mandir}/man1/ipa*
%{_libdir}/libairdbc.so.*
%{_libdir}/libipa.so.*
%files devel
%defattr(-,root,root)
%dir %{_includedir}/airdbc/
%{_includedir}/airdbc/*.h
%{_libdir}/libairdbc.so
%{_libdir}/pkgconfig/libairdbc.pc
%dir %{_includedir}/ipa/
%{_includedir}/ipa/*.h
%{_libdir}/libipa.so
%{_libdir}/pkgconfig/libipa.pc
%files -n python-ipa
%defattr(-,root,root)
%{python_sitelib}/*
%changelog