Rebase for libzypp-bindings 0.7.3 19/109519/1
authorAnas Nashif <anas.nashif@intel.com>
Mon, 27 May 2013 19:37:23 +0000 (15:37 -0400)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 10 Jan 2017 08:39:23 +0000 (17:39 +0900)
Change-Id: I8a296480009b197cbdfe235d8232f02b7e9bbeef
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
VERSION.cmake
package/libzypp-bindings.changes
packaging/libzypp-bindings.changes [new file with mode: 0644]
packaging/libzypp-bindings.manifest [new file with mode: 0644]
packaging/libzypp-bindings.spec [new file with mode: 0644]
swig/CMakeLists.txt
swig/RepoManager.i
swig/RepoType.i
swig/zypp.i

index 195fd4d..b0f8cf7 100644 (file)
@@ -1,4 +1,4 @@
 # on maintenance branch add a 2nd level to patch (p.1, p.2, ...)
 SET(VERSION_MAJOR "0")
-SET(VERSION_MINOR "7")
-SET(VERSION_PATCH "3")
+SET(VERSION_MINOR "6")
+SET(VERSION_PATCH "2")
index 9518e38..7f19f52 100644 (file)
@@ -1,40 +1,4 @@
 -------------------------------------------------------------------
-Mon Aug 10 17:07:09 CEST 2015 - ma@suse.com
-
-- Adapt to libzypp changes due to FATE#318778
-- 0.7.3
-
--------------------------------------------------------------------
-Mon Jul 20 13:44:19 CEST 2015 - ma@suse.de
-
-- Don't expose resolver internals (due to FATE#318099)
-- 0.7.2
-
--------------------------------------------------------------------
-Thu May 21 13:09:43 CEST 2015 - ma@suse.de
-
-- Fix test to run with ruby-2.2
-- 0.7.1
-
--------------------------------------------------------------------
-Mon May  4 10:17:32 CEST 2015 - ma@suse.de
-
-- Adapt to libzypp-15.x (bnc#899755)
-- 0.7.0
-
--------------------------------------------------------------------
-Thu Dec 18 11:28:55 CET 2014 - ma@suse.de
-
-- Enforce Python 2.7 libzypp-bindings is not yet ready for Python 3. 
-- 0.6.4
-
--------------------------------------------------------------------
-Fri Oct 17 11:22:13 CEST 2014 - ma@suse.de
-
-- Adapt to libzypp changes.
-- 0.6.3
-
--------------------------------------------------------------------
 Thu Aug 14 14:45:12 CEST 2014 - mls@suse.de
 
 - work around syntax errors because of __attribute__ 
diff --git a/packaging/libzypp-bindings.changes b/packaging/libzypp-bindings.changes
new file mode 100644 (file)
index 0000000..c376a2f
--- /dev/null
@@ -0,0 +1,39 @@
+* Mon Aug 11 2014 Chanho Park <chanho61.park@samsung.com> upstream/0.6.1
+- Update to 0.6.1
+
+* Thu Jun 28 2013 Gui Chen <gui.chen@intel.com>
+- add SolvAttr class
+
+* Thu Jun 27 2013 Gui Chen <gui.chen@intel.com>  18a5e07
+- add more interface for tizen
+
+* Mon May 27 2013 Anas Nashif <anas.nashif@intel.com> 2fba846
+- Update to 0.5.14
+
+* Tue Dec 20 2011 Zhang Qiang <qiang.z.zhang@intel.com> - 0.5.9.1
+- depend special version of libzypp for opensuse 11.4 and 11.3
+
+* Mon Oct 24 2011 Zhang Qiang <qiang.z.zhang@intel.com> - 0.5.9
+- Add loadSolvFile API to load solv file
+
+* Sun Sep 18 2011 Zhang Qiang <qiang.z.zhang@intel.com> - 0.5.9
+- Add CapNames to return provides info
+- Add a patch to provide PoolQuery interface.
+
+* Fri Sep 02 2011 Gui Chen <gui.chen@intel.com> - 0.5.9
+- Update to 0.5.9
+
+* Mon Aug 01 2011 Gui Chen <gui.chen@intel.com> - 0.5.8
+- Added armv7tnhl and armv7thl support
+
+* Fri Jan 21 2011 Marko Saukko <marko.saukko@cybercom.com> - 0.5.8
+- Added armv7hl and armv7nhl architectures (BMC#12713)
+
+* Tue Jan 04 2011 Yi Yang <yi.y.yang@intel.com> - 0.5.8
+- Support builtin arm architectures
+
+* Fri Dec 17 2010 Yi Yang <yi.y.yang@intel.com> - 0.5.8
+- Update to 0.5.8
+
+* Thu Nov 25 2010 Yi Yang <yi.y.yang@intel.com> - 0.5.7
+- Update to 0.5.7
diff --git a/packaging/libzypp-bindings.manifest b/packaging/libzypp-bindings.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/libzypp-bindings.spec b/packaging/libzypp-bindings.spec
new file mode 100644 (file)
index 0000000..305b869
--- /dev/null
@@ -0,0 +1,64 @@
+# 
+# spec file for package libzypp-bindings
+#
+# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# 
+Name:           libzypp-bindings
+Version:        0.6.1
+Release:        0
+License:        GPL-2.0+
+Summary:        Bindings for libzypp
+Group:          Development/Sources
+Source:         %{name}-%{version}.tar.gz
+Source1001:    libzypp-bindings.manifest
+
+BuildRequires:  cmake gcc-c++ python-devel
+BuildRequires:  swig
+
+BuildRequires:  libzypp-devel
+
+%description
+This package provides bindings for libzypp, the library for package management.
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+
+%build
+mkdir build
+cd build
+%cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
+      -DPYTHON_SITEDIR=%{python_sitearch} \
+      -DLIB=%{_lib} \
+      -DCMAKE_VERBOSE_MAKEFILE=TRUE \
+      -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
+      -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
+      -DCMAKE_BUILD_TYPE=Release \
+      -DCMAKE_SKIP_RPATH=1 \
+      ..
+make -j1
+
+%install
+cd build
+make install DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+
+%package -n python-zypp
+Summary:        Python bindings for libzypp
+Group:          Development/Languages/Python
+Requires:  libzypp
+
+%description -n python-zypp
+Python bindings of libzypp
+
+
+%files -n python-zypp
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{python_sitearch}/_zypp.so
+%{python_sitearch}/zypp.py*
index 400c894..251b5b5 100644 (file)
@@ -19,26 +19,19 @@ OPTION(BUILD_PERL5_BINDINGS "Build Perl 5 bindings" ON)
 # Let's see which target languages are available
 #
 
-IF(BUILD_RUBY_BINDINGS)
-  FIND_PACKAGE(Ruby)
-  IF(RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
-    ADD_SUBDIRECTORY(ruby)
-  ENDIF()
-ENDIF()
-
-IF(BUILD_PYTHON2_BINDINGS)
-  # Enforce Python 2.7, libzypp-bindings does not yet work with Python3
-  set(PythonLibs_FIND_VERSION 2.7)
-  set(PythonLibs_FIND_VERSION_MAJOR 2)
-  FIND_PACKAGE(PythonLibs)
-  IF(PYTHON_LIBRARY)
-    ADD_SUBDIRECTORY(python)
-  ENDIF()
-ENDIF()
-
-IF(BUILD_PERL5_BINDINGS)
-  FIND_PACKAGE(Perl)
-  IF(PERL_EXECUTABLE)
-    ADD_SUBDIRECTORY(perl5)
-  ENDIF()
-ENDIF()
+FIND_PACKAGE(Ruby)
+FIND_PACKAGE(PythonLibs)
+FIND_PACKAGE(Perl)
+
+
+IF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
+  ADD_SUBDIRECTORY(ruby)
+ENDIF(RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
+    
+IF (PYTHON_LIBRARY)
+  ADD_SUBDIRECTORY(python)
+ENDIF(PYTHON_LIBRARY)
+      
+#IF (PERL_EXECUTABLE)
+#  ADD_SUBDIRECTORY(perl5)
+#ENDIF (PERL_EXECUTABLE)
index 8f7870d..a150d32 100644 (file)
@@ -1 +1,19 @@
 %include <zypp/RepoManager.h>
+
+#ifdef SWIGPYTHON
+%extend  zypp::RepoManager{
+    std::string loadSolvFile(std::string _solv, std::string _alias)
+    {
+        RepoInfo tmpRepo; 
+        tmpRepo.setAlias(_alias);
+        try {
+            sat::Pool::instance().addRepoSolv(_solv, tmpRepo);
+        } catch ( const Exception & e ){
+            return e.msg();
+        }
+
+        return std::string();
+    }
+}
+#endif
+
index d9f1164..3907371 100644 (file)
@@ -1 +1,2 @@
-%include <zypp/repo/RepoType.h>
\ No newline at end of file
+%ignore zypp::operator<<;
+%include <zypp/repo/RepoType.h>
index eaca647..bdb2371 100644 (file)
@@ -239,6 +239,7 @@ namespace zypp {
 %include "SolvAttr.i"
 %include "Resolvable.i"
 %include "RepoType.i"
+%include "TmpPath.i"
 %include "RepoInfo.i"
 %include "Repository.i"
 %include "ServiceInfo.i"
@@ -262,10 +263,10 @@ namespace zypp {
 %include "ResPool.i"
 %include "ZYppCommitPolicy.i"
 %include "ZYppCommitResult.i"
-%include "TmpPath.i"
 %include "Resolver.i"
 %include "ZConfig.i"
 %include "PoolQuery.i"
+%include "SolvAttr.i"
 
 //just simple files, where we need default ctor
 %include <zypp/repo/RepoProvideFile.h>