--- satsolver-0.17.7.orig/debian/python-satsolver.install
+++ satsolver-0.17.7/debian/python-satsolver.install
@@ -0,0 +1,1 @@
+debian/satsolver/usr/lib/python*	/usr/lib
--- satsolver-0.17.7.orig/debian/perl-satsolver.install
+++ satsolver-0.17.7/debian/perl-satsolver.install
@@ -0,0 +1,1 @@
+debian/satsolver/usr/lib/perl*	/usr/lib
--- satsolver-0.17.7.orig/debian/rules
+++ satsolver-0.17.7/debian/rules
@@ -0,0 +1,61 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+include /usr/share/dpatch/dpatch.make
+
+unexport LDFLAGS
+PY_SITEDIR := $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
+
+build: build-stamp
+build-stamp: patch-stamp
+	dh_testdir
+	cmake -DFEDORA=1 -DCMAKE_INSTALL_PREFIX=/usr -DPYTHON_SITEDIR=$(PY_SITEDIR) -DLIB=lib -DCMAKE_VERBOSE_MAKEFILE=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_RPATH=1 -DUSE_OWN_QSORT=1
+	make
+	make doc_forced
+	touch build-stamp
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+
+	# Cleaning package
+	[ ! -f Makefile ] || $(MAKE) clean
+	rm -rf build
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Installing package
+	mkdir -p $(CURDIR)/debian/satsolver
+	make DESTDIR=$(CURDIR)/debian/satsolver install
+	#mkdir -p $(CURDIR)/debian/tmp
+	#make DESTDIR=$(CURDIR)/debian/tmp install
+
+binary-indep: build install
+
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_install
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- satsolver-0.17.7.orig/debian/libsatsolver-demo.install
+++ satsolver-0.17.7/debian/libsatsolver-demo.install
@@ -0,0 +1,1 @@
+debian/satsolver/usr/bin/solv	/usr/bin
--- satsolver-0.17.7.orig/debian/patches/00list
+++ satsolver-0.17.7/debian/patches/00list
@@ -0,0 +1,2 @@
+04-enable-USE_OWN_QSORT.patch
+04-remove-Werror.patch
--- satsolver-0.17.7.orig/debian/patches/04-remove-Werror.patch
+++ satsolver-0.17.7/debian/patches/04-remove-Werror.patch
@@ -0,0 +1,18 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 04-remove-Werror.patch
+##
+##
+
+@DPATCH@
+
+diff -uNr satsolver-0.17.0/CMakeLists.txt satsolver-0.17.0.new/CMakeLists.txt
+--- satsolver-0.17.0/CMakeLists.txt	2011-05-02 21:43:37.000000000 +0800
++++ satsolver-0.17.0.new/CMakeLists.txt	2011-12-22 16:52:57.649562164 +0800
+@@ -184,7 +184,6 @@
+ 
+ MESSAGE(STATUS "Looking modules in ${CMAKE_MODULE_PATH}")
+ 
+-set ( CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} -Werror -Wall" )
+ set ( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -g -O3" )
+ set ( CMAKE_C_FLAGS_DEBUG     "${CMAKE_C_FLAGS} -g3 -O0" )
+ 
--- satsolver-0.17.7.orig/debian/patches/04-enable-USE_OWN_QSORT.patch
+++ satsolver-0.17.7/debian/patches/04-enable-USE_OWN_QSORT.patch
@@ -0,0 +1,18 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 01-buildfix.patch
+##
+##
+
+@DPATCH@
+
+diff -purN a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt	2011-05-02 21:43:37.000000000 +0800
++++ b/CMakeLists.txt	2011-07-21 23:14:32.802949831 +0800
+@@ -105,6 +105,7 @@ ENDFOREACH( VAR )
+ SET( PACKAGE "satsolver" )
+ SET( VERSION "${LIBSATSOLVER_MAJOR}.${LIBSATSOLVER_MINOR}.${LIBSATSOLVER_PATCH}" )
+ 
++ADD_DEFINITIONS( -DUSE_OWN_QSORT=1 )
+ ADD_DEFINITIONS( -D_FILE_OFFSET_BITS=64 )
+ ADD_DEFINITIONS( -DVERSION=\\\"${VERSION}\\\" )
+ CONFIGURE_FILE( src/satversion.h.in src/satversion.h )
--- satsolver-0.17.7.orig/debian/control
+++ satsolver-0.17.7/debian/control
@@ -0,0 +1,59 @@
+Source: satsolver
+Section: utils
+Priority: optional
+Maintainer: Gui Chen <gui.chen@intel.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch, cdbs, python-dev, python-support, doxygen, libperl-dev, libdb-dev, ruby, rdoc, libexpat-dev, librpm-dev, g++, ruby-dev, perl, swig, zlib1g-dev, check
+Standards-Version: 3.7.1
+Homepage: git://git.opensuse.org/projects/zypp/sat-solver.git
+
+Package: libsatsolver-demo
+Architecture: amd64 i386
+Depends: curl, gnupg2
+Description: Applications demoing the satsolver library
+ satsolver is a new approach to package dependency solving, it is developed
+ by SUSE developers and used by Novell SUSE distros.
+
+Package: libsatsolver-dev
+Architecture: amd64 i386
+Depends: satsolver-tools (>=0.17.0)
+Description: Development files for satsolver
+ satsolver is a new approach to package dependency solving, it is developed
+ by SUSE developers and used by Novell SUSE distros.
+ .
+ This package contains development files for satsolver.
+
+Package: satsolver-tools
+Architecture: amd64 i386
+Depends: gzip, bzip2, coreutils
+Description: tools for satsolver
+ satsolver is a new approach to package dependency solving, it is developed
+ by SUSE developers and used by Novell SUSE distros.
+ .
+ This package contains tools for satsolver.
+
+Package: ruby-satsolver
+Architecture: amd64 i386
+Depends: 
+Description: Ruby bindings for satsolver
+ satsolver is a new approach to package dependency solving, it is developed
+ by SUSE developers and used by Novell SUSE distros.
+ .
+ This package contains ruby bindings for sat solver.
+
+Package: python-satsolver
+Architecture: amd64 i386
+Depends: 
+Description: Python bindings for satsolver
+ satsolver is a new approach to package dependency solving, it is developed
+ by SUSE developers and used by Novell SUSE distros.
+ .
+ This package contains python bindings for sat solver.
+
+Package: perl-satsolver
+Architecture: amd64 i386
+Depends: 
+Description: Perl bindings for satsolver
+ satsolver is a new approach to package dependency solving, it is developed
+ by SUSE developers and used by Novell SUSE distros.
+ .
+ This package contains perl bindings for sat solver.
--- satsolver-0.17.7.orig/debian/changelog
+++ satsolver-0.17.7/debian/changelog
@@ -0,0 +1,15 @@
+satsolver (0.17.7) unstable; urgency=low
+
+  * fix evr version compare
+  * add armv7tnhl and armv7thl support
+  * fix gcc4.6 build warning
+  * fix debian build
+  * update libsatsovler install and ruby install 
+
+ -- Gui Chen <gui.chen@intel.com>  Fri, 22 July 2011 15:45:52 +0800
+
+satsolver (0.16.1) unstable; urgency=low
+
+  * gfxboot module:
+
+ -- Yi Yang <yi.y.yang@intel.com>  Tue, 23 Nov 2010 16:40:52 +0800
--- satsolver-0.17.7.orig/debian/libsatsolver-dev.install
+++ satsolver-0.17.7/debian/libsatsolver-dev.install
@@ -0,0 +1,4 @@
+debian/satsolver/usr/lib/libsatsolver.a	/usr/lib
+debian/satsolver/usr/lib/libsatsolverext.a	/usr/lib
+debian/satsolver/usr/include/satsolver	/usr/include
+debian/satsolver/usr/bin/helix2solv	/usr/bin
--- satsolver-0.17.7.orig/debian/ruby-satsolver.install
+++ satsolver-0.17.7/debian/ruby-satsolver.install
@@ -0,0 +1,1 @@
+debian/satsolver/usr/local/lib/site_ruby/*	/usr/lib/ruby/
--- satsolver-0.17.7.orig/debian/satsolver-tools.install
+++ satsolver-0.17.7/debian/satsolver-tools.install
@@ -0,0 +1,11 @@
+debian/satsolver/usr/bin/deltainfoxml2solv	/usr/bin
+debian/satsolver/usr/bin/dumpsolv	/usr/bin
+debian/satsolver/usr/bin/mergesolv	/usr/bin
+debian/satsolver/usr/bin/repo2solv.sh	/usr/bin
+debian/satsolver/usr/bin/repomdxml2solv	/usr/bin
+debian/satsolver/usr/bin/rpmdb2solv	/usr/bin
+debian/satsolver/usr/bin/rpmmd2solv	/usr/bin
+debian/satsolver/usr/bin/rpms2solv	/usr/bin
+debian/satsolver/usr/bin/susetags2solv	/usr/bin
+debian/satsolver/usr/bin/updateinfoxml2solv	/usr/bin
+LICENSE.BSD /usr/share/doc/satsolver-tools
