400b7cb5be1f8df3d99d4a09fdb79417678e751c
[tine20] / scripts / packaging / build-tine20-packages.sh
1 #!/bin/bash
2
3 # Version: $Id$
4
5 # examples
6 # $ ./build-tine20-packages.sh -s "http://git.tine20.org/git/tine20" -b master -r "2011_01_beta3-1" -c "Kristina"
7 # $ ./build-tine20-packages.sh -s "http://git.tine20.org/git/tine20" -b 2011-01 -r "2011-01-3" -c "Kristina"
8
9 ## GLOBAL VARIABLES ##
10 BASEDIR=`readlink -f ./tine20build`
11 TEMPDIR="$BASEDIR/temp"
12 MISCPACKAGESDIR="$BASEDIR/packages/misc"
13
14 CODENAME="Egon"
15 GITURL="http://git.tine20.org/git/tine20"
16
17 RELEASE=""
18 GITBRANCH="2016.03"
19 PACKAGEDIR=""
20
21 PATH=$MISCPACKAGESDIR:$TEMPDIR/tine20/vendor/bin:$PATH
22
23 ADDITIONALRELEASEFILES="CoreData"
24
25 #
26 # checkout url to local directory
27 #
28 function checkout()
29 {
30     echo "checkout files from git url $1 to $TEMPDIR/tine20 ... "
31     rm -rf $TEMPDIR/tine20
32
33     # try to use REPOCACHEDIR
34     if [ -n "$REPOCACHEDIR" ]; then
35         if [ "$1" == "http://gerrit.tine20.com/customers/p/tine20.com.git" ]; then
36             REPODIR="${REPOCACHEDIR}/tine20.com"
37         elif [ "$1" == "http://git.tine20.org/git/tine20" ]; then
38             REPODIR="${REPOCACHEDIR}/tine20.org"
39         else
40             echo "unknown git repository: $1"
41             exit 1
42         fi
43
44         echo "using repodir $REPODIR for git checkout/clone"
45
46         # create repodir and clone repo
47         if [ ! -d $REPODIR ]; then
48             mkdir -p $REPODIR
49             cd $REPODIR
50             git clone "$1" .
51
52             RETVAL=$?
53             if [ $RETVAL -ne 0 ]; then
54                 echo "git clone $1 failed!"
55                 exit
56             fi
57         fi
58
59         cd $REPODIR
60         CPDIR="${REPODIR}/tine20"
61         git fetch
62
63         RETVAL=$?
64         if [ $RETVAL -ne 0 ]; then
65             echo "git fetch failed!"
66             exit
67         fi
68
69     # ok use old algorithm, clone from scratch...
70     else
71         rm -rf $TEMPDIR/tine20.git
72         mkdir $TEMPDIR/tine20.git
73         cd $TEMPDIR/tine20.git
74         git clone "$1" .
75         RETVAL=$?
76         if [ $RETVAL -ne 0 ]; then
77             echo "git clone $1 failed!"
78             exit
79         fi
80         CPDIR=${TEMPDIR}/tine20.git/tine20
81     fi
82
83     if [ -n "$GITBRANCH" ]; then
84         echo "checkout refspec"
85         git checkout $GITBRANCH
86         RETVAL=$?
87
88         if [ $RETVAL -ne 0 ]; then
89             echo "refspec $GITBRANCH not found. Either define a valid release name or a valid git refspec (-b)"
90             exit
91         fi
92
93     elif [ -n "$RELEASE" ]; then
94         echo "checkout release tag"
95         git checkout refs/tags/${RELEASE/\~/-}
96         RETVAL=$?
97
98         if [ $RETVAL -ne 0 ]; then
99             echo "release tag refs/tags/$RELEASE not found. Either define a valid release name or a valid git refspec (-b)"
100             exit
101         fi
102     else
103         echo "You must either define a release (-r) or a branch (-b)"
104         exit
105     fi
106
107     git pull
108     RETVAL=$?
109     if [ $RETVAL -ne 0 ]; then
110         echo "git pull failed!"
111         exit
112     fi
113
114     REVISION=$(git describe --tags)
115     if [ "$RELEASE" == "" ]; then
116         RELEASE=${REVISION}
117     fi
118
119     cd - > /dev/null
120
121     cp -r $CPDIR $TEMPDIR/
122
123     echo "done"
124 }
125
126 ### create dirs ###
127 function createDirectories()
128 {
129     echo -n "creating directory structure $BASEDIR ... "
130     test -d $BASEDIR || mkdir -p $BASEDIR
131
132     test -d $MISCPACKAGESDIR || mkdir -p $MISCPACKAGESDIR
133     test -d $TEMPDIR || mkdir -p $TEMPDIR
134
135     echo "done"
136 }
137
138 function getOptions()
139 {
140     while getopts "pr:s:b:c:" optname
141     do
142         case "$optname" in
143           "c")
144             CODENAME=$OPTARG
145             ;;
146           "b")
147             GITBRANCH=$OPTARG
148             ;;
149           "s")
150             GITURL=$OPTARG
151             ;;
152           "r")
153             # release
154             RELEASE=$OPTARG
155             ;;
156           "?")
157             echo "Unknown option $OPTARG"
158             ;;
159           ":")
160             echo "No argument value for option $OPTARG"
161             ;;
162           *)
163           # Should not occur
164             echo "Unknown error while processing options"
165             ;;
166         esac
167         #echo "OPTIND is now $OPTIND"
168     done
169 }
170
171 function activateReleaseMode()
172 {
173     # utc datetime, like this: 2013-09-24 14:27:06
174     local DATETIME=`date -u "+%F %T"`
175
176     # set buildtype to DEBUG for beta releases
177     if [[ $RELEASE == *beta* ]]; then
178         local BUILDTYPE="DEBUG";
179     else
180         local BUILDTYPE="RELEASE";
181     fi
182
183     echo "RELEASE: $RELEASE REVISION: $REVISION CODENAME: $CODENAME BUILDTYPE: $BUILDTYPE";
184
185     sed -i -e "s/'buildtype', 'DEVELOPMENT'/'buildtype', '$BUILDTYPE'/" $TEMPDIR/tine20/Tinebase/Core.php
186     sed -i -e "s/'buildtype', 'DEVELOPMENT'/'buildtype', '$BUILDTYPE'/" $TEMPDIR/tine20/Setup/Core.php
187
188     sed -i -e "s#'TINE20_CODENAME',      Tinebase_Helper::getDevelopmentRevision()#'TINE20_CODENAME',      '$CODENAME'#" $TEMPDIR/tine20/Tinebase/Core.php
189     sed -i -e "s#'TINE20SETUP_CODENAME',       Tinebase_Helper::getDevelopmentRevision()#'TINE20SETUP_CODENAME',      '$CODENAME'#" $TEMPDIR/tine20/Setup/Core.php
190     sed -i -e "s/'TINE20_PACKAGESTRING', 'none'/'TINE20_PACKAGESTRING', '$RELEASE'/" $TEMPDIR/tine20/Tinebase/Core.php
191     sed -i -e "s/'TINE20SETUP_PACKAGESTRING', 'none'/'TINE20SETUP_PACKAGESTRING', '$RELEASE'/" $TEMPDIR/tine20/Setup/Core.php
192     sed -i -e "s/'TINE20_RELEASETIME',   'none'/'TINE20_RELEASETIME',   '$DATETIME'/" $TEMPDIR/tine20/Tinebase/Core.php
193     sed -i -e "s/'TINE20SETUP_RELEASETIME',   'none'/'TINE20SETUP_RELEASETIME',   '$DATETIME'/" $TEMPDIR/tine20/Setup/Core.php
194     sed -i -e "s/Tinebase_Helper::getDevelopmentRevision()/Tinebase_Helper::getCodename()/" $TEMPDIR/tine20/build.xml
195
196     sed -i -e "s/Tine.clientVersion.buildRevision[^;]*/Tine.clientVersion.buildRevision = '$REVISION'/" $TEMPDIR/tine20/Tinebase/js/tineInit.js
197     sed -i -e "s/Tine.clientVersion.codeName[^;]*/Tine.clientVersion.codeName = '$CODENAME'/" $TEMPDIR/tine20/Tinebase/js/tineInit.js
198     sed -i -e "s/Tine.clientVersion.packageString[^;]*/Tine.clientVersion.packageString = '$RELEASE'/" $TEMPDIR/tine20/Tinebase/js/tineInit.js
199     sed -i -e "s/Tine.clientVersion.releaseTime[^;]*/Tine.clientVersion.releaseTime = '$DATETIME'/" $TEMPDIR/tine20/Tinebase/js/tineInit.js
200
201 }
202
203 function buildLangStats()
204 {
205     echo -n "building lang stats ... "
206     php -f $TEMPDIR/tine20/langHelper.php -- --statistics
207     echo "done"
208 }
209
210 function buildClient()
211 {
212     if [ -x $TEMPDIR/tine20/vendor/bin/phing ]
213     then
214         echo -n "building javascript clients ... "
215         $TEMPDIR/tine20/vendor/bin/phing -f $TEMPDIR/tine20/build.xml build
216         echo "done"
217     else
218         echo "no phing binary found. exiting"
219         exit
220     fi
221 }
222
223 function createArchives()
224 {
225     echo "building Tine 2.0 single archives... "
226     CLIENTBUILDFILTER="FAT"
227
228     for FILE in `ls $TEMPDIR/tine20`; do
229         UCFILE=`echo ${FILE} | tr '[A-Z]' '[a-z]'`
230
231         if [ -d "$TEMPDIR/tine20/$FILE/translations" ]; then
232             case $FILE in
233                 Addressbook)
234                     # handled in Tinebase
235                     ;;
236                 Admin)
237                     # handled in Tinebase
238                     ;;
239                 Setup)
240                     # handled in Tinebase
241                     ;;
242
243                 Calendar)
244                     echo " $FILE"
245                     echo -n "  cleanup "
246                     (cd $TEMPDIR/tine20/$FILE/js;  rm -rf $(ls | grep -v ${CLIENTBUILDFILTER} | grep -v "\-lang\-"))
247                     (cd $TEMPDIR/tine20/$FILE/css; rm -rf $(ls | grep -v ${CLIENTBUILDFILTER} | grep -v print.css))
248                     echo "building "
249                     (cd $TEMPDIR/tine20; tar cjf ../../packages/tine20/$RELEASE/tine20-${UCFILE}_$RELEASE.tar.bz2 $FILE)
250                     (cd $TEMPDIR/tine20; zip -qr ../../packages/tine20/$RELEASE/tine20-${UCFILE}_$RELEASE.zip     $FILE)
251                     ;;
252
253                 Tinebase)
254                     echo " $FILE"
255                     echo -n "  cleanup "
256                     (cd $TEMPDIR/tine20/Addressbook/js;  rm -rf $(ls | grep -v ${CLIENTBUILDFILTER} | grep -v "\-lang\-"))
257                     (cd $TEMPDIR/tine20/Addressbook/css; rm -rf $(ls | grep -v ${CLIENTBUILDFILTER}))
258                     (cd $TEMPDIR/tine20/Admin/js;        rm -rf $(ls | grep -v ${CLIENTBUILDFILTER} | grep -v "\-lang\-"))
259                     (cd $TEMPDIR/tine20/Admin/css;       rm -rf $(ls | grep -v ${CLIENTBUILDFILTER}))
260                     (cd $TEMPDIR/tine20/Setup/js;        rm -rf $(ls | grep -v ${CLIENTBUILDFILTER} | grep -v "\-lang\-"))
261                     (cd $TEMPDIR/tine20/Setup/css;       rm -rf $(ls | grep -v ${CLIENTBUILDFILTER}))
262
263                     # Tinebase/js/ux/Printer/print.css
264                     (cd $TEMPDIR/tine20/Tinebase/js/ux/Printer; rm -rf $(ls | grep -v print.css))
265                     # Tinebase/js/ux/data/windowNameConnection*
266                     (cd $TEMPDIR/tine20/Tinebase/js/ux/data; rm -rf $(ls | grep -v windowNameConnection))
267                     (cd $TEMPDIR/tine20/Tinebase/js/ux;  rm -rf $(ls | grep -v Printer | grep -v data))
268                     (cd $TEMPDIR/tine20/Tinebase/js;     rm -rf $(ls | grep -v ${CLIENTBUILDFILTER} | grep -v Locale | grep -v ux | grep -v "\-lang\-" | grep -v node_modules))
269                     (cd $TEMPDIR/tine20/Tinebase/css;    rm -rf $(ls | grep -v ${CLIENTBUILDFILTER}))
270
271                     # cleanup ExtJS
272                     (cd $TEMPDIR/tine20/library/ExtJS/adapter; rm -rf $(ls | grep -v ext))
273                     (cd $TEMPDIR/tine20/library/ExtJS/src;     rm -rf $(ls | grep -v debug.js))
274                     (cd $TEMPDIR/tine20/library/ExtJS;         rm -rf $(ls | grep -v adapter | grep -v ext-all-debug.js | grep -v ext-all.js | grep -v resources | grep -v src))
275
276                     # cleanup OpenLayers
277                     (cd $TEMPDIR/tine20/library/OpenLayers;    rm -rf $(ls | grep -v img | grep -v license.txt | grep -v OpenLayers.js | grep -v theme))
278
279                     # cleanup qCal
280                     (cd $TEMPDIR/tine20/library/qCal;  rm -rf docs tests)
281
282                     # cleanup jsb2tk
283                     (cd $TEMPDIR/tine20/library/jsb2tk;  rm -rf JSBuilder2 tests)
284
285                     # save langStats
286                     (mv $TEMPDIR/tine20/langstatistics.json $TEMPDIR/tine20/Tinebase/translations/langstatistics.json)
287
288                     # remove composer dev requires
289                     composer install --no-dev -d $TEMPDIR/tine20
290
291                     # remove npm dev requires
292                     if [ -e $TEMPDIR/tine20/Tinebase/js/package.json ]
293                     then
294                       cd Tinebase/js
295                       npm prune --production
296                       cd ../..
297                     fi
298
299                     rm -rf $TEMPDIR/tine20/vendor/phpdocumentor
300                     rm -rf $TEMPDIR/tine20/vendor/ezyang/htmlpurifier/{art,benchmarks,extras,maintenance,smoketests}
301
302                     find $TEMPDIR/tine20/vendor -name .gitignore -type f -print0 | xargs -0 rm -rf
303                     find $TEMPDIR/tine20/vendor -name .git       -type d -print0 | xargs -0 rm -rf
304                     find $TEMPDIR/tine20/vendor -name docs       -type d -print0 | xargs -0 rm -rf
305                     find $TEMPDIR/tine20/vendor -name examples   -type d -print0 | xargs -0 rm -rf
306                     find $TEMPDIR/tine20/vendor -name tests      -type d -print0 | xargs -0 rm -rf
307
308                     composer dumpautoload -d $TEMPDIR/tine20
309
310                     rm -rf $TEMPDIR/tine20/composer.*
311
312                     echo -n "building "
313                     local FILES="Addressbook Admin Setup Tinebase images library vendor docs fonts themes"
314                     local FILES="$FILES config.inc.php.dist index.php langHelper.php setup.php tine20.php bootstrap.php worker.php status.php"
315                     local FILES="$FILES CREDITS LICENSE PRIVACY README RELEASENOTES init_plugins.php favicon.ico"
316
317                     # allow to pass files to build as a global var
318                     if [ -n "$ADDITIONALRELEASEFILES" ]; then
319                         local FILES="$FILES $ADDITIONALRELEASEFILES"
320                     fi
321
322                     (cd $TEMPDIR/tine20; tar cjf ../../packages/tine20/$RELEASE/tine20-${UCFILE}_$RELEASE.tar.bz2 $FILES)
323                     (cd $TEMPDIR/tine20; zip -qr ../../packages/tine20/$RELEASE/tine20-${UCFILE}_$RELEASE.zip     $FILES)
324
325                     echo ""
326                     ;;
327
328                 *)
329                     echo " $FILE"
330                     echo -n "  cleanup "
331                     (cd $TEMPDIR/tine20/$FILE/js;  rm -rf $(ls | grep -v ${CLIENTBUILDFILTER} | grep -v "\-lang\-" | grep -v "empty\.js"))
332                     (cd $TEMPDIR/tine20/$FILE/css; rm -rf $(ls | grep -v ${CLIENTBUILDFILTER}))
333                     echo "building "
334                     (cd $TEMPDIR/tine20; tar cjf ../../packages/tine20/$RELEASE/tine20-${UCFILE}_$RELEASE.tar.bz2 $FILE)
335                     (cd $TEMPDIR/tine20; zip -qr ../../packages/tine20/$RELEASE/tine20-${UCFILE}_$RELEASE.zip     $FILE)
336                     ;;
337             esac
338
339         fi
340     done
341 }
342
343 function createSpecialArchives()
344 {
345     echo "building Tine 2.0 allinone archive... "
346     rm -rf $TEMPDIR/allinone
347     mkdir $TEMPDIR/allinone
348
349     for ARCHIVENAME in activesync calendar coredata tinebase crm felamimail filemanager sales tasks timetracker; do
350         if [ -e "$BASEDIR/packages/tine20/$RELEASE/tine20-${ARCHIVENAME}_$RELEASE.tar.bz2" ]; then
351             (cd $TEMPDIR/allinone; tar xjf ../../packages/tine20/$RELEASE/tine20-${ARCHIVENAME}_$RELEASE.tar.bz2)
352         fi
353     done
354
355     (cd $TEMPDIR/allinone; tar cjf ../../packages/tine20/$RELEASE/tine20-allinone_$RELEASE.tar.bz2 .)
356     (cd $TEMPDIR/allinone; zip -qr ../../packages/tine20/$RELEASE/tine20-allinone_$RELEASE.zip     .)
357
358
359     echo "building Tine 2.0 voip archive... "
360     rm -rf $TEMPDIR/voip
361     mkdir $TEMPDIR/voip
362
363     for ARCHIVENAME in phone voipmanager; do
364         (cd $TEMPDIR/voip; tar xjf ../../packages/tine20/$RELEASE/tine20-${ARCHIVENAME}_$RELEASE.tar.bz2)
365     done
366
367     (cd $TEMPDIR/voip; tar cjf ../../packages/tine20/$RELEASE/tine20-voip_$RELEASE.tar.bz2 .)
368     (cd $TEMPDIR/voip; zip -qr ../../packages/tine20/$RELEASE/tine20-voip_$RELEASE.zip     .)
369 }
370
371 function setupComposer()
372 {
373     if [ -x "/usr/local/bin/composer" ]; then
374         echo "using existing composer binary"
375     else
376         wget -O $MISCPACKAGESDIR/composer.phar https://getcomposer.org/composer.phar
377         chmod ugo+x $MISCPACKAGESDIR/composer.phar
378         (cd $MISCPACKAGESDIR; ln -sf composer.phar composer)
379     fi
380
381     # sometimes we lose packages or external repos can't be reached
382     # try to find a local vendor.zip and extract that (symlinks have to be preserved in zip with -y)
383     if [ -e $BASEDIR/../vendor.zip ]; then
384          unzip $BASEDIR/../vendor.zip -d $TEMPDIR/tine20
385     fi
386
387     composer install -d $TEMPDIR/tine20
388 }
389
390 function setupPackageDir()
391 {
392     PACKAGEDIR="$BASEDIR/packages/tine20/$RELEASE"
393     rm -rf $PACKAGEDIR
394     mkdir -p $PACKAGEDIR
395 }
396
397 function packageTranslations()
398 {
399     echo -n "building translation files for translators... "
400     php -d include_path=".:$TEMPDIR/tine20:$TEMPDIR/tine20/library"  -f $TEMPDIR/tine20/langHelper.php -- --package=translations.tar.gz
401     mv $TEMPDIR/tine20/translations.tar.gz $PACKAGEDIR
402     echo "done"
403 }
404
405 function buildChecksum()
406 {
407     echo -n "calculating SHA1 checksums... "
408
409     test -e $PACKAGEDIR/sha1sum_$RELEASE.txt && rm $PACKAGEDIR/sha1sum_$RELEASE.txt
410
411     for fileName in $PACKAGEDIR/*; do
412         (cd $PACKAGEDIR; sha1sum `basename $fileName`) >> $PACKAGEDIR/sha1sum_$RELEASE.txt 2>&1
413     done
414
415     echo "done"
416 }
417
418 function prepareDebianPackaging()
419 {
420     PACKAGEDIR="$BASEDIR/packages/debian/$RELEASE"
421     rm -rf $PACKAGEDIR
422
423     # Replace all matches of - with .
424     DEBIANVERSION=${RELEASE//-/.}
425
426     mkdir -p "$PACKAGEDIR/tine20-$DEBIANVERSION"
427
428     echo -n "preparing debian packaging directory in $PACKAGEDIR/tine20-$DEBIANVERSION ... "
429
430     tar -C $PACKAGEDIR/tine20-$DEBIANVERSION -xf $BASEDIR/packages/tine20/$RELEASE/tine20-allinone_$RELEASE.tar.bz2
431     tar -C $PACKAGEDIR/tine20-$DEBIANVERSION -xf $BASEDIR/packages/tine20/$RELEASE/tine20-courses_$RELEASE.tar.bz2
432     tar -C $PACKAGEDIR/tine20-$DEBIANVERSION -xf $BASEDIR/packages/tine20/$RELEASE/tine20-humanresources_$RELEASE.tar.bz2
433     cp $BASEDIR/packages/tine20/$RELEASE/tine20-allinone_$RELEASE.tar.bz2 $PACKAGEDIR/tine20_$DEBIANVERSION.orig.tar.bz2
434     cp $BASEDIR/packages/tine20/$RELEASE/tine20-courses_$RELEASE.tar.bz2 $PACKAGEDIR/tine20_$DEBIANVERSION.orig-Courses.tar.bz2
435     cp $BASEDIR/packages/tine20/$RELEASE/tine20-humanresources_$RELEASE.tar.bz2 $PACKAGEDIR/tine20_$DEBIANVERSION.orig-HumanResources.tar.bz2
436     cp -r $BASEDIR/temp/debian $PACKAGEDIR/tine20-$DEBIANVERSION
437
438     echo "done"
439 }
440
441 function prepareUniventionPackaging()
442 {
443     PACKAGEDIR="$BASEDIR/packages/univention/$RELEASE"
444     rm -rf $PACKAGEDIR
445
446     # Replace all matches of - with .
447     DEBIANVERSION=${RELEASE//-/.}
448
449     mkdir -p "$PACKAGEDIR/tine20-$DEBIANVERSION"
450
451     echo -n "preparing univention packaging directory in $PACKAGEDIR/tine20-$DEBIANVERSION ... "
452
453     tar -C $PACKAGEDIR/tine20-$DEBIANVERSION -xf $BASEDIR/packages/tine20/$RELEASE/tine20-allinone_$RELEASE.tar.bz2
454     tar -C $PACKAGEDIR/tine20-$DEBIANVERSION -xf $BASEDIR/packages/tine20/$RELEASE/tine20-courses_$RELEASE.tar.bz2
455     tar -C $PACKAGEDIR/tine20-$DEBIANVERSION -xf $BASEDIR/packages/tine20/$RELEASE/tine20-humanresources_$RELEASE.tar.bz2
456     cp $BASEDIR/packages/tine20/$RELEASE/tine20-allinone_$RELEASE.tar.bz2 $PACKAGEDIR/tine20_$DEBIANVERSION.orig.tar.bz2
457     cp $BASEDIR/packages/tine20/$RELEASE/tine20-courses_$RELEASE.tar.bz2 $PACKAGEDIR/tine20_$DEBIANVERSION.orig-Courses.tar.bz2
458     cp $BASEDIR/packages/tine20/$RELEASE/tine20-humanresources_$RELEASE.tar.bz2 $PACKAGEDIR/tine20_$DEBIANVERSION.orig-HumanResources.tar.bz2
459     cp -r $BASEDIR/temp/Univention/* $PACKAGEDIR/tine20-$DEBIANVERSION
460
461     echo "done"
462 }
463
464 function prepareFedoraPackaging()
465 {
466     PACKAGEDIR="$BASEDIR/packages/fedora/$RELEASE"
467     rm -rf $PACKAGEDIR
468
469     # Replace all matches of - with .
470     RPMVERSION=${RELEASE//-/.}
471
472     mkdir -p "$PACKAGEDIR/tine20-$RPMVERSION"
473
474     echo -n "preparing fedora packaging directory in $PACKAGEDIR/tine20-$RPMVERSION ... "
475
476     cp -r $BASEDIR/temp/fedora/* $PACKAGEDIR/tine20-$RPMVERSION/
477
478     cp $BASEDIR/packages/tine20/$RELEASE/tine20-allinone_$RELEASE.tar.bz2 $PACKAGEDIR/tine20-$RPMVERSION/SOURCES/
479     cp $BASEDIR/packages/tine20/$RELEASE/tine20-courses_$RELEASE.tar.bz2 $PACKAGEDIR/tine20-$RPMVERSION/SOURCES/
480     cp $BASEDIR/packages/tine20/$RELEASE/tine20-humanresources_$RELEASE.tar.bz2 $PACKAGEDIR/tine20-$RPMVERSION/SOURCES/
481
482     echo "done"
483 }
484
485 getOptions "$@"
486
487 createDirectories
488 checkout "$GITURL" "$GITBRANCH"
489 setupComposer
490 setupPackageDir
491 activateReleaseMode
492 buildLangStats
493 buildClient
494 createArchives
495 createSpecialArchives
496 packageTranslations
497 buildChecksum