Projects
Mega:23.09
zlib
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:zlib.spec
Changed
@@ -1,6 +1,9 @@ +%global ENABLE_RELOC 1 +%define _find_debuginfo_opts -strip_a + Name: zlib Version: 1.2.13 -Release: 1 +Release: 2 Summary: A lossless data-compression library License: zlib and Boost URL: http://www.zlib.net @@ -53,6 +56,16 @@ %description -n minizip-devel This package contains the development-related content related to minizip. +%if %{?ENABLE_RELOC} +%package relocation +Summary: Relocation for %{name} +Requires: %{name} = %{version}-%{release} +BuildRequires: native-turbo-tools + +%description relocation +This package contains relocations for %{name}. +%endif + %prep %setup -n %{name}-%{version} %autosetup -b 0 -n %{name}-%{version} -p1 @@ -63,13 +76,21 @@ CFLAGS+=" -march=armv8-a+crc" %endif +mkdir rloc +(cd rloc && ln -s ../* ./ + ./configure --libdir=%{_libdir} --includedir=%{_includedir} --prefix=%{_prefix} +%make_build LDFLAGS="$LDFLAGS -Wl,-z,relro -Wl,-z,now -Wl,--emit-relocs" + objreloc $(readlink -f libz.so) +) ./configure --libdir=%{_libdir} --includedir=%{_includedir} --prefix=%{_prefix} %make_build LDFLAGS="$LDFLAGS -Wl,-z,relro -Wl,-z,now" -cd contrib/minizip +(cd contrib/minizip autoreconf --install %configure --enable-static=no %make_build +) + %install %make_install @@ -79,6 +100,11 @@ find $RPM_BUILD_ROOT -name '*.la' | xargs rm -f +%if %{?ENABLE_RELOC} +mkdir -p ${RPM_BUILD_ROOT}/usr/lib/relocation/%{_libdir} +install -pD $RPM_BUILD_DIR/%{name}-%{version}/rloc/*.relocation ${RPM_BUILD_ROOT}/usr/lib/relocation/%{_libdir} +%endif + %check make test @@ -111,7 +137,16 @@ %{_libdir}/libminizip.so %{_libdir}/pkgconfig/minizip.pc +%if %{?ENABLE_RELOC} +%files relocation +%defattr(400,root,root,-) +%attr(400, root, root) /usr/lib/relocation%{_libdir}/*.relocation +%endif + %changelog +* Thu Sep 14 2023 taoyuxiang<taoyuxiang2@huawei.com> - 1.2.13-2 +- add sub rpm zlib-relocation + * Thu Dec 29 2022 zhoupengcheng <zhoupengcheng11@huawei.com> - 1.2.13-1 - update to zlib-1.2.13 - remove openEuler uncompiled patch : 0005-Accelerate-Adler32-using-arm64-SVE-instructions.patch
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2