From 496c063376ac4426a1120a087eb9108d09a1575a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Fri, 10 May 2013 14:30:56 +0200 Subject: [PATCH] new Version 2.43.3 use a common toplevel CMakeLists.txt fix building *-doc pkgs introduce bootstrap.sh --- .gitignore | 1 + CMakeLists.txt | 80 ----------------------------------------------- ChangeLog | 8 +++++ Makefile.cvs | 4 ++- VERSION.cmake | 2 +- bootstrap.sh | 26 +++++++++++++++ libyui-qt.spec.in | 7 +++-- 7 files changed, 44 insertions(+), 84 deletions(-) delete mode 100644 CMakeLists.txt create mode 100644 bootstrap.sh diff --git a/.gitignore b/.gitignore index d60ed4e0..1f618444 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ Makefile.in # CMake CMakeCache.txt CMakeFiles +CMakeLists.txt Makefile cmake_install.cmake install_manifest.txt diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index f5bf226d..00000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,80 +0,0 @@ -CMAKE_MINIMUM_REQUIRED( VERSION 2.8 ) - -INCLUDE( "${CMAKE_SOURCE_DIR}/PROJECTINFO.cmake" ) - -SET( BUILDTOOLS_DIR "buildtools/" ) - -IF( NOT PREFIX ) - SET( PREFIX "/usr" ) -ENDIF( NOT PREFIX ) - -IF( PLUGINNAME ) - SET( BUILDTOOLS_DIR "${PREFIX}/share/lib${BASELIB}/${BUILDTOOLS_DIR}" ) -ELSE( PLUGINNAME ) - SET( BUILDTOOLS_DIR "${CMAKE_SOURCE_DIR}/${BUILDTOOLS_DIR}" ) -ENDIF( PLUGINNAME ) - -SET( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules" "${BUILDTOOLS_DIR}" "${CMAKE_MODULE_PATH}" ) - -INCLUDE( LibyuiCommon ) - -#if you need to get a git versioned package you can use cmake -DGIT_VERSION=on -if (GIT_VERSION) - FIND_PACKAGE(Git) - if(GIT_FOUND) - exec_program( - "${GIT_EXECUTABLE}" - ${CMAKE_CURRENT_SOURCE_DIR} - ARGS "describe" - OUTPUT_VARIABLE GIT_VERSION ) - - string( REGEX MATCH "-g[0-9|a-f]+$" VERSION_SHA1 ${GIT_VERSION} ) - string( REGEX REPLACE "[g]" "" VERSION_SHA1 ${VERSION_SHA1} ) - set (GIT_SHA1_VERSION "${VERSION_SHA1}") - else() - message (STATUS "GIT_VERSION option needs git installed") - set (GIT_SHA1_VERSION "") - endif() -else() - set (GIT_SHA1_VERSION "") -endif() - -INCLUDE( "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.cmake" ) - -INITIALIZE() - -PROJECT( "${PROJECTNAME}" ) - -ADD_DEFINITIONS(-DVERSION="${VERSION}") - -INCLUDE( "${CMAKE_CURRENT_SOURCE_DIR}/SOURCECONF.cmake" ) - -SET_OPTIONS() -SET_LIBDIR() - -IF( NOT DOCS_ONLY ) - FIND_LIB_DEPENDENCIES() - FIND_LINKER_LIBS() -ENDIF( NOT DOCS_ONLY ) - -CHECK_PREFIX() - -IF( DOCS_ONLY ) - FIND_PACKAGE( Libyui REQUIRED ) - SET_SONAME() -ENDIF( DOCS_ONLY ) - -SET_ENVIRONMENT() -SET_BUILD_FLAGS() -SET_AUTODOCS() - -IF( NOT DOCS_ONLY ) - SET_SUBDIRS() - GEN_EXPORTS() - GEN_FILES() - PREP_SPEC_FILES() - SET_INSTALL_TARGET() - PREP_OBS_TARBALL() -ENDIF( NOT DOCS_ONLY ) - -SUMMARY() diff --git a/ChangeLog b/ChangeLog index 081cf413..d9b397d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 10 10:40:00 UTC 2013 - bjoern.esser@gmail.com + +- use a common toplevel CMakeLists.txt +- fix building *-doc pkgs +- introduce bootstrap.sh +- Version 2.43.3 + ------------------------------------------------------------------- Mon May 6 13:30:00 UTC 2013 - bjoern.esser@gmail.com diff --git a/Makefile.cvs b/Makefile.cvs index f789e05a..3536d204 100644 --- a/Makefile.cvs +++ b/Makefile.cvs @@ -5,6 +5,7 @@ all: configure configure: clean + ./bootstrap.sh ; \ mkdir build ; \ cd build ; \ cmake -DCMAKE_BUILD_TYPE=RELEASE .. @@ -18,4 +19,5 @@ reconf: cmake rebuild_cache clean: - rm -rf build + rm -rf build \ + CMakeLists.txt diff --git a/VERSION.cmake b/VERSION.cmake index fea48551..d0c104fd 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -1,6 +1,6 @@ SET(VERSION_MAJOR "2") SET(VERSION_MINOR "43") -SET(VERSION_PATCH "2") +SET(VERSION_PATCH "3") SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${GIT_SHA1_VERSION}" ) ##### This is need for the libyui core, ONLY. diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100644 index 00000000..bdb75e21 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,26 @@ +#! /bin/sh +set -e ; + +prefix="/usr"; + +if [ ! -z $1 ]; +then + prefix="$1"; +fi; + +cmake_common="$prefix/share/libyui/buildtools/CMakeLists.common"; +cmake_target="./CMakeLists.txt"; + +echo "checking for $cmake_common..."; + +if [ -f "$cmake_common" ]; +then + ln -fs "$cmake_common" "$cmake_target"; + echo "OK: linked to `pwd`/$cmake_target."; +else + echo " Use must have libyui(-devel) >= 3.0.4 installed"; + echo " in \"$prefix\" first !!!"; + exit 1; +fi; + +exit 0; diff --git a/libyui-qt.spec.in b/libyui-qt.spec.in index 5aef3d88..c6e07395 100644 --- a/libyui-qt.spec.in +++ b/libyui-qt.spec.in @@ -29,7 +29,7 @@ BuildRequires: cmake >= 2.8 BuildRequires: gcc-c++ BuildRequires: pkg-config -%define libyui_devel_version libyui-devel >= 2.42.6 +%define libyui_devel_version libyui-devel >= 3.0.4 BuildRequires: %{libyui_devel_version} BuildRequires: libqt4-devel Provides: yui_backend @@ -45,7 +45,8 @@ Summary: @SUMMARY@ Group: System/Libraries Requires: lib@BASELIB@@SONAME_MAJOR@ -Provides: yast2-qt = 2.42.0 +Provides: lib@BASELIB@-qt = %{version} +Provides: yast2-qt = %{version} Obsoletes: yast2-qt < 2.42.0 URL: @URL@ @@ -81,6 +82,8 @@ This package has very few dependencies. export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG" export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG" +./bootstrap.sh %{_prefix} + mkdir build cd build