File foremost.spec of Package foremost
#
# spec file for package foremost
#
# Copyright (c) 2011 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/
#
Name: foremost
Version: 1.5.7
Release: 0
License: OSI_COMPLIANT_FREE(Public domain)
Summary: Forensics Application to Recover Data
Url: http://foremost.sourceforge.net/
Group: Productivity/File utilities
Source0: http://foremost.sourceforge.net/pkg/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE foremost-1.5.6-config.patch lazy.kent.suse@gmail.com -- fix hardcoced path
Patch0: foremost-1.5.6-config.patch
# PATCH-FIX-OPENSUSE foremost-1.5.7-optflags.patch lazy.kent.suse@gmail.com -- add optimization flags
Patch1: foremost-1.5.7-optflags.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Foremost is a Linux program to recover files based on their headers and
footers. Foremost can work on image files, such as those generated by
dd, Safeback, Encase, etc, or directly on a drive. The headers and
footers are specified by a configuration file, so you can pick and
choose which headers you want to look for.
%prep
%setup -q
%patch0
%patch1
gzip -d %{name}.8.gz && mv -f %{name}.{8,1}
chmod -x %{name}.conf %{name}.1 CHANGES README
%build
export CFLAGS="%{optflags}"
%{__make} %{?_smp_mflags}
%install
install -Dpm 0755 %{name} %{buildroot}%{_bindir}/%{name}
install -Dpm 0644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
install -Dpm 0644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
%files
%defattr(-,root,root)
%doc CHANGES README
%{_bindir}/%{name}
%doc %{_mandir}/man1/*
%config(noreplace) %{_sysconfdir}/%{name}.conf
%changelog