diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-12-23 15:13:16 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-12-23 15:13:34 +0900 |
commit | 742c464a718861c2941e7f19c03e72f84b097da7 (patch) | |
tree | e59e4cf22391f684d0b02804236ccef0cce03d21 | |
parent | 5f5ff9576322b449fca131df791f4748e412df5f (diff) | |
download | libsolv-accepted/tizen_7.0_unified_hotfix.tar.gz libsolv-accepted/tizen_7.0_unified_hotfix.tar.bz2 libsolv-accepted/tizen_7.0_unified_hotfix.zip |
Bump to libsolv 0.7.20tizen_8.0_m2_releasetizen_7.0_m2_releasesubmit/tizen/20211230.015143submit/tizen/20211229.233908submit/tizen/20211223.062617accepted/tizen/unified/20211230.125138accepted/tizen/8.0/unified/20231005.095111accepted/tizen/7.0/unified/hotfix/20221116.111023accepted/tizen/7.0/unified/20221110.060159tizen_8.0tizen_7.0_hotfixtizen_7.0sandbox/dh0128.kwak/libsolv-0.7.20-20211223sandbox/backup/libsolv_0.7.20_20231208backup/libsolv-0.7.20-20220922accepted/tizen_8.0_unifiedaccepted/tizen_7.0_unified_hotfixaccepted/tizen_7.0_unified
Change-Id: I5281a969c4b00e3c545ea6f886734f680eadd9ee
-rw-r--r-- | packaging/add_pie_compile_option.patch | 24 | ||||
-rw-r--r-- | packaging/libsolv.manifest | 5 | ||||
-rw-r--r-- | packaging/libsolv.spec | 156 |
3 files changed, 185 insertions, 0 deletions
diff --git a/packaging/add_pie_compile_option.patch b/packaging/add_pie_compile_option.patch new file mode 100644 index 0000000..79ddf68 --- /dev/null +++ b/packaging/add_pie_compile_option.patch @@ -0,0 +1,24 @@ +diff --git a/examples/solv/CMakeLists.txt b/examples/solv/CMakeLists.txt +index 0f3bd47..e360f2d 100644 +--- a/examples/solv/CMakeLists.txt ++++ b/examples/solv/CMakeLists.txt +@@ -1,3 +1,5 @@ ++SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") ++SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") + + ADD_EXECUTABLE (solv solv.c + checksig.c +diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt +index f19030e..93632e3 100644 +--- a/tools/CMakeLists.txt ++++ b/tools/CMakeLists.txt +@@ -10,6 +10,9 @@ ENDIF () + + SET (tools_list testsolv mergesolv dumpsolv installcheck testsolv) + ++SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") ++SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") ++ + IF (ENABLE_RPMDB) + ADD_EXECUTABLE (rpmdb2solv rpmdb2solv.c) + TARGET_LINK_LIBRARIES (rpmdb2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES}) diff --git a/packaging/libsolv.manifest b/packaging/libsolv.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/libsolv.manifest @@ -0,0 +1,5 @@ +<manifest> + <request> + <domain name="_"/> + </request> +</manifest> diff --git a/packaging/libsolv.spec b/packaging/libsolv.spec new file mode 100644 index 0000000..ed47e7f --- /dev/null +++ b/packaging/libsolv.spec @@ -0,0 +1,156 @@ +Name: libsolv +Version: 0.7.20 +Release: 0 +Url: https://github.com/openSUSE/libsolv +License: BSD-3-Clause +Source: libsolv-%{version}.tar.bz2 +Source10: add_pie_compile_option.patch +Source1001: libsolv.manifest +Summary: A new approach to package dependency solving +Group: System/Package Management + +BuildRequires: db4-devel +BuildRequires: expat-devel +BuildRequires: fdupes +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: rpm-devel +BuildRequires: zlib-devel + +%bcond_without enable_static +%bcond_without perl_binding +%bcond_without python_binding + +%if %{with perl_binding} +BuildRequires: perl +BuildRequires: swig +%endif +%if %{with python_binding} +%global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True);") +BuildRequires: python-devel +BuildRequires: swig +%endif + +%description +A new approach to package dependency solving. + +%package devel +Summary: A new approach to package dependency solving +Group: Development/Libraries +Requires: libsolv-tools = %version +Requires: libsolv = %version +Requires: rpm-devel + +%description devel +Development files for libsolv, a new approach to package dependency solving + +%package tools +Summary: A new approach to package dependency solving +Group: Development/Libraries +Obsoletes: satsolver-tools < 0.18 +Provides: satsolver-tools = 0.18 +Requires: gzip bzip2 coreutils findutils + +%description tools +A new approach to package dependency solving. + +%package -n python-solv +Requires: python +Summary: Python bindings for the libsolv library +Group: Platfrom Development/Python + +%description -n python-solv +Python bindings for sat solver. + +%package -n perl-solv +Requires: perl = %{perl_version} +Summary: Perl bindings for the libsolv library +Group: Platfrom Development/Perl + +%description -n perl-solv +Perl bindings for sat solver. + +%prep +%setup -n libsolv-%{version} +cp %{SOURCE1001} . +%{__patch} -p1 < %{SOURCE10} + +%build +export CFLAGS="$RPM_OPT_FLAGS" +export CXXFLAGS="$CFLAGS" + +CMAKE_FLAGS= +CMAKE_FLAGS="-DSUSE=1" + +cmake $CMAKE_FLAGS \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DLIB=%{_lib} \ + -DCMAKE_VERBOSE_MAKEFILE=TRUE \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + %{?with_enable_static:-DENABLE_STATIC=1} \ + %{?with_perl_binding:-DENABLE_PERL=1} \ + %{?with_python_binding:-DENABLE_PYTHON=1} \ + -DUSE_VENDORDIRS=1 \ + -DCMAKE_SKIP_RPATH=1 +make %{?jobs:-j %jobs} + +%install +make DESTDIR=$RPM_BUILD_ROOT install +%if %{with python_binding} +pushd $RPM_BUILD_ROOT/%{python_sitearch} +python %py_libdir/py_compile.py *.py +python -O %py_libdir/py_compile.py *.py +popd +%endif +install -D -m0755 examples/repo2solv.sh %{buildroot}%{_bindir} + +%remove_docs +# we want to leave the .a file untouched +export NO_BRP_STRIP_DEBUG=true + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%manifest %{name}.manifest +%license LICENSE.BSD +%{_libdir}/libsolv.so.* +%{_libdir}/libsolvext.so.* + +%files tools +%manifest %{name}.manifest +%license LICENSE.BSD +%{_bindir}/solv +%{_bindir}/* + +%files devel +%manifest %{name}.manifest +%license LICENSE.BSD +%{_libdir}/pkgconfig/libsolv.pc +%{_libdir}/pkgconfig/libsolvext.pc +%if %{with enable_static} +%{_libdir}/libsolv.a +%{_libdir}/libsolvext.a +%endif +%if !%{with disable_shared} +%{_libdir}/libsolv.so +%{_libdir}/libsolvext.so +%endif +%{_includedir}/solv +%{_bindir}/helix2solv +%{_datadir}/cmake/Modules/* + +%if %{with perl_binding} +%files -n perl-solv +%manifest %{name}.manifest +%license LICENSE.BSD +%{perl_vendorarch}/* +%endif + +%if %{with python_binding} +%files -n python-solv +%manifest %{name}.manifest +%license LICENSE.BSD +%{python_sitearch}/* +%endif |