Browse Source

zlib-1.2.11-4

Tomohiro "Tomo-p" KATO 11 months ago
parent
commit
935a3c340e
1 changed files with 76 additions and 34 deletions
  1. 76 34
      z/zlib/zlib-vl.spec

+ 76 - 34
z/zlib/zlib-vl.spec

@@ -3,20 +3,43 @@ Summary: The zlib compression and decompression library.
 Summary(ja): zlib 圧縮/展開ライブラリ
 Name: zlib
 Version: 1.2.11
-Release: 3%{?_dist_release}
-Group: System Environment/Libraries
-Source: http://www.zlib.net/zlib-%{version}.tar.xz
-# Patch0: zlib-1.2.5-lfs-decls.patch
-
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
+Release: 4%{?_dist_release}
+Group: system
+Vendor: Project Vine
+Distribution: Vine Linux
 
-URL: http://www.zlib.net/
 License: zlib and Boost
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
+URL: https://www.zlib.net/
+Source: https://www.zlib.net/zlib-%{version}.tar.xz
+
+# https://github.com/madler/zlib/pull/210
+Patch0: zlib-1.2.5-minizip-fixuncrypt.patch
+# resolves: #805113
+#Patch1: zlib-1.2.11-optimized-s390.patch
+# IBM Z optimalizations
+Patch7: zlib-1.2.11-IBM-Z-hw-accelrated-deflate-s390x.patch
+# IBM CRC32 optimalization for POWER archs
+Patch8: zlib-1.2.11-optimized-CRC32-framework.patch
+# fixed firefox crash + added test case
+Patch9: zlib-1.2.11-firefox-crash-fix.patch
+# fixed covscan issues
+Patch10: zlib-1.2.11-covscan-issues.patch
+# fix for IBM Z optimalizations
+Patch11: zlib-1.2.11-IBM-Z-hw-accelrated-deflate-fix.patch
+# permit a deflateParams() parameter change
+Patch12: zlib-1.2.11-permit-deflateParams-change.patch
+# fixed DFLTCC compression level switching issues
+# enabled HW compression for compression levels 1 through 6
+Patch13: zlib-1.2.11-IBM-DFLTCC-compression-level-switching-issues.patch
+# fixed inflateSyncPoint() bad return value on z15
+Patch14: zlib-1.2.11-inflateSyncPoint-return-value-fix.patch
+# fixed issues found by covscan for rhel-9
+# ref: https://github.com/madler/zlib/pull/554
+Patch15: zlib-1.2.11-covscan-issues-rhel9.patch
+# Fix for s390x vectorize CRC32
+Patch16: zlib-1.2.11-s390x-vectorize-crc32.patch
 
-Vendor: Project Vine
-Distribution: Vine Linux
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
 
 %global __provides_exclude_from ^%{_libdir}/pkgconfig/.*$
 
@@ -36,10 +59,11 @@ zlib圧縮ライブラリーは、メモリ内で圧縮と解凍を行う関数
 縮方法も追加する予定です。zlibライブラリーは多種のプログラムで使
 用されています。
 
+
 %package devel
 Summary: Header files and libraries for developing apps which will use zlib.
 Summary(ja): zlib を使ったプログラム開発に必要なヘッダファイル/ライブラリ
-Group: Development/Libraries
+Group: programming
 Requires: %{name} = %{version}-%{release}
 Provides: pkgconfig(zlib) = %{version}
 
@@ -48,23 +72,23 @@ The zlib-devel package contains the header files and libraries needed
 to develop programs that use the zlib compression and decompression
 library.
 
+
 %package static
 Summary: Static libraries for  %{name}
 Summary(ja): %{name} のスタティックライブラリ
-Group: Development/Libraries
+Group: programming
 Requires: %{name}-devel = %{version}-%{release}
 
 %description static
 The zlib-static package contains the static library for %{name}
 
+
 ## to build compat32 for x86_64 architecture support
 %package -n compat32-%{name}
 Summary: The zlib compression and decompression library.
 Summary(ja): zlib 圧縮/展開ライブラリ
-Group: System Environment/Libraries
+Group: system,legacy
 Requires: %{name} = %{version}-%{release}
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
 
 %description -n compat32-%{name}
 The zlib compression library provides in-memory compression and
@@ -82,10 +106,11 @@ zlib圧縮ライブラリーは、メモリ内で圧縮と解凍を行う関数
 縮方法も追加する予定です。zlibライブラリーは多種のプログラムで使
 用されています。
 
+
 %package -n compat32-%{name}-devel
 Summary: Header files and libraries for developing apps which will use zlib.
 Summary(ja): zlib を使ったプログラム開発に必要なヘッダファイル/ライブラリ
-Group: Development/Libraries
+Group: programming,legacy
 Requires: %{name} = %{version}-%{release}
 Requires: %{name}-devel = %{version}-%{release}
 
@@ -98,22 +123,45 @@ Install the zlib-devel package if you want to develop applications that
 will use the zlib library.
 
 
+%debug_package
+
+
 %prep
 %setup -q
-# %patch0 -p1
+%autopatch -p1
+
 
 %build
 mkdir static shared
 
+export CFLAGS="$RPM_OPT_FLAGS -fPIC"
+export LDFLAGS="$LDFLAGS -Wl,-z,relro -Wl,-z,now"
+
 # build shared lib
 CFLAGS="$RPM_OPT_FLAGS -fPIC" ./configure --shared --prefix=%{_prefix}
 
+./configure \
+	--prefix=%{_prefix} \
+	--libdir=%{_libdir} \
+	--includedir=%{_includedir} \
+	--shared
+
 make %{?_smp_mflags}
+%ifarch x86_64
+make test
+%endif
 mv -f Makefile zconf.h *.o *.so* shared/
 
 # build static lib
-CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix}
+./configure \
+	--prefix=%{_prefix} \
+	--libdir=%{_libdir} \
+	--includedir=%{_includedir}
+
 make %{?_smp_mflags}
+%ifarch x86_64
+make test
+%endif
 mv -f Makefile zconf.h *.o *.a static/
 
 
@@ -122,34 +170,22 @@ rm -rf ${RPM_BUILD_ROOT}
 mkdir -p ${RPM_BUILD_ROOT}%{_prefix}
 
 mv -f shared/* .
-make install prefix=${RPM_BUILD_ROOT}%{_prefix}
+%make_install
 
 mv -f Makefile zconf.h *.o *.so* shared/
 mv -f static/* .
-make install prefix=${RPM_BUILD_ROOT}%{_prefix}
+%make_install
 
 install -m644 zutil.h ${RPM_BUILD_ROOT}%{_includedir}/zutil.h
 mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man3
 install -m644 zlib.3 ${RPM_BUILD_ROOT}%{_mandir}/man3
 
-if [ "%{_prefix}/lib" != "%{_libdir}" ]; then
-    mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
-    mv ${RPM_BUILD_ROOT}%{_prefix}/lib/* ${RPM_BUILD_ROOT}%{_libdir}
-    rmdir ${RPM_BUILD_ROOT}%{_prefix}/lib
-fi
-
 cat %{buildroot}/usr/include/zlib.h | sed -n '1,/*\//p' > LICENSE
 
+
 %clean
 rm -rf ${RPM_BUILD_ROOT}
 
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
-
-%post -n compat32-%{name} -p /sbin/ldconfig
-
-%postun -n compat32-%{name} -p /sbin/ldconfig
 
 %files
 %defattr(-,root,root)
@@ -180,7 +216,13 @@ rm -rf ${RPM_BUILD_ROOT}
 %{_libdir}/pkgconfig/zlib.pc
 %endif
 
+
 %changelog
+* Tue Aug 17 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.2.11-4
+- rebuilt with current environment.
+- dropped ldconfig scriptlets.
+- imported all patches from rawhide.
+
 * Sun Mar 29 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.2.11-3
 - fixed "Provides:".