File afflib.spec of Package afflib

#
# spec file for package afflib
#
# 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/
#


Summary:        Library and tools for working with the Advanced Forensics Format
License:        BSD-4-Clause
Group:          System/Libraries

Name:           afflib
Version:        3.7.18
Release:        0
Url:            http://afflib.org/
# Source:         %{name}-%{version}.tar.gz
Source:         https://github.com/sshock/AFFLIBv3/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  fuse-devel
BuildRequires:  gcc-c++
BuildRequires:  gettext-tools
BuildRequires:  libcurl-devel
BuildRequires:  libexpat-devel
BuildRequires:  libopenssl-devel
BuildRequires:  libtool
BuildRequires:  ncurses-devel
BuildRequires:  python-rpm-macros
BuildRequires:  python3-devel
BuildRequires:  python3-Cython
BuildRequires:  readline-devel
BuildRequires:  zlib-devel

%description
The Advanced Forensics Format (AFF) is an openly specified, extensible
file format for storing and analyzing hard disk images and other types
of digital evidence.

%package -n libafflib0
Summary:        Library for working with the Advanced Forensics Format-Runtime support
Group:          System/Libraries

%description -n libafflib0
The Advanced Forensics Format (AFF) is an openly specified, extensible
file format for storing and analyzing hard disk images and other types
of digital evidence.

This package contains the shared libraries necessary for software that
needs to work with the AFF library.

%package -n afflib-devel
Summary:        Library for working with the Advanced Forensics Format - Build support
Group:          Development/Libraries/C and C++
Requires:       fuse-devel
Requires:       gcc-c++
Requires:       libafflib0 = %{version}-%{release}
Requires:       libcurl-devel
Requires:       libexpat-devel
Requires:       libopenssl-devel
Requires:       ncurses-devel
Requires:       python3-devel
Requires:       readline-devel
Requires:       zlib-devel
BuildRequires:  pkg-config

%description -n afflib-devel
The Advanced Forensics Format (AFF) is an openly specified, extensible
file format for storing and analyzing hard disk images and other types
of digital evidence.

This package contains the files that are necessary to develop software
that makes use of afflib.

%package -n afflib-devel-static
Summary:        Static Library for working with the Advanced Forensics Format
Group:          Development/Libraries/C and C++
Requires:       afflib-devel = %{version}
BuildRequires:  pkg-config

%description -n afflib-devel-static
The Advanced Forensics Format (AFF) is an openly specified, extensible
file format for storing and analyzing hard disk images and other types
of digital evidence.

This package contains the static libraries if required to build and develop software. This package requires afflib-devel to provide header files etc.

%package -n afftools
Summary:        Tools for working with the Advanced Forensics Format
Group:          Development/Libraries/C and C++
Requires:       libafflib0 = %{version}-%{release}

%description -n afftools
The Advanced Forensics Format (AFF) is an openly specified, extensible
file format for storing and analyzing hard disk images and other types
of digital evidence.

This package contains tools that enable working with AFF files.

%package -n python3-pyaff
Summary:        Library for working with the Advanced Forensics Format - Python support
Group:          Development/Libraries/Python
Requires:       libafflib0 = %{version}-%{release}

%description -n python3-pyaff
The Advanced Forensics Format (AFF) is an openly specified, extensible
file format for storing and analyzing hard disk images and other types
of digital evidence.

This package contains language bindings to work with afflib from Python.

%prep
%setup -q -n AFFLIBv3-%{version}
./bootstrap.sh
rm $(grep -rl '/\* Generated by Cython')

%build
%configure --enable-s3 --enable-fuse --disable-python
%{__make} %{?_smp_mflags}
cd pyaff
%python3_build build_ext --include-dirs $PWD/../include --library-dirs $PWD/../lib/.libs

%install
%make_install
rm %{buildroot}%{_libdir}/*.la

cd pyaff
%python3_install

%post -n libafflib0 -p /sbin/ldconfig

%postun -n libafflib0 -p /sbin/ldconfig

%files -n libafflib0
%defattr(-,root,root,-)
%doc AUTHORS BUGLIST.txt COPYING NEWS README README_Linux.txt
%{_libdir}/libafflib.so.*

%files -n afflib-devel
%defattr(-,root,root,-)
%{_includedir}/afflib
%{_libdir}/libafflib.so
%{_libdir}/pkgconfig/afflib.pc

%files -n afflib-devel-static
%attr(-,root,root) %{_libdir}/libafflib.a

%files -n afftools
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/aff*
%doc %{_mandir}/man1/*

%files -n python3-pyaff
%doc pyaff/README
%{python3_sitearch}/PyAFF*
%{python3_sitearch}/pyaff*

%changelog
openSUSE Build Service is sponsored by