File libgourou.spec of Package libgourou
#
# spec file for package libgourou
#
# Copyright (c) 2023, Martin Hauke <mardnh@gmx.de>
#
# 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 https://bugs.opensuse.org/
#
%define sover 0_8_3
Name: libgourou
Version: 0.8.3
Release: 0
Summary: A free implementation of Adobe's ADEPT protocol
License: LGPL-3.0-or-later
Group: Development/Libraries/C and C++
URL: https://indefero.soutade.fr/p/libgourou/
#Git-Clone: git://soutade.fr/libgourou.git
Source: %{name}-%{version}.tar.xz
#uPDFParser (git://soutade.fr/updfparser.git) is licensed under LGPL-3.0-or-later
Source1: https://indefero.soutade.fr/p/updfparser/source/download/master#/updfparser-master.zip
BuildRequires: gcc-c++
BuildRequires: libopenssl-3-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libzip)
BuildRequires: pugixml-devel
BuildRequires: unzip
Provides: bundled(updfparser)
%description
A free implementation of Adobe's ADEPT protocol used to add DRM
on ePub/PDF files.
%package -n libgourou%{sover}
Summary: A free implementation of Adobe's ADEPT protocol
Group: System/Libraries
%description -n libgourou%{sover}
A free implementation of Adobe's ADEPT protocol used to add DRM
on ePub/PDF files.
%package devel
Summary: Development files for libgourou
License: LGPL-3.0-or-later
Group: Development/Libraries/C and C++
Requires: libgourou%{sover} = %{version}
%description devel
Development and header files for libgourou.
%package utils
Summary: ADEPT DRM utilities
License: BSD-2-Clause
Group: Productivity/Publishing/PDF
%description utils
example programs to deal with the Adobe ADEPT protocol:
* acsmdownloader
* adept_activate
* adept_loan_mgt
* ...
%prep
%autosetup -p1
mkdir lib
unzip %{SOURCE1} && mv updfparser-master/ lib/updfparser
%build
export CXXFLAGS="%{optflags}"
# updfparser
pushd lib/updfparser
%make_build BUILD_STATIC=1 BUILD_SHARED=0
popd
%make_build
%install
%make_install PREFIX=/usr/ BINDIR=bin LIBDIR=%{_lib}
make install_headers DESTDIR=%{buildroot} PREFIX=/usr
%post -n libgourou%{sover} -p /sbin/ldconfig
%postun -n libgourou%{sover} -p /sbin/ldconfig
%files -n libgourou%{sover}
%license LICENSE
%doc README.md
%{_libdir}/libgourou.so.0.8.3
%files utils
%license utils/LICENSE
%{_bindir}/acsmdownloader
%{_bindir}/adept_activate
%{_bindir}/adept_loan_mgt
%{_bindir}/adept_remove
%{_mandir}/man1/acsmdownloader.1%{?ext_man}
%{_mandir}/man1/adept_activate.1%{?ext_man}
%{_mandir}/man1/adept_loan_mgt.1%{?ext_man}
%{_mandir}/man1/adept_remove.1%{?ext_man}
%files devel
%{_includedir}/libgourou
%{_libdir}/libgourou.so
%changelog