]> git.pld-linux.org Git - packages/QATzip.git/commitdiff
- updated to 1.0.8 (last version building for all x86 ABIs) auto/th/QATzip-1.0.8-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 27 Aug 2022 09:42:32 +0000 (11:42 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 27 Aug 2022 09:42:32 +0000 (11:42 +0200)
- added flags patch (adjust build flags, allow POSIX sh)

QATzip-flags.patch [new file with mode: 0644]
QATzip.spec

diff --git a/QATzip-flags.patch b/QATzip-flags.patch
new file mode 100644 (file)
index 0000000..1a7defb
--- /dev/null
@@ -0,0 +1,46 @@
+--- QATzip-1.0.8/configure.ac.orig     2022-08-26 23:27:15.506327523 +0200
++++ QATzip-1.0.8/configure.ac  2022-08-27 08:20:19.899719857 +0200
+@@ -214,7 +214,7 @@ AS_IF([test "x${CFLAGS}" = "x"],
+                  -fno-delete-null-pointer-checks -fwrapv'
+     ],
+     [
+-        CFLAGS+=' -Wall -Werror -std=gnu99 -pedantic \
++        CFLAGS="$CFLAGS"' -Wall -Werror -std=gnu99 -pedantic \
+                   -fstack-protector -fPIE -fPIC -fno-strict-overflow \
+                   -fno-delete-null-pointer-checks -fwrapv'
+     ]
+@@ -225,10 +225,10 @@ AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING([ldflags])
+ AS_IF([test "x${LDFLAGS}" = "x"],
+     [
+-        LDFLAGS=' -fstack-protector -fPIC -pie -z relro -z now -Wl,-z,noexecstack'
++        LDFLAGS=' -fPIC -pie -z relro -z now -Wl,-z,noexecstack'
+     ],
+     [
+-        LDFLAGS+=' -fstack-protector -fPIC -pie -z relro -z now -Wl,-z,noexecstack'
++        LDFLAGS="$LDFLAGS -fPIC -pie -z relro -z now -Wl,-z,noexecstack"
+     ]
+ )
+ AC_MSG_RESULT([yes])
+@@ -238,11 +238,10 @@ AC_ARG_ENABLE(debug,
+     AS_HELP_STRING([--enable-debug], [Enable debug mode]),
+     [
+         debug=true
+-        CFLAGS+=' -g -DQATZIP_DEBUG -O0'
++        CFLAGS="$CFLAGS -DQATZIP_DEBUG"
+     ]      ,
+     [
+         debug=false
+-        CFLAGS+=' -O2 -D_FORTIFY_SOURCE=2'
+     ]
+ )
+ AM_CONDITIONAL([QATZIP_DEBUG_AC], [test x$debug = xtrue])
+@@ -252,7 +251,7 @@ AC_ARG_ENABLE(symbol,
+     AS_HELP_STRING([--enable-symbol], [Enable qatzip symbol]),
+     [
+         symbol=true
+-        CFLAGS+=' -g'
++        CFLAGS="$CFLAGS -g"
+     ],
+     [
+         symbol=false
index 91a5f9a5c24efb10cde5cb74c4516fb34a78eb1c..6b3f1d79c435297b9083f595e3439a8aeb742b9e 100644 (file)
@@ -1,17 +1,29 @@
+# NOTE: 1.0.9 requires qatlib 22.7.0, so is not available for 32-bit ABI
+#
+# Conditional build:
+%bcond_without static_libs     # static library
+
 Summary:       Intel QuickAssist Technology (QAT) QATzip library
 Summary(pl.UTF-8):     Biblioteka QATzip wykorzystująca Intel QuickAssist Technology (QAT)
 Name:          QATzip
-Version:       1.0.7
+Version:       1.0.8
 Release:       1
 License:       BSD
 Group:         Libraries
 #Source0Download: https://github.com/intel/QATzip/releases
 Source0:       https://github.com/intel/QATzip/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: d0c09f5f95c3468f5731b4a42b956b7e
+# Source0-md5: b6d4f2b002174e064a2c27718c2a5cf5
 Patch0:                %{name}-types.patch
+Patch1:                %{name}-flags.patch
 URL:           https://github.com/intel/QATzip
+BuildRequires: autoconf >= 2.69
+BuildRequires: automake >= 1:1.11
+BuildRequires: libtool >= 2:2.4
+BuildRequires: pkgconfig
 BuildRequires: qatlib-devel
-BuildRequires: zlib-devel
+BuildRequires: sed >= 4.0
+BuildRequires: zlib-devel >= 1.2.7
+Requires:      zlib >= 1.2.7
 # x86_64-specific hardware, allow userspace libs for all ABIs
 ExclusiveArch: %{ix86} %{x8664} x32
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -43,6 +55,8 @@ Summary:      Header files for QATzip library
 Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki QATzip
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
+Requires:      qatlib-devel
+Requires:      zlib-devel >= 1.2.7
 
 %description devel
 Header files for QATzip library.
@@ -50,20 +64,37 @@ Header files for QATzip library.
 %description devel -l pl.UTF-8
 Pliki nagłówkowe biblioteki QATzip.
 
+%package static
+Summary:       Static QATzip library
+Summary(pl.UTF-8):     Statyczna biblioteka QATzip
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static QATzip library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka QATzip.
+
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+
+# so that -I/usr/include/qat is not required when using QATzip
+%{__sed} -i -e 's,cpa_dc\.h,qat/cpa_dc.h,' include/qatzip.h
+
+%{__sed} -i -e 's,\$(find /usr -name cpa.h | xargs dirname),%{_includedir}/qat,' configure.ac
 
 %build
-# --build is just to omit -m$(getconf LONG_BIT)
-./configure \
-       CFLAGS="%{rpmcflags}" \
-       LDFLAGS="%{rpmldflags}" \
-       --prefix=%{_prefix} \
-       --sharedlib-dir=%{_libdir} \
-       --staticlib-dir=%{_libdir} \
-       --mandir=%{_mandir} \
-       --build=set
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+       --disable-silent-rules \
+       %{!?with_static_libs:--disable-static}
 
 %{__make}
 
@@ -73,8 +104,6 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/QATzip-man.pdf
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -83,13 +112,20 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc LICENSE README.md
+%doc LICENSE README.md SECURITY.md
 %attr(755,root,root) %{_bindir}/qzip
 %attr(755,root,root) %{_libdir}/libqatzip.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libqatzip.so.1
+%attr(755,root,root) %ghost %{_libdir}/libqatzip.so.2
 %{_mandir}/man1/qzip.1*
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libqatzip.so
+%{_libdir}/libqatzip.la
 %{_includedir}/qatzip.h
+
+%if %{without static}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libqatzip.a
+%endif
This page took 0.15225 seconds and 4 git commands to generate.