A new user interface for you! Read more...

File libpuzzle1.spec of Package libpuzzle1

#
# spec file for package libpuzzle1
#
# Copyright (c) 2018 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2009 Frank DENIS, libpuzzle@pureftpd.org.
#
# 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:           libpuzzle1
Version:        0.12
Release:        0
License:        BSD-2-Clause
Summary:        The Puzzle library is designed to quickly find visually similar images
Vendor:         Frank DENIS/kkirby
#Url:            https://www.pureftpd.org/project/libpuzzle
Url:            https://github.com/jedisct1/libpuzzle
Group:          System/Libraries
#Source:         https://download.pureftpd.org/pub/pure-ftpd/misc/libpuzzle/releases/libpuzzle-0.11.tar.gz
Source:         libpuzzle-0.12.tar.gz
BuildRequires:  gd-devel
BuildRequires:  libtool
BuildRequires:  gcc-c++
Requires:       gd
Obsoletes:      %{name} < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The Puzzle library is designed to quickly find visually similar images (gif,
png, jpg), even if they have been resized, recompressed, recolored or slightly
modified.

The library is free, lightweight yet very fast, configurable, easy to use and
it has been designed with security in mind. This is a C library, but is also
comes with a command-line tool.

%package devel
License:        BSD-2-Clause
Summary:        A library library to quickly find visually similar images
Group:          Development/Libraries/C and C++
Requires:       gd-devel
Requires:       %{name} = %{version}

%description devel
The Puzzle library is designed to quickly find visually similar images (gif,
png, jpg), even if they have been resized, recompressed, recolored or slightly
modified.

The library is free, lightweight yet very fast, configurable, easy to use and
it has been designed with security in mind. This is a C library, but is also
comes with a command-line tool.

%prep
%setup -q -c -T
# cant use just setup -q here because the tar file contains 
# libpuzzle-<version> dir instead of needed libpuzzle1-<version>
tar --strip-components=1 -xvzf %{_sourcedir}/libpuzzle-%{version}.tar.gz

%build
./autogen.sh
%{configure}
make %{?_smp_mflags}

%install
%{makeinstall}
rm -f %{buildroot}%{_libdir}/libpuzzle.a
rm -f %{buildroot}%{_libdir}/libpuzzle.la

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_mandir}/man3/libpuzzle.3.gz
%{_mandir}/man3/puzzle_set.3.gz
%{_libdir}/libpuzzle.so
%{_libdir}/libpuzzle.so.*
%{_mandir}/man8/puzzle-diff.8.gz
%{_bindir}/puzzle-diff

%files devel
%defattr(-,root,root)
%{_includedir}/puzzle.h
%doc AUTHORS COPYING README THANKS

%changelog