Name: qpdf
Version: 12.3.2
Release: 1
Summary: A command-line program to transform PDF files
License: Apache-2.0 OR Artistic-2.0
URL: https://qpdf.sourceforge.io/
Source0: https://github.com/qpdf/qpdf/releases/download/v%{version}/qpdf-%{version}.tar.gz
BuildRequires: gcc gcc-c++
BuildRequires: cmake >= 3.16
BuildRequires: pkgconfig(gnutls)
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(zlib)
BuildRequires: perl(Digest::MD5)
Provides: %{name}-libs = %{version}-%{release}
Obsoletes: %{name}-libs < %{version}-%{release}
%description
QPDF is a command-line program that does structural, content-preserving transformations
on PDF files. It could have been called something like pdf-to-pdf. It also provides many
useful capabilities to developers of PDF-producing software or for people who just want
to look at the innards of a PDF file to learn more about how they work.
%package devel
Summary: Development package for %{name}
Requires: %{name} = %{version}-%{release}
%description devel
This package contains some header and library files for the development of %{name}.
%package help
Summary: Help package for %{name}
BuildArch: noarch
Provides: %{name}-doc = %{version}-%{release}
Obsoletes: %{name}-doc < %{version}-%{release}
%description help
This package contains some man help and other files for %{name}.
%prep
%autosetup -n %{name}-%{version} -p1
%build
%cmake \
-DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG \
-DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG \
-DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_INSTALL_DO_STRIP:BOOL=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_STATIC_LIBS=0 \
-DREQUIRE_CRYPTO_GNUTLS=1 \
-DUSE_IMPLICIT_CRYPTO=0 \
-DSHOW_FAILED_TEST_OUTPUT=1 \
-DINSTALL_EXAMPLES=OFF
%cmake_build
%install
%cmake_install
rm -f %{buildroot}%{_datadir}/doc/qpdf/*.txt
# install bash/zsh completions
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
mkdir -p %{buildroot}%{_datadir}/zsh/site-functions
install -m 0644 completions/bash/qpdf %{buildroot}%{_datadir}/bash-completion/completions/qpdf
install -m 0644 completions/zsh/_qpdf %{buildroot}%{_datadir}/zsh/site-functions/_qpdf
%files
%doc README.md TODO.md ChangeLog
%license Artistic-2.0 LICENSE.txt NOTICE.md
%{_bindir}/*
%{_datadir}/bash-completion/completions/qpdf
%{_datadir}/zsh/site-functions/_qpdf
%{_libdir}/libqpdf.so.*
%files devel
%doc examples/*.cc examples/*.c
%{_includedir}/qpdf/
%{_libdir}/libqpdf.so
%{_libdir}/pkgconfig/libqpdf.pc
%{_libdir}/cmake/qpdf
%files help
%{_mandir}/man1/*
%changelog
* Sun Jan 25 2026 Funda Wang <fundawang@yeah.net> - 12.3.2-1
- update to 12.3.2
* Tue Jan 20 2026 Funda Wang <fundawang@yeah.net> - 12.3.1-1
- update to 12.3.1
* Wed Jan 14 2026 Funda Wang <fundawang@yeah.net> - 12.3.0-1
- update to 12.3.0
* Tue May 06 2025 Funda Wang <fundawang@yeah.net> - 12.2.0-1
- update to 12.2.0
* Sat Mar 29 2025 Funda Wang <fundawang@yeah.net> - 12.0.0-1
- update to 12.0.0
* Fri Feb 28 2025 Funda Wang <fundawang@yeah.net> - 11.10.1-1
- update to 11.10.1
* Fri May 10 2024 lixiaoyong <lixiaoyong@kylinos.cn> - 11.1.0-3
- Tune QUtil::hex_encode
* Mon Mar 06 2023 wangkai <wangkai385@h-partners.com> - 11.1.0-2
- Add BIND_NOW,PIE,SP secure compilation options
* Wed Oct 12 2022 humengfei <humengfei@tju.edu.cn> - 11.1.0-1
- update
* Sun Dec 15 2019 caodongxia <caodongxia@huawei.com> - 8.4.2-3
- fix rpmbuild missing patches due to different arch
* Mon Dec 16 2019 catastrowings <jianghuhao1994@163.com> - 8.4.2-2
- fix build fail
* Wed Dec 11 2019 catastrowings <jianghuhao1994@163.com> - 8.2.1-2
- openEuler init