From 373cb190e185cd86c1cb6279066d8d778edf2359 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 20 Mar 2018 11:21:00 +0100 Subject: Updated docs --- docker/Dockerfile | 4 ++++ docker/checkoutall.sh | 50 ---------------------------------------------- docker/initrepositories.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++ docs/setting-up-dev-env.md | 20 ++++++++++++------- 4 files changed, 67 insertions(+), 57 deletions(-) delete mode 100644 docker/checkoutall.sh create mode 100755 docker/initrepositories.sh diff --git a/docker/Dockerfile b/docker/Dockerfile index f10b3e23..26ed6c28 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -61,12 +61,16 @@ RUN mkdir /tmp/runtime-developer ENV XDG_RUNTIME_DIR /tmp/runtime-developer ENV LANG en_US.UTF-8 +RUN git config --global url."git://anongit.kde.org/".insteadOf kde: && \ + git config --global url."ssh://git@git.kde.org/".pushInsteadOf kde: && \ + ADD bashrc /home/developer/.bashrc ADD startimap.sh /home/developer/startimap.sh ADD keyconfig /home/developer/keyconfig ADD setupkolabnowtest.sh /home/developer/setupkolabnowtest.sh ADD kubeunlocked.sh /home/developer/kubeunlocked.sh +ADD initrepositories.sh /home/developer/initrepositories.sh RUN gpg2 --batch --generate-key /home/developer/keyconfig ADD gpg-agent.conf /home/developer/.gnupg/gpg-agent.conf ADD gpg.conf /home/developer/.gnupg/gpg.conf diff --git a/docker/checkoutall.sh b/docker/checkoutall.sh deleted file mode 100644 index 19f3bf04..00000000 --- a/docker/checkoutall.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -SRCDIR="~/src" - -cd $SRCDIR - -if [ -d flatbuffers ]; then - git clone https://github.com/google/flatbuffers.git -fi -cd flatbuffers -git pull -git checkout v1.6.0 -cd .. - -if [ -d kasync ]; then - git clone kde:kasync -fi -cd kasync -git pull -cd .. - -if [ -d kimap2 ]; then - git clone kde:kimap2 -fi -cd kimap2 -git pull -cd .. - -if [ -d kdav2 ]; then - git clone kde:kdav2 -fi -cd kdav2 -git pull -cd .. - -if [ -d sink ]; then - git clone kde:sink -fi -cd sink -git checkout develop -git pull -cd .. - -if [ -d kube ]; then - git clone kde:kube -fi -cd kube -git checkout develop -git pull -cd .. diff --git a/docker/initrepositories.sh b/docker/initrepositories.sh new file mode 100755 index 00000000..ac22db85 --- /dev/null +++ b/docker/initrepositories.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +SRCDIR="/src" + +cd $SRCDIR + +if [ -d flatbuffers ]; then + git clone https://github.com/google/flatbuffers.git +fi +cd flatbuffers +git pull +git checkout v1.6.0 +cd .. + +if [ -d kasync ]; then + git clone kde:kasync +fi +cd kasync +git pull +cd .. + +if [ -d kimap2 ]; then + git clone kde:kimap2 +fi +cd kimap2 +git pull +cd .. + +if [ -d kdav2 ]; then + git clone kde:kdav2 +fi +cd kdav2 +git pull +cd .. + +if [ -d sink ]; then + git clone kde:sink +fi +cd sink +git checkout develop +git pull +cd .. + +if [ -d kube ]; then + git clone kde:kube +fi +cd kube +git checkout develop +git pull +cd .. diff --git a/docs/setting-up-dev-env.md b/docs/setting-up-dev-env.md index 82d823bf..9fc63bb3 100644 --- a/docs/setting-up-dev-env.md +++ b/docs/setting-up-dev-env.md @@ -15,9 +15,10 @@ Multiple choices are available for developing the Kube project: - lmdb-devel / liblmdb-dev - readline-devel / libreadline-dev - libcurl-dev(el) - - kf5-kimap - - kf5-kimap-devel - - [KAsync](https://github.com/KDE/kasync/releases) + - flatbuffers-dev + - [KAsync](git://anongit.kde.org/kasync) + - [KDAV2](git://anongit.kde.org/kdav2) + - [KIMAP2](git://anongit.kde.org/kimap2) - Install Sink - Install the Kube project: - `mkdir build && cd build && cmake .. && make && sudo make install` @@ -31,13 +32,18 @@ need to set the `QML2_IMPORT_PATH` to something like this: `$KUBE_INSTALL_PREFIX/lib/qml/`. ## Docker +Building kube in a docker containers ensures reproducability and decouples the development environment from the host system (so upgrading your host system doesn't break all your builds). To avoid having to develop inside the container directly, source, build and install directories reside on the host system. - Go to the `docker` directory - In the `run.sh` script, set the SOURCEDIR, BUILDDIR and INSTALLDIR variables to an existing path containing respectively the source, build and - installation directory of kube. The build and installation directory can be - empty at first. + installation directory of kube. The build and installation directory should be + empty at first, for the source directory you may use an existing directory containing the necessary source directories. - Run the `./build.sh` script - Run the `./run.sh` script -- In the now opened container shell, run `cmake -DCMAKE_INSTALL_PREFIX=/install /src` -- Run `make install` +- If you don't have the sources available yet, run the `~/initrepositories.sh` script +- To configure the build directories, for each repository: + - `mkdir /build/$REPO && cd /build/$REPO` + - `cmake -DCMAKE_INSTALL_PREFIX=/install /src/$REPO` + - `make && make install` +- You can now edit the sources outside the container, and build and run kube inside the container. -- cgit v1.2.3