Skip to content
This repository has been archived by the owner on Apr 16, 2019. It is now read-only.

Commit

Permalink
Add SPEC_Requires
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandres committed Jun 15, 2012
1 parent 5b35b79 commit d3df53c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
4 changes: 3 additions & 1 deletion RPMINFO.skel
Expand Up @@ -10,12 +10,14 @@ SET( SPEC_Description "\n" ) # the description to be used, end each li

SET( SPEC_BuildRequires "cmake >= 2.8" ) # the BuildRequires every single pkg wrapped with "" and speparated with spaces

SET( SPEC_Conflicts "" ) # the Conflicts every single pkg wrapped with "" and speparated with spaces
SET( SPEC_Requires "" ) # the Requires every single pkg wrapped with "" and speparated with spaces

SET( SPEC_Provides "" ) # the Provides every single pkg wrapped with "" and speparated with spaces

SET( SPEC_Obsoletes "" ) # the Obsoletes every single pkg wrapped with "" and speparated with spaces

SET( SPEC_Conflicts "" ) # the Conflicts every single pkg wrapped with "" and speparated with spaces

SET( SPEC_Docs "" ) # for docs that should be in the main-pkg

SET( SPEC_DEVEL_Requires "@PROJECTNAME@@@varpfx@SONAME_MAJOR@ = %{version}" ) # the Requires for the -devel pkg every single pkg wrapped with "" and speparated with spaces
Expand Down
16 changes: 8 additions & 8 deletions macros.cmake
Expand Up @@ -33,7 +33,7 @@ ENDMACRO( SET_OPTIONS )
MACRO( SET_BUILD_FLAGS ) # setup compiler-flags depending on CMAKE_BUILD_TYPE

SET( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )

STRING( STRIP "${CMAKE_CXX_FLAGS}" CMAKE_CXX_FLAGS )
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0" )
STRING( STRIP "${CMAKE_CXX_FLAGS}" CMAKE_CXX_FLAGS )
Expand Down Expand Up @@ -128,7 +128,7 @@ MACRO( SET_ENVIRONMENT ) # setup the environment vars
SET( FULL_DATA_DIR "${DATAROOTDIR}/lib${BASELIB}" )
SET( INSTALL_INCLUDE_DIR "${INCLUDE_DIR}" CACHE PATH "Installation directory for header files" )
SET( INSTALL_LIB_DIR "${LIB_DIR}" CACHE PATH "Installation directory for libraries" )

SET( THEME_DIR "${FULL_DATA_DIR}/theme" )

IF( NOT DEFINED DOC_DIR )
Expand Down Expand Up @@ -208,7 +208,7 @@ MACRO( SET_AUTODOCS ) # looks for doxygen, dot and latex and setup autodocs acc
FIND_PACKAGE( LATEX )

SET(
LATEX_COND
LATEX_COND
NOT ${PDFLATEX_COMPILER} STREQUAL "PDFLATEX_COMPILER-NOTFOUND"
AND NOT ${MAKEINDEX_COMPILER} STREQUAL "MAKEINDEX_COMPILER-NOTFOUND"
)
Expand Down Expand Up @@ -261,7 +261,7 @@ MACRO( SET_AUTODOCS ) # looks for doxygen, dot and latex and setup autodocs acc
${PROJECT_BINARY_DIR}/Doxyfile
@ONLY
)

CONFIGURE_FILE(
${PROJECT_BINARY_DIR}/Doxyfile
${PROJECT_BINARY_DIR}/Doxyfile
Expand All @@ -274,7 +274,7 @@ ENDMACRO( SET_AUTODOCS )

MACRO( SET_SUBDIRS ) # setup the subdirs

FOREACH( p ${SUBDIRS} )
FOREACH( p ${SUBDIRS} )
ADD_SUBDIRECTORY( ${p} )
ENDFOREACH()

Expand All @@ -293,7 +293,7 @@ MACRO( GEN_EXPORTS ) # generate and export the library-depends
FILE "${PROJECT_BINARY_DIR}/${PROJECTNAME_UC}LibraryDepends.cmake"
)
ENDIF( ENABLE_STATIC AND NOT DISABLE_SHARED )

EXPORT( PACKAGE ${PROJECTNAME} )

ENDMACRO( GEN_EXPORTS )
Expand Down Expand Up @@ -347,12 +347,12 @@ MACRO( PREP_SPEC_FILES )
SET( SPEC_Owndir "%dir %{_libdir}${SPEC_Libdir}" )
ENDIF( PLUGINNAME )

FOREACH( p "BuildRequires" "Conflicts" "Provides" "Obsoletes" "DEVEL_Requires" "DEVEL_Provides" )
FOREACH( p "BuildRequires" "Requires" "Provides" "Obsoletes" "Conflicts" "DEVEL_Requires" "DEVEL_Provides" )
STRING( REPLACE "DEVEL_" "" SPEC_PREPEND "${p}" )
FOREACH( x ${SPEC_${p}} )
SET( ${p} "${${p}}${SPEC_PREPEND}: ${x}\n" )
ENDFOREACH( x SPEC_${p} )
ENDFOREACH( p "BuildRequires" "Conflicts" "Provides" "Obsoletes" "DEVEL_Requires" "DEVEL_Provides" )
ENDFOREACH( p "BuildRequires" "Requires" "Provides" "Obsoletes" "Conflicts" "DEVEL_Requires" "DEVEL_Provides" )

CONFIGURE_FILE(
"${PROJECT_SOURCE_DIR}/resource/template.spec.in"
Expand Down
3 changes: 2 additions & 1 deletion resource/template.spec.in
Expand Up @@ -21,9 +21,10 @@ Summary: @SPEC_Summary@

Group: System/Libraries

@Conflicts@
@Requires@
@Provides@
@Obsoletes@
@Conflicts@
URL: @SPEC_Url@
Summary: @PROJECTNAME_UC@ - @SPEC_Summary@

Expand Down

0 comments on commit d3df53c

Please sign in to comment.