# # spec file for package jbig2enc # # Copyright (c) 2024 SUSE LLC # # 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 _abi 0 %define _desc This is an encoder for JBIG2.\ \ JBIG2 encodes bi-level (1 bpp) images using a number of clever\ tricks to get better compression than G4. Encoder capabilities:\ \ * Generate JBIG2 files, or fragments for embedding in PDFs\ * Generic region encoding\ * Perform symbol extraction, classification and text region coding\ * Perform refinement coding\ * Compress multipage documents Name: jbig2enc Version: 0.30+2.g7188b05 Release: 1.6 Summary: JBIG2 Encoder License: Apache-2.0 URL: https://github.com/agl/jbig2enc Source0: %{name}-%{version}.tar.xz BuildRequires: autoconf BuildRequires: automake BuildRequires: c++_compiler BuildRequires: giflib-devel BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: pkgconfig(lept) >= 1.83.0 BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libtiff-4) BuildRequires: pkgconfig(libwebp) %description %{_desc} %package -n jbig2 Summary: JBIG2 Encoder Provides: %{name} = %{version} %description -n jbig2 %{_desc} This package conains the jbig2 command line program and the jbig2-pdf.py helper script. %package -n libjbig2enc%{_abi} Summary: JBIG2 Encoder - Shared Library %description -n libjbig2enc%{_abi} %{_desc} This package contains the shared library of the encoder. %package devel Summary: JBIG2 Encoder - Development Files Requires: libjbig2enc%{_abi} = %{version} Requires: pkgconfig(lept) Provides: libjbig2enc-devel = %{version} %description devel %{_desc} This package contains the development files. %prep %setup -q sed -i 's,^#!/usr/bin/env ,#!/usr/bin/,' jbig2topdf.py %build ./autogen.sh %configure --disable-static --disable-rpath %make_build %install %make_install rm -r %{buildroot}%{_datadir}/doc/jbig2enc* rm %{buildroot}%{_libdir}/libjbig2enc.la %post -n libjbig2enc%{_abi} -p /sbin/ldconfig %postun -n libjbig2enc%{_abi} -p /sbin/ldconfig %files -n jbig2 %license COPYING %doc AUTHORS NEWS README.md ChangeLog doc/PATENTS doc/jbig2enc.html %{_bindir}/jbig2 %{_bindir}/jbig2topdf.py %files -n libjbig2enc%{_abi} %{_libdir}/libjbig2enc.so.* %files devel %{_includedir}/jbig2*.h %{_libdir}/libjbig2enc.so %changelog * Wed Dec 25 2024 mia@0x0.st - Update to version 0.30+2.g7188b05: * add lobal BW threshold on 8 bpp images * improve thresholding * Make the weight parameter adjustable * neat symbolic threshold 0.92 * Fix Endian issue on ARM #63 * Suppress a chatty informational message unless requested * Add support for standalone .jb2 * convert to python3 (python2 is outdated and unsupported) and improve code * rename pdf.py to jbig2topdf.py * fixes issues #61, #84, #85, #88 `Error heap-use-after-free` * A switch to set dpi for images w/o dpi information. * Mon Jan 9 2023 mia@0x0.st - Init version 0.29+4.gea05019: * Fix autotools with leptonica >= 1.83 * Fix build with Leptonica >=1.83 * Reject odd input depths that pixThresholdToBinary doesn't support. * Rename README to README.md in Makefile.am * Convert README to Markdown. * Fix broken link to spec. * add option '--dissable-rpath'