[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-buildsystem
Subject:    Re: KDE 4.7 Beta1 (4.6.80) tarballs uploaded (try#1)
From:       Alexander Neundorf <neundorf () kde ! org>
Date:       2011-05-26 20:20:30
Message-ID: 201105262220.30959.neundorf () kde ! org
[Download RAW message or body]

On Wednesday 25 May 2011, Alexander Neundorf wrote:
> On Wednesday 25 May 2011, Eric Hameleers wrote:
> > On Tue, 24 May 2011, Alexander Neundorf wrote:
> > > On Sunday 22 May 2011, Alexander Neundorf wrote:
> > >> On Sunday 22 May 2011, Kevin Kofler wrote:
> > >>> On Sunday 22 May 2011, Alexander Neundorf wrote:
> > >>>> So, what I'm doing right now for kdesupport is to create one
> > >>>> CMakeLists.txt, which contains all the contained projects (automoc4,
> > >>>> phonon, attica, akonadi, ...) via the externalproject()-feature from
> > >>>> CMake.
> > >>>> What it does, is it gets and updates all the sources from git,
> > >>>> configures, builds and installs them.
> > >>>> So it feels almost like it did before.
> > >>> 
> > >>> Unfortunately, this is of no use for us packagers because we are
> > >>> banned by policy (and at least in Fedora, this is enforced by the
> > >>> build system) from downloading stuff during build. We can only work
> > >>> from tarballs. (If we want to package a snapshot, we have to check
> > >>> it out, tar it, then package the resulting tarball.)
> > >> 
> > >> I'll see whether I can do something for this.
> > >> 
> > >> Alex
> > > 
> > > Looks good :-)
> > > I have here now a CMakeLists.txt for kdesupport, which downloads
> > > everything from git and builds it.
> > > But on "make package", it creates basically a package of the downloaded
> > > sources together with a matching CMakeLists.txt (which then doesn't
> > > download, but just uses the already present sources).
> > > I.e.
> > > you could do "cmake <srcdir>" , then "make package" (or maybe some
> > > custom target), and then you'd have a tgz of kdesupport which you can
> > > unpack and build anywhere.
> > > Would that help your case ?
> > > 
> > > Alex
> > 
> > Hi Alex
> > 
> > Absolutely!
> > 
> > I have no issues with creating a comprehensive tarball myself. In
> > fact, if this allows me to build a single monolithic kdesupport
> > package again, then you provide what I need.
> 
> I think so.
> There may be issues with installing the built stuff, we'll see.
> (currently it is installed during the build, so you need write permissions
> for the install directory, which is probably ok for developers, who have
> their system probably anyway set up in such a way that they can install as
> normal user, not sure for packagers).
> 
> Where should I put that stuff ?
> git, svn, somewhere else ?

Attached is what I have so far for kdesupport.
There are still issues because some of the projects in kdesupport try to 
install outside CMAKE_INSTALL_PREFIX by default, those projects have to be 
fixed.

The file uses the ExternalProject-support from cmake to gather all the 
projects into one "superproject".
If you simply build it (cmake; make), it will download, configure and build 
them all.
During building it will also install them to their install location.

If you just want to have a source package which you can build, there is a 
custom target "UpdateAll" provided, which just gets all the sources.
To get a package from that, use the package target.
I.e.
$ make UpdateAll
$ make package

gives you a KDESupport-1.2.3.tgz, which you can unpack anywhere and configure 
there (for all of the included projects at once).


Alex

["CMakeLists.txt" (text/x-cmake)]

cmake_minimum_required(VERSION 2.8.4)
project(KDESupport)

find_package(Qt4 REQUIRED)

add_custom_target(UpdateAll)


include(ExternalProject)
include(CMakeParseArguments)

macro(kde4_add_project _name )
  option(BUILD_${_name} "Build subproject ${_name}" TRUE)

  set(oneValueArgs CVS_REPOSITORY GIT_REPOSITORY SVN_REPOSITORY SOURCE_DIR )
  cmake_parse_arguments(_KAP "" "${oneValueArgs}" ""  ${ARGN})

  if(EXISTS ${CMAKE_SOURCE_DIR}/${_name}/src/ ) # we are building an installed \
version of the source package  set(GET_SOURCES_ARGS SOURCE_DIR \
${CMAKE_SOURCE_DIR}/${_name}/src/${_name}  DOWNLOAD_COMMAND "")
  else()
    set(GET_SOURCES_ARGS DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${_name}/ )

    if(_KAP_CVS_REPOSITORY)
      set(GET_SOURCES_ARGS ${GET_SOURCES_ARGS} CVS_REPOSITORY ${_KAP_CVS_REPOSITORY} \
)  elseif(_KAP_GIT_REPOSITORY)
      set(GET_SOURCES_ARGS ${GET_SOURCES_ARGS} GIT_REPOSITORY ${_KAP_GIT_REPOSITORY} \
)  elseif(_KAP_SVN_REPOSITORY)
      set(GET_SOURCES_ARGS ${GET_SOURCES_ARGS} SVN_REPOSITORY ${_KAP_SVN_REPOSITORY} \
)  elseif(_KAP_SOURCE_DIR)
      set(GET_SOURCES_ARGS ${GET_SOURCES_ARGS} SOURCE_DIR ${_KAP_SOURCE_DIR} )
    endif()
  endif()

  if (BUILD_${_name})
    externalproject_add(${_name}
  #                      ${_KAP_UNPARSED_ARGUMENTS}
                        PREFIX ${_name}
                        ${GET_SOURCES_ARGS}
                        TMP_DIR ${CMAKE_BINARY_DIR}/${_name}/tmpfiles
                        STAMP_DIR ${CMAKE_BINARY_DIR}/${_name}/stampfiles
                        BINARY_DIR ${CMAKE_BINARY_DIR}/${_name}/build
                        INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
#                        INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} \
-C${CMAKE_BINARY_DIR}/${_name}/build install DESTDIR=${CMAKE_BINARY_DIR}/Install  \
CMAKE_ARGS -DQT_QMAKE_EXECUTABLE=${QT_QMAKE_EXECUTABLE} \
-DCMAKE_PREFIX_PATH=${CMAKE_INSTALL_PREFIX} \
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}  STEP_TARGETS update
                        )

    install(DIRECTORY ${CMAKE_BINARY_DIR}/${_name}/src/ DESTINATION src/${_name}/src/ \
)

    add_dependencies(UpdateAll ${_name}-update )
  else()
    add_custom_target(${_name})
  endif()
endmacro(kde4_add_project)

kde4_add_project(Automoc4 GIT_REPOSITORY git://anongit.kde.org/automoc )

kde4_add_project(Akonadi  GIT_REPOSITORY git://anongit.kde.org/akonadi )
kde4_add_project(Attica   GIT_REPOSITORY git://anongit.kde.org/attica )
kde4_add_project(Cagibi   GIT_REPOSITORY git://anongit.kde.org/cagibi )
add_dependencies(Cagibi Automoc4)

kde4_add_project(Prison   GIT_REPOSITORY git://anongit.kde.org/prison )
kde4_add_project(PolKitQt GIT_REPOSITORY git://anongit.kde.org/polkit-qt-1 )
add_dependencies(PolKitQt Automoc4)

kde4_add_project(Soprano  GIT_REPOSITORY git://anongit.kde.org/soprano )

kde4_add_project(Phonon   GIT_REPOSITORY git://anongit.kde.org/phonon
                          CMAKE_ARGS -DPHONON_MKSPECS_DIR=share/qt4/mkspecs/modules \
-DPHONON_QT_PLUGIN_INSTALL_DIR=lib/qt4/plugins/designer/ ) add_dependencies(Phonon \
Automoc4)

kde4_add_project(Phonon-GStreamer GIT_REPOSITORY \
git://anongit.kde.org/phonon-gstreamer ) kde4_add_project(Phonon-MMF       \
GIT_REPOSITORY git://anongit.kde.org/phonon-mmf ) kde4_add_project(Phonon-MPlayer   \
GIT_REPOSITORY git://anongit.kde.org/phonon-mplayer ) kde4_add_project(Phonon-VLC     \
GIT_REPOSITORY git://anongit.kde.org/phonon-vlc ) kde4_add_project(Phonon-WaveOut   \
GIT_REPOSITORY git://anongit.kde.org/phonon-waveout ) kde4_add_project(Phonon-Xine    \
GIT_REPOSITORY git://anongit.kde.org/phonon-xine )

if(WIN32)
   kde4_add_project(Phonon-DirectShow      GIT_REPOSITORY \
git://anongit.kde.org/phonon-directshow ) endif()

if(APPLE)
   kde4_add_project(Phonon-QuickTime       GIT_REPOSITORY \
git://anongit.kde.org/phonon-quicktime ) endif()

#kde4_add_project(hello SOURCE_DIR ${CMAKE_SOURCE_DIR}/hello DOWNLOAD_COMMAND "")


install(FILES CMakeLists.txt DESTINATION src )

set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY TRUE)


set(CPACK_PACKAGE_VERSION 1.2.3)
set(CPACK_PACKAGE_NAME KDESupport )
set(CPACK_GENERATOR "TGZ")
set(CPACK_SET_DESTDIR FALSE)

include(CPack)



_______________________________________________
Kde-buildsystem mailing list
Kde-buildsystem@kde.org
https://mail.kde.org/mailman/listinfo/kde-buildsystem


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic