# # spec file for package libzio # # Copyright (c) 2021 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/ # Name: libzio %define lname libzio1 Version: 1.08 Release: 1.1 Summary: A Library for Accessing Compressed Text Files License: GPL-2.0-or-later Group: System/Libraries URL: http://libzio.sourceforge.net/ Source: http://downloads.sourceforge.net/project/%{name}/%{name}/%{name}-%{version}.tar.bz2 Source1: baselibs.conf BuildRequires: libbz2-devel BuildRequires: libzstd-devel BuildRequires: xz-devel BuildRequires: zlib-devel BuildRequires: zstd BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Libzio provides a wrapper function for reading or writing gzip or bzip2 files with FILE streams. %package -n %lname Summary: A Library for Accessing Compressed Text Files Group: System/Libraries Provides: libzio = 1.06 Obsoletes: libzio <= 1.00 %description -n %lname Libzio provides a wrapper function for reading or writing gzip or bzip2 files with FILE streams. %package devel Summary: Libzio development files Group: Development/Libraries/C and C++ Requires: %lname = %{version} # bug437293 %description devel Libzio development files including zio.h, the manual page fzopen(3), and static library. %prep %setup -q %build %global _lto_cflags %{_lto_cflags} -ffat-lto-objects make %{?_smp_mflags} noweak %check make testt tests testx for comp in gzip bzip2 lzma xz zstd do case $comp in gzip) x=g ;; bzip2) x=b ;; lzma) x=l ;; xz) x=x ;; zstd) x=s ;; esac $comp -c < fzopen.3.in > fzopen.test ./testt fzopen.test | cmp fzopen.3.in - cat fzopen.test | ./tests $x | cmp fzopen.3.in - ./testx $x < fzopen.3.in | ./tests $x | cmp fzopen.3.in - done %install make DESTDIR=$RPM_BUILD_ROOT install libdir=%{_libdir} mandir=%{_mandir} %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig %files -n %lname %defattr(-,root,root) %license COPYING %{_libdir}/libzio.so.1 %{_libdir}/libzio.so.%{version} %files devel %defattr(-,root,root) %doc README %{_libdir}/libzio.a %{_libdir}/libzio.so %{_mandir}/man3/fzopen.3* %{_includedir}/zio.h %changelog * Wed Jun 9 2021 Dr. Werner Fink - Correct download URL * Wed Jun 9 2021 Dr. Werner Fink - Version 1.08: Fix bug triggered by short files * Tue Jun 8 2021 Dr. Werner Fink - Version 1.07: Add support for zstd at least for write and read * Fri Aug 2 2019 Martin Liška - Use FAT LTO objects in order to provide proper static library * Thu Feb 22 2018 fvogt@suse.com - Use %%license (boo#1082318) * Tue Jan 9 2018 werner@suse.de - Version 1.06: Add changes from Jerrell Watts which has kindly provided his changes for lzma/xz support with large I/O buffers * Thu Jun 29 2017 werner@suse.de - Push to version 1.05 * Avoid that writer of fopencookie(3) will return less than the initial buffer size. * Make sure that MIN macro is defined if used. * Some minor changes as well. * Tue Feb 28 2017 werner@suse.de - Push version to 1.04 * Add patch from Andreas Schwab to fix problem with missing declaration of pthread_sigmask(2) - Delete pthread-sigmask.patch as now upstream * Tue Feb 28 2017 schwab@linux-m68k.org - Add pthread-sigmask.patch to include as required by pthread_sigmask * Mon Feb 27 2017 werner@suse.de - Use -D_DEFAULT_SOURCE * Thu Feb 19 2015 p.drouand@gmail.com - Update to version 1.02 * Fixed version: handle fseek() correct for bzip2 and lzma/xz - Spec file cleanup - Remove libzio-1.00.dif; fixed on upstream release * Tue Apr 16 2013 mmeister@suse.com - Added url as source. Please see http://en.opensuse.org/SourceUrls * Tue Feb 26 2013 werner@suse.de - Add patch libzio-1.00.dif: fix seeking cookie functions (related to bnc#805149) that is handle fseek() correct for bzip2 and lzma/xz * Mon Jan 7 2013 jengelh@inai.de - Specify a BuildRoot, which is mandatory for old RPM (like SLE) * Fri Oct 19 2012 ro@suse.de - provide and obsolete old package name * Fri Oct 12 2012 jengelh@inai.de - Adjust baselibs.conf to include libzio1 * Fri Oct 5 2012 werner@suse.de - Strange policy causes new package libzio1 * Thu Oct 4 2012 werner@suse.de - Correct autoconf part of the manual page * Sun Jan 29 2012 jengelh@medozas.de - Remove redundant tags/sections per specfile guideline suggestions * Mon Jun 28 2010 jengelh@medozas.de - use %%_smp_mflags * Sun Dec 13 2009 jengelh@medozas.de - enable parallel building - add baselibs.conf as a source - add baselibs for SPARC * Wed Jun 17 2009 werner@suse.de - Use noweak version of libzio * Mon Feb 23 2009 werner@suse.de - Add fseek(3) support for bzip and LZW files * Mon Feb 23 2009 schwab@suse.de - Fix namespace violations. * Fri Feb 13 2009 werner@suse.de - Use liblzma from xz package if available - Detect if funopen(3) can be used if no fopencookie(3) found * Wed Jan 7 2009 olh@suse.de - obsolete old -XXbit packages (bnc#437293) * Tue Nov 11 2008 ro@suse.de - SLE-11 uses PPC64 instead of PPC, adapt baselibs.conf * Thu Oct 16 2008 werner@suse.de - Better documentation * Wed Sep 24 2008 werner@suse.de - Be able to detect -lzma suffix * Wed Sep 24 2008 werner@suse.de - Add support for lzma using liblzmadec * Mon Jul 21 2008 werner@suse.de - Make it build * Thu Jul 17 2008 werner@suse.de - Add some more comments what can be done with streams created by fzopen and fdzopen and what can not be done. * Mon Apr 21 2008 werner@suse.de - Make BZ2_bzdopen() and gzdopen() weak symbols * Thu Apr 10 2008 ro@suse.de - added baselibs.conf file to build xxbit packages for multilib support * Wed Feb 13 2008 werner@suse.de - Export only fzopen() and fdzopen() * Fri Dec 7 2007 werner@suse.de - Add support for streams on file descriptors * Mon Mar 26 2007 rguenther@suse.de - Split off libzio-devel. * Sat Mar 24 2007 aj@suse.de - Add libbz2-devel to BuildRequirs. * Wed Dec 20 2006 werner@suse.de - Better weak symbol handling even for -ansi -pedantic * Fri Dec 15 2006 werner@suse.de - Can not use sigmask() macro in ia64 because its definition is for sigset_t array only but not for single ulong * Tue Dec 12 2006 werner@suse.de - Add support for the old LZW (.Z) format * Wed Jun 21 2006 werner@suse.de - Remove self provide * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Wed Apr 21 2004 werner@suse.de - Add missed _libdir usage * Wed Apr 21 2004 werner@suse.de - Provide shared lib for linkage * Wed Apr 21 2004 werner@suse.de - Add magic detection of standard unix compress * Tue Apr 20 2004 werner@suse.de - Initial version 0.1 of libzio, the wrapper library to zlib/libbz2