File dupfinder.spec of Package dupfinder

# vim: set ts=4 sw=4 et:
# Copyright (c) 2008 oc2pus, 2011 pascal.bleser@opensuse.org
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.

Name:           dupfinder
Version:        0.8.0
Release:        0
Summary:        Command-Line Tool to Search for Duplicate Files
License:        GNU General Public License version 2 or later (GPLv2+)
Group:          Productivity/File utilities
URL:            http://doubles.sourceforge.net
Source:         http://prdownloads.sourceforge.net/doubles/dupfinder-%{version}-source_only.tar.bz2
Source1:        dupfinder.desktop
Patch1:         dupfinder-64bit.patch
Patch2:         dupfinder-optflags.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:  gcc-c++
BuildRequires:  gtk2-devel
%if 0%{?suse_version} > 0
BuildRequires:  update-desktop-files
%endif
%if 0%{?suse_version} >= 1140
BuildRequires:  wxWidgets-devel
%else
BuildRequires:  wxGTK-devel
%endif

%description
DupFinder searches for duplicate files. It has many options that
allow you to include only the files that you want. A special
algorithm makes it much faster than other programs. A GUI and
a command line version are available.

%prep
%setup -q -n "%{name}-0.8"
%patch1 -p1
%patch2

%if 0%{?suse_version} <= 1020
%__sed -i -e 's|wx-config|wx-config-2.8|g' makefile.unix
%endif

# don't strip
%__sed -i -e 's|strip|# strip|g' makefile.unix

%__install -dm 755 unixu_shared
pushd unixu_shared
    %__ln_s ../*.h .
popd

%build
%__make -f makefile.unix \
    debug=0 \
    shared=1 \
    unicode=1 \
    OPTFLAGS="%{optflags}"

%install
%__install -dm 755 "%{buildroot}%{_bindir}"
%__install -m 755 unixu_shared/dupf "%{buildroot}%{_bindir}/"
%__install -m 755 unixu_shared/dupfgui "%{buildroot}%{_bindir}/"

%__install -D -m0644 "%{SOURCE1}" "%{buildroot}%{_datadir}/applications/%{name}.desktop"
%if 0%{?suse_version}
%suse_update_desktop_file -r "%{name}" System FileManager
%endif

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%files
%defattr(-, root, root)
%doc LICENSE.TXT readme.txt
%{_bindir}/dupf
%{_bindir}/dupfgui
%{_datadir}/applications/%{name}.desktop

%changelog
openSUSE Build Service is sponsored by