require devtools from svn and remove duplicated code
authordmacvicar <dmacvicar@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Mon, 26 Nov 2007 17:34:42 +0000 (17:34 +0000)
committerdmacvicar <dmacvicar@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Mon, 26 Nov 2007 17:34:42 +0000 (17:34 +0000)
git-svn-id: http://svn.opensuse.org/svn/yast/trunk/ruby-bindings@42414 e0cc52ee-31ee-0310-8b87-e83c4596d67c

CMakeLists.txt
cmake/modules/FindYast.cmake [deleted file]
yast2-ruby-bindings.spec.in

index a61d065..cde6c79 100644 (file)
@@ -1,54 +1,8 @@
 PROJECT(yast2-ruby-bindings)
-
+SET(PACKAGE "yast2-ruby-bindings")
 SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O3 -Wall -Woverloaded-virtual" )
 SET( CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -g -O3 -Wall" )
 
-# Library
-IF ( DEFINED LIB )
-  SET ( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB}" )
-ELSE ( DEFINED  LIB )
-  IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
-    SET( LIB_SUFFIX "64" )
-  ENDIF(CMAKE_SIZEOF_VOID_P MATCHES "8")
-  SET ( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" )
-ENDIF ( DEFINED  LIB )
-MESSAGE(STATUS "Libraries will be installed in ${LIB_INSTALL_DIR}" )
-
-# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
-SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
-#SET(CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake/Modules ${CMAKE_MODULE_PATH})
-
-SET( PACKAGE "yast2-ruby-bindings" )
-INCLUDE(${CMAKE_SOURCE_DIR}/VERSION.cmake)
-SET ( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" )
-
-SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Language Bindings for YaST")
-SET(CPACK_PACKAGE_VENDOR "Novell Inc.")
-#SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt")
-#SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
-SET(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
-SET(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
-SET(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
-
-SET( CPACK_GENERATOR "TBZ2")
-SET( CPACK_SOURCE_GENERATOR "TBZ2")
-SET( CPACK_SOURCE_PACKAGE_FILE_NAME "${PACKAGE}-${VERSION}" )
-
-# The following components are regex's to match anywhere (unless anchored)
-# in absolute path + filename to find files or directories to be excluded
-# from source tarball.
-SET (CPACK_SOURCE_IGNORE_FILES
-"/CVS/;/.svn/;/.libs/;/.deps/;/.git/;.swp$;.#;/#;/build/"
-"~$"
-"\\\\.cvsignore$"
-"/package"
-"Makefile\\\\.in$"
-)
-
-INCLUDE(CPack)
-
-#FIND_PACKAGE(SWIG REQUIRED)
-
 FIND_PROGRAM(SWIG_EXECUTABLE
   NAMES swig-1.3 swig
   PATHS ${SWIG_DIR} ${SWIG_DIR}/.. ${SWIG_DIR}/../../bin /usr/bin /usr/local/bin ${CMAKE_INSTALL_PREFIX}/bin
@@ -61,38 +15,12 @@ ELSE ( NOT SWIG_EXECUTABLE )
 ENDIF ( NOT SWIG_EXECUTABLE )
 
 FIND_PACKAGE(Yast REQUIRED)
+INCLUDE(YastCommon)
+
+
 FIND_PACKAGE(Ruby REQUIRED)
 
 #RUBY_RUBY_LIB_PATH
 MESSAGE( STATUS "Ruby vendor arch dir: ${RUBY_VENDORARCH_DIR}" )
 
-####################################################################
-# RPM SPEC                                                         #
-####################################################################
-MESSAGE(STATUS "Writing spec file...")
-CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/${PACKAGE}.spec.in ${CMAKE_BINARY_DIR}/package/${PACKAGE}.spec @ONLY)
-
-ADD_SUBDIRECTORY(src)
-
-INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
-
-ADD_CUSTOM_TARGET( svncheck
-  COMMAND cd $(CMAKE_SOURCE_DIR) && ! LC_ALL=C svn status --show-updates --quiet | grep -v '^Status against revision'
-)
-
-SET( AUTOBUILD_COMMAND
-  COMMAND ${CMAKE_MAKE_PROGRAM} package_source
-  COMMAND ${CMAKE_COMMAND} -E copy ${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.bz2 ${CMAKE_BINARY_DIR}/package
-  COMMAND ${CMAKE_COMMAND} -E remove ${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.bz2
-  COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/package/${PACKAGE}.changes" "${CMAKE_BINARY_DIR}/package/${PACKAGE}.changes"
-)
-
-ADD_CUSTOM_TARGET( srcpackage_local
-  ${AUTOBUILD_COMMAND}
-)
-
-ADD_CUSTOM_TARGET( srcpackage
-  COMMAND ${CMAKE_MAKE_PROGRAM} svncheck
-  ${AUTOBUILD_COMMAND}
-)
-
+ADD_SUBDIRECTORY(src)
\ No newline at end of file
diff --git a/cmake/modules/FindYast.cmake b/cmake/modules/FindYast.cmake
deleted file mode 100644 (file)
index a9de452..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-
-if(YAST_INCLUDE_DIR AND YAST_LIBRARY AND YAST_YCP_LIBRARY)
-  # Already in cache, be silent
-  set(YAST_FIND_QUIETLY TRUE)  
-endif(YAST_INCLUDE_DIR AND YAST_LIBRARY AND YAST_YCP_LIBRARY)
-
-set(YAST_LIBRARY)
-set(YAST_INCLUDE_DIR)
-set(YAST_YCP_LIBRARY)
-
-FIND_PATH(YAST_INCLUDE_DIR Y2.h
-  ${CMAKE_INSTALL_PREFIX}/include/YaST2
-  /usr/include/YaST2
-  /usr/local/include/YaST2
-)
-
-SET(YAST_PLUGIN_DIR ${LIB_INSTALL_DIR}/YaST2/plugin)
-
-FIND_LIBRARY(YAST_LIBRARY NAMES y2
-  PATHS
-  ${LIB_INSTALL_DIR}
-  /usr/local/lib
-)
-
-FIND_LIBRARY(YAST_YCP_LIBRARY NAMES ycp
-  PATHS
-  ${LIB_INSTALL_DIR}
-  /usr/local/lib
-)
-
-FIND_LIBRARY(YAST_PLUGIN_WFM_LIBRARY NAMES py2wfm
-  PATHS
-  ${YAST_PLUGIN_DIR}
-  /usr/lib
-  /usr/local/lib
-)
-
-FIND_LIBRARY(YAST_PLUGIN_SCR_LIBRARY NAMES py2scr
-  PATHS
-  ${YAST_PLUGIN_DIR}
-  ${LIB_INSTALL_DIR}
-  /usr/local/lib
-)
-
-if(YAST_INCLUDE_DIR AND YAST_LIBRARY AND YAST_YCP_LIBRARY)
-   MESSAGE( STATUS "YaST2 found: includes in ${YAST_INCLUDE_DIR}, library in ${YAST_LIBRARY}")
-   MESSAGE( STATUS "             plugins in ${YAST_PLUGIN_DIR}")
-   set(YAST_FOUND TRUE)
-else(YAST_INCLUDE_DIR AND YAST_LIBRARY AND YAST_YCP_LIBRARY)
-   MESSAGE( STATUS "YaST2 not found")
-endif(YAST_INCLUDE_DIR AND YAST_LIBRARY AND YAST_YCP_LIBRARY)
-
-MARK_AS_ADVANCED(YAST_INCLUDE_DIR YAST_LIBRARY YAST_YCP_LIBRARY YAST_PLUGIN_WFM_LIBRARY ${YAST_PLUGIN_DIR})
\ No newline at end of file
index b481aae..5e5e685 100644 (file)
@@ -14,7 +14,8 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        yast2-ruby-bindings-%{version}.tar.bz2
 prefix:         /usr
 
-BuildRequires: swig cmake gcc-c++ libxcrypt-devel yast2-core-devel yast2-devtools
+BuildRequires: swig cmake gcc-c++ libxcrypt-devel yast2-core-devel
+BuildRequires:  yast2-devtools >= 2.16.3
 # libzypp-devel is missing .la requires
 BuildRequires: ruby-devel
 Requires:      yast2-core >= 2.13.28