File libdmtx.spec of Package libdmtx

#
# spec file for package libdmtx
#
# Copyright (c) 2015 SUSE LINUX 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:           libdmtx
Version:        0.7.7_8fce47b
Release:        0
Summary:        Software for reading and writing Data Matrix barcodes
License:        BSD-2-Clause
Group:          Development/Libraries/C and C++
Url:            https://github.com/dmtx/libdmtx
# https://github.com/dmtx/libdmtx/tarball/8fce47b7fda8749bcd6b907e8026592161d7d47a
Source:         dmtx-libdmtx-v0.7.7-2-g8fce47b.tar.gz
Source1:        baselibs.conf
Patch0:         libdmtx-0.7.4.diff
Patch1:         libdmtx-adjust-cmake-build.diff
Patch99:        nand_grading_support.patch
BuildRequires:  cmake
BuildRequires:  ImageMagick-devel
BuildRequires:  pkg-config
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
libdmtx is open source software for reading and writing Data Matrix barcodes.
At its core libdmtx is a native shared library, allowing C/C++ programs to use
its capabilities without extra restrictions or overhead.

%package -n libdmtx0
Summary:        Software for reading and writing Data Matrix barcodes
License:        GPL-2.0+ and LGPL-2.1+
Group:          System/Libraries

%description -n libdmtx0
libdmtx is open source software for reading and writing Data Matrix barcodes.
At its core libdmtx is a native shared library, allowing C/C++ programs to use
its capabilities without extra restrictions or overhead.

%package devel
Summary:        Software for reading and writing Data Matrix barcodes
License:        GPL-2.0+ and LGPL-2.1+
Group:          Development/Libraries/C and C++
Requires:       libdmtx0 = %{version}

%description devel
libdmtx is open source software for reading and writing Data Matrix barcodes.
At its core libdmtx is a native shared library, allowing C/C++ programs to use
its capabilities without extra restrictions or overhead.

%prep
%setup -q -n dmtx-libdmtx-8fce47b
%patch0 -p1
%patch1 -p1
%patch99 -p1

%build
%cmake
%cmake_build

%install
%cmake_install
install -m644 -D -t %{buildroot}%{_mandir}/man3 man/libdmtx.3
install -m644 -D -t %{buildroot}%{_libdir}/pkgconfig build/libdmtx.pc

%post -n libdmtx0 -p /sbin/ldconfig

%postun -n libdmtx0 -p /sbin/ldconfig

%check
%ctest

%files -n libdmtx0
%defattr(-,root,root,-)
%doc AUTHORS LICENSE ChangeLog KNOWNBUG README
%{_mandir}/man3/libdmtx.3.gz
%{_libdir}/libdmtx.so.*

%files devel
%defattr(-,root,root,-)
%{_includedir}/dmtx.h
%{_libdir}/libdmtx.so
%{_libdir}/pkgconfig/libdmtx.pc

%changelog
openSUSE Build Service is sponsored by