apps using zypp dont need to include it.
- allow FindZypp to recognize ZYPP_PREFIX in
order to allow in-home-dir development
- Commit po gettext build system
- fix sqlite sources (removed methods)
####################################################################
# RPM SPEC #
####################################################################
-
MESSAGE(STATUS "Writing spec file...")
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/libzypp.spec.cmake ${CMAKE_BINARY_DIR}/package/libzypp.spec @ONLY)
MESSAGE(STATUS "Writing pkg-config file...")
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/libzypp.pc.cmake ${CMAKE_BINARY_DIR}/libzypp.pc @ONLY)
-
INSTALL( FILES ${CMAKE_BINARY_DIR}/libzypp.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
+MESSAGE(STATUS "FindZypp.cmake will be installed in ${CMAKE_INSTALL_PREFIX}/share/cmake/Modules")
+INSTALL( FILES ${CMAKE_SOURCE_DIR}/cmake/modules/FindZypp.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cmake/Modules )
+
MACRO(add_subdir_sources subdir real_sources)
MESSAGE( STATUS "Adding ${subdir} to sources..." )
SET(sources)
--- /dev/null
+
+IF (ZYPP_PREFIX)
+ MESSAGE(STATUS "ZYpp library prefix set to ${ZYPP_PREFIX}")
+ELSE (ZYPP_PREFIX)
+ MESSAGE(STATUS "ZYpp path not set. Looking for it.")
+ENDIF (ZYPP_PREFIX)
+
+if(ZYPP_INCLUDE_DIR AND ZYPP_LIBRARY)
+ # Already in cache, be silent
+ set(ZYPP_FIND_QUIETLY TRUE)
+endif(ZYPP_INCLUDE_DIR AND ZYPP_LIBRARY)
+
+set(ZYPP_LIBRARY)
+set(ZYPP_INCLUDE_DIR)
+
+FIND_PATH(ZYPP_INCLUDE_DIR zypp/ZYpp.h
+ /usr/include
+ /usr/local/include
+ ${ZYPP_PREFIX}/include
+)
+
+FIND_LIBRARY(ZYPP_LIBRARY NAMES zypp
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ ${ZYPP_PREFIX}/lib
+)
+
+if(ZYPP_INCLUDE_DIR AND ZYPP_LIBRARY)
+ MESSAGE( STATUS "ZYpp found: includes in ${ZYPP_INCLUDE_DIR}, library in ${ZYPP_LIBRARY}")
+ set(ZYPP_FOUND TRUE)
+else(ZYPP_INCLUDE_DIR AND ZYPP_LIBRARY)
+ MESSAGE( FATAL "ZYpp not found")
+endif(ZYPP_INCLUDE_DIR AND ZYPP_LIBRARY)
+
+MARK_AS_ADVANCED(ZYPP_INCLUDE_DIR ZYPP_LIBRARY)
\ No newline at end of file
Requires: libzypp
Requires: libxml2-devel curl-devel openssl-devel rpm-devel glibc-devel zlib-devel
Requires: bzip2 popt-devel dbus-1-devel glib2-devel hal-devel boost-devel libstdc++-devel
+Requires: cmake
Summary: Package, Patch, Pattern, and Product Management - developers files
Group: System/Packages
Provides: yast2-packagemanager-devel
%{_docdir}/%{name}
%dir %{prefix}/include/zypp
%{prefix}/include/zypp/*
+%{prefix}/share/cmake/Modules/FindLibzypp.cmake
%{_libdir}/pkgconfig/libzypp.pc
%changelog -n libzypp
--- /dev/null
+
+FILE( GLOB LIBZYPP_PO_FILES ${CMAKE_SOURCE_DIR}/po/*.po )
+GETTEXT_CREATE_TRANSLATIONS( "${CMAKE_SOURCE_DIR}/po/zypp.pot" ${LIBZYPP_PO_FILES} )
SqliteSourceImpl *impl = new SqliteSourceImpl( SqliteSourceImplPolicy() );
impl->factoryCtor( mediaid, Pathname(), catalog, "", false, false );
impl->setId( catalog );
- impl->setZmdName( catalog );
- impl->setZmdDescription ( catalog );
impl->setPriority( 0 );
impl->setSubscribed( true );
SqliteSourceImpl *impl = new SqliteSourceImpl ();
impl->factoryCtor( mediaid, Pathname(), alias, "", false, false );
impl->setId( id );
- //impl->setZmdDescription ( desc );
- //impl->setPriority( priority );
- //impl->setSubscribed( subscribed != 0 );
impl->attachDatabase( _db );
impl->attachIdMap( &_idmap );