File diffimg.spec of Package diffimg

Name: diffimg
Summary: Simple image comparison tool
Version: 2.2.0
Release: 0
Group: Applications/Multimedia
License: GPLv2
URL: http://sourceforge.net/projects/diffimg/
Source0: http://sourceforge.net/projects/diffimg/files/%{version}/Diffimg-%{version}-src.zip
BuildRequires: unzip
BuildRequires: dos2unix
BuildRequires: libqt4-devel
BuildRequires: qwt-devel
BuildRequires: opencv-devel

%description
DiffImg is a simple image comparison tool which take two images with the same
size as input. Some statitics are computed and the positions where pixel differ
are displayed as a color mask.

%prep
%setup -q -n Diffimg-%{version}-src
dos2unix tounix.sh
sh ./tounix.sh

%build
cd build
qmake-qt4 -recursive INSTALL_PREFIX=$RPM_BUILD_ROOT/usr %{name}.pro
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf $RPM_BUILD_ROOT
cd build
make install
# remove doc
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}
sed -i 's|%{buildroot}||' %{buildroot}%{_datadir}/applications/%{name}.desktop

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%files
%doc *.txt
%{_bindir}/*
%{_datadir}/pixmaps/*
%{_datadir}/applications/*
%{_mandir}/man*/*

%changelog
* Wed Apr 15 2015 Huaren Zhong <huaren.zhong@gmail.com> - 2.2.0
- Rebuild for Fedora