File magicrescue.spec of Package magicrescue

#
# spec file for package magicrescue
#
# 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 _libexecdir %{_prefix}/lib

Name:           magicrescue
Version:        1.1.9
Release:        0
License:        GPL-2.0+
Summary:        File Recovery Tool
Url:            http://www.itu.dk/~jobr/magicrescue/
Group:          System/Filesystems
Source0:        http://www.itu.dk/~jobr/magicrescue/release/magicrescue-1.1.9.tar.gz
Source1:        http://www.itu.dk/~jobr/magicrescue/trunk/recipes/flv
Source2:        http://www.itu.dk/~jobr/magicrescue/trunk/recipes/rar
Patch1:         magicrescue-bin.patch
Patch2:         magicrescue-fix_size_t_printf.patch
# The program requires third-party software to work with some file types.
Recommends:     binutils
Recommends:     dcraw
Recommends:     flac
Recommends:     gimp
Recommends:     libjpeg-turbo
Recommends:     mencoder
Recommends:     mpg123
Recommends:     rar
Recommends:     unzip
Recommends:     zip
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Magic Rescue scans a block device for file types it knows how to recover and
calls an external program to extract them. It looks at "magic bytes" in file
contents, so it can be used both as an undelete utility and for recovering a
corrupted drive or partition. As long as the file data is there, it will find
it.

%prep
%setup -q
%patch1
%patch2
cp %{SOURCE1} recipes
cp %{SOURCE2} recipes

%build
# not autoconf
./configure \
    --prefix="%{_prefix}" \
    CC="gcc" \
    CFLAGS="%{optflags}"

make %{?_smp_mflags}

%install
install -d "%{buildroot}%{_prefix}"
make PREFIX="%{buildroot}%{_prefix}" install

chmod 0644 "%{buildroot}%{_datadir}/magicrescue/tools/laola.pl"

%files
%defattr(-,root,root)
%doc ChangeLog COPYING NEWS README
%{_bindir}/dupemap
%{_bindir}/magicrescue
%{_bindir}/magicsort
%{_datadir}/magicrescue
%{_libexecdir}/magicrescue
%doc %{_mandir}/man1/dupemap.1%{ext_man}
%doc %{_mandir}/man1/magicrescue.1%{ext_man}
%doc %{_mandir}/man1/magicsort.1%{ext_man}

%changelog
openSUSE Build Service is sponsored by