%define major 17 %define libname %mklibname %{name} %{major} %define develname %mklibname -d %{name} %define snapshot 1 %if %{?snapshot} %define date 20170730 %define snaprel 1 %endif Summary: Command-line tools and library for transforming PDF files Name: qpdf Version: 6.0.0 Release: %mkrel 2%{?date:.%{date}.%{snaprel}} License: Artistic 2.0 Group: System/Printing URL: http://qpdf.sourceforge.net/ %if 0%{?date} Source0: %{name}-%{version}+%{date}.tar.xz %else Source0: http://downloads.sourceforge.net/sourceforge/qpdf/qpdf-%{version}.tar.gz %endif BuildRequires: zlib-devel BuildRequires: pcre-devel # for fix-qdf and test suite BuildRequires: perl BuildRequires: perl(Digest::MD5) # for autoreconf BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool %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 includes support for merging and splitting PDFs and to manipulate the list of pages in a PDF file. It is not a PDF viewer or a program capable of converting PDF into other formats. %package -n %{libname} Summary: QPDF library for transforming PDF files Group: System/Libraries %description -n %{libname} QPDF is a C++ library that inspect and manipulate the structure of PDF files. It can encrypt and linearize files, expose the internals of a PDF file, and do many other operations useful to PDF developers. %package -n %{develname} Summary: Development files for QPDF library Group: Development/C Requires: %{libname} = %{version}-%{release} %description -n %{develname} Header files and libraries necessary for developing programs using the QPDF library. %package doc Summary: QPDF Manual Group: Documentation BuildArch: noarch %description doc QPDF Manual %prep %if 0%{?date} %autosetup -n %{name}-%{version}+%{date} %else %autosetup %endif %build # work-around check-rpaths errors autoreconf --verbose --force --install %configure2_5x --disable-static \ --enable-show-failed-test-output %make_build %install %make_install # https://fedoraproject.org/wiki/Packaging_tricks#With_.25doc mkdir __doc mv %{buildroot}%{_datadir}/doc/qpdf/* __doc rm -rf %{buildroot}%{_datadir}/doc/qpdf rm -f %{buildroot}%{_libdir}/libqpdf.la %check %make check %files %{_bindir}/fix-qdf %{_bindir}/qpdf %{_bindir}/zlib-flate %{_mandir}/man1/* %files -n %{libname} %doc README TODO ChangeLog Artistic-2.0 %{_libdir}/libqpdf*.so.%{major} %{_libdir}/libqpdf*.so.%{major}.* %files -n %{develname} %doc examples/*.cc examples/*.c %{_includedir}/* %{_libdir}/libqpdf*.so %{_libdir}/pkgconfig/libqpdf.pc %files doc %doc __doc/* %changelog * Sun Jul 30 2017 akien <akien> 6.0.0-2.20170730.1.mga6 + Revision: 1132863 - Git snapshot with security fixes (including CVE-2017-920[89] and CVE-2017-9210, mga#20915) * Fri Feb 12 2016 umeabot <umeabot> 6.0.0-2.mga6 + Revision: 958702 - Mageia 6 Mass Rebuild * Mon Jan 18 2016 luigiwalser <luigiwalser> 6.0.0-1.mga6 + Revision: 925483 - 6.0.0 - library major is now 17 * Sat Aug 29 2015 tv <tv> 5.1.3-3.mga6 + Revision: 870774 - rebuild with gcc5 * Sat Aug 29 2015 cjw <cjw> 5.1.3-2.mga6 + Revision: 870770 - rebuild with gcc 5 * Tue Jun 23 2015 tv <tv> 5.1.3-1.mga6 + Revision: 840264 - new release * Wed Oct 15 2014 umeabot <umeabot> 5.1.2-3.mga5 + Revision: 741562 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 5.1.2-2.mga5 + Revision: 688503 - Mageia 5 Mass Rebuild * Sat Aug 16 2014 tv <tv> 5.1.2-1.mga5 + Revision: 664113 - new release * Mon Mar 24 2014 tv <tv> 5.1.1-4.mga5 + Revision: 608192 - drop temporary cauldron upgrade fix * Thu Mar 13 2014 tv <tv> 5.1.1-3.mga5 + Revision: 603256 - temporary upgrade fix - fix broken libification * Thu Mar 13 2014 neoclust <neoclust> 5.1.1-2.mga5 + Revision: 603251 - Fix major name * Thu Mar 13 2014 dams <dams> 5.1.1-1.mga5 + Revision: 603229 - new version 5.1.1 * Sat Oct 19 2013 umeabot <umeabot> 4.0.1-2.mga4 + Revision: 524051 - Mageia 4 Mass Rebuild * Wed May 29 2013 tv <tv> 4.0.1-1.mga4 + Revision: 429875 - imported package qpdf