https://community.kde.org/api.php?action=feedcontributions&user=Lclc&feedformat=atomKDE Community Wiki - User contributions [en]2024-03-28T16:13:47ZUser contributionsMediaWiki 1.40.2https://community.kde.org/index.php?title=KTp/Getting_Set_Up/Scripted&diff=31353KTp/Getting Set Up/Scripted2013-04-29T21:13:56Z<p>Lclc: kded-integration-module got renamed to kded-module in the repos</p>
<hr />
<div>Here is a script to help you a major part of Telepathy KDE, feel free to modify it according to your needs.<br />
<br />
<source lang="bash"><br />
#!/bin/bash<br />
#<br />
# Build script for telepathy-kde, assumes you have the latest telepathy-qt4, <br />
# have a proper gitconfig setup with the "kde:" prefix.<br />
#<br />
# Instructions on how to use the script :<br />
# -b build only (updates repos before build)<br />
# -bi build and install (updates repos before build)<br />
# -u update/clone repos<br />
# -h show help menu<br />
#<br />
# Copyright (C) 2011 Rohan Garg <rohan16garg@gmail.com><br />
# Copyright (C) 2011 Dominik Schmidt <dev@dominik-schmidt.de><br />
# Copyright (C) 2011 Francesco Nwokeka <francesco.nwokeka@gmail.com><br />
#<br />
# This program is free software: you can redistribute it and/or modify<br />
# it under the terms of the GNU General Public License as published by<br />
# the Free Software Foundation, either version 3 of the License, or<br />
# (at your option) any later version.<br />
#<br />
# This program is distributed in the hope that it will be useful,<br />
# but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br />
# GNU General Public License for more details.<br />
#<br />
# You should have received a copy of the GNU General Public License<br />
# along with this program. If not, see <http://www.gnu.org/licenses/>.<br />
#<br />
###############################################################################<br />
<br />
SOURCE_DIR="."<br />
INSTALL_DIR=`kde4-config --prefix`<br />
<br />
# Add telepathy-qt4 here, if you want to build it from master too <br />
REPOS="<br />
telepathy-logger-qt<br />
ktp-common-internals<br />
ktp-accounts-kcm<br />
ktp-approver<br />
ktp-auth-handler<br />
ktp-call-ui<br />
ktp-contact-list<br />
ktp-contact-runner<br />
ktp-desktop-applets<br />
ktp-filetransfer-handler<br />
ktp-kded-module<br />
ktp-send-file<br />
ktp-text-ui"<br />
# these don't work currently, readd them at some point<br />
# telepathy-nepomuk-service<br />
# telepathy-call-ui - dont have farsight*/<br />
# telepathy-kde - doesnt build<br />
# telepathy-testlib<br />
<br />
# configure your own custom build function here<br />
function build {<br />
for repo in $REPOS<br />
do<br />
cd $repo<br />
<br />
cpus=$(ls -d /sys/devices/system/cpu/cpu? | wc -l)<br />
<br />
echo ""<br />
echo "####################################################"<br />
echo " Building $repo "<br />
echo "####################################################"<br />
<br />
if [ $NEONENV ]; then<br />
neonmake<br />
else<br />
makej=$(($cpus + 1))<br />
mkdir -p build<br />
cd build<br />
<br />
if [ "$repo" = "telepathy-qt4" ]; then<br />
cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR ..<br />
else<br />
cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_BUILD_TYPE=debugfull ..<br />
fi<br />
<br />
make --jobs=$makej<br />
cd ..<br />
fi<br />
cd ..<br />
done<br />
}<br />
<br />
function buildInstall {<br />
build<br />
<br />
for repo in $REPOS<br />
do<br />
cd $repo/build<br />
sudo make install<br />
cd ../../<br />
done<br />
}<br />
<br />
function updateRepos {<br />
mkdir -p $SOURCE_DIR<br />
cd $SOURCE_DIR<br />
<br />
for repo in $REPOS<br />
do<br />
if [ -d "$repo" ]; then<br />
cd $repo<br />
echo ""<br />
echo "####################################################"<br />
echo " Updating $repo " <br />
echo "####################################################"<br />
<br />
git pull<br />
cd ..<br />
else<br />
echo ""<br />
echo "####################################################"<br />
echo " Cloning $repo " <br />
echo "####################################################"<br />
<br />
if [ "$repo" = "telepathy-qt4" ]; then<br />
git clone git://anongit.freedesktop.org/telepathy/$repo<br />
else<br />
git clone git://anongit.kde.org/$repo<br />
fi<br />
fi<br />
done<br />
}<br />
<br />
function showHelp {<br />
echo "-b build only (updates repos before build)"<br />
echo "-bi build and install (updates repos before build)"<br />
echo "-u update/clone repos"<br />
echo "-h show this help menu"<br />
}<br />
<br />
<br />
if [ "$?" = "0" ]; <br />
then<br />
if [ "$1" = "-b" ];<br />
then<br />
updateRepos<br />
build<br />
<br />
elif [ "$1" = "-bi" ];<br />
then<br />
updateRepos<br />
buildInstall<br />
<br />
elif [ "$1" = "-u" ];<br />
then<br />
updateRepos<br />
<br />
else [ "$1" = "-h" ];<br />
showHelp<br />
fi<br />
fi<br />
<br />
</source></div>Lclc