libewf/libewf.spec
Stephan Kulow e433315f4e Accepting request 133169 from security
Upgrade to latest release
Remove Requires libewf from ewftools subpackage as requested by Coolo.
Workaround BNC 778993 license issue by using GPL-3.0+ for now (forwarded request 133168 from gregfreemyer)

OBS-URL: https://build.opensuse.org/request/show/133169
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libewf?expand=0&rev=3
2012-09-11 09:25:02 +00:00

136 lines
4.3 KiB
RPMSpec

#
# spec file for package libewf
#
# 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/
#
#
%define soname 2
Name: libewf
Version: 0.0.0+20120813
Release: 0
# Per website the code is LGPL-3.0+, but GPL code is present.
# Upstream has been asked to resolve
# License: LGPL-3.0+
Summary: Library for the Expert Witness Compression Format (EWF)
License: GPL-3.0+
Group: System/Libraries
Url: http://sourceforge.net/projects/libewf/
Source0: http://sourceforge.net/projects/libewf/files/libewf2/libewf-20120813/libewf-20120813.tar.gz
Source1: http://sourceforge.net/projects/libewf/files/mount_ewf/mount_ewf-20090113/mount_ewf-20090113.py
# PATCH-FIX-OPENSUSE remove_date_time_macros.patch Greg.Freemyer@gmail.com -- rpmlint complains about the macros
Patch0: remove_date_time_macros.patch
BuildRequires: e2fsprogs-devel
# Needed for language translation support
BuildRequires: gettext
BuildRequires: libuuid-devel
BuildRequires: openssl-devel
BuildRequires: pkg-config
#Needed for mount.ewf(.py) support
BuildRequires: python-devel
BuildRequires: zlib-devel
Requires: zlib
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%py_requires
%description
Libewf is a library for support of the Expert Witness Compression Format (EWF),
it support both the SMART format (EWF-S01) and the EnCase format (EWF-E01).
Libewf allows you to read and write media information within the EWF files.
%package -n libewf%{soname}
Summary: Library to support the Expert Witness Compression Format
Group: System/Libraries
%description -n libewf%{soname}
libewf is a library for support of the Expert Witness Compression Format (EWF).
libewf allows you to read media information of EWF files in the SMART (EWF-S01)
format and the EnCase (EWF-E01) format. libewf allows to read files created by
EnCase 1 to 6, linen and FTK Imager.
%package -n ewftools
Summary: Utilities for the Expert Witness Compression Format (EWF)
Group: System/Filesystems
Requires: python-fuse >= 0.2
%description -n ewftools
Several tools for reading and writing EWF files.
It contains tools to acquire, verify and export EWF files.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: %{name}%{soname} = %{version}
Requires: pkg-config
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q -n libewf-20120813
%patch0 -p1
%build
export CFLAGS="%{optflags} -fno-strict-aliasing "
export CXXFLAGS="%{optflags}"
%configure --disable-static \
--enable-wide-character-type \
--enable-python
#Remove rpath from libtool
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
# clean unused-direct-shlib-dependencies
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
make %{?_smp_mflags}
%install
# maintain SLES compatibility
make install DESTDIR="%buildroot"
find %{buildroot} -name '*.la' -exec rm -f {} ';'
install -D -pm 0755 %{SOURCE1} %{buildroot}/sbin/mount.ewf
ln -s mount.ewf %{buildroot}/sbin/umount.ewf
%post -n libewf%{soname} -p /sbin/ldconfig
%postun -n libewf%{soname} -p /sbin/ldconfig
%files -n libewf%{soname}
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS ChangeLog ABOUT-NLS
%{_libdir}/*.so.*
%files -n ewftools
%defattr(-,root,root,-)
%{_bindir}/ewf*
%{_mandir}/man1/*.gz
/sbin/*.ewf
%{python_sitearch}/pyewf.so
%files devel
%defattr(-,root,root,-)
%{_includedir}/libewf.h
%{_includedir}/libewf/
%{_libdir}/*.so
%{_libdir}/pkgconfig/libewf.pc
%{_mandir}/man3/*.gz
%changelog