1 # Contributor: Maciej Sitarz <macieks@freesco.pl>
6 pkgdesc="A Qt-based Gadu-Gadu client - git build"
7 url="http://www.kadu.net/"
9 depends=('qt>=4' 'libgadu-devel' 'hicolor-icon-theme')
10 makedepends=('git' 'cmake' 'inputproto')
11 optdepends=('libsndfile: module sound' \
12 'aspell: module spellchecker' \
13 'phonon: module phonon_sound' \
14 'qca-ossl: module encryption' \
15 'libxtst: module panelkadu' \
16 'libxss: module idle' \
17 'curl: module plus_pl_sms'
18 'geoip: module geoip_lookup')
21 arch=('i686' 'x86_64')
22 source=('kadu-git.install' 'kadu-git.modules')
23 md5sums=('ecabc475a3f80759f95a90aadb753f25'
24 '432da87b47f18020b9049a1d49ec7f2e')
25 install=kadu-git.install
27 _gitroot=git://gitorious.org/kadu/kadu.git
33 msg "Connecting to GIT server...."
35 if [ -d ${_gitname} ]; then
36 cd ${_gitname} && git pull origin || return 1
37 msg "The local files are updated."
39 git clone ${_gitroot} -b 0.6.5.x || return 1
44 msg "GIT checkout done or server timeout"
45 msg "Starting make..."
47 [ -d ${srcdir}/kadu-build ] && rm -fr ${srcdir}/kadu-build
48 mkdir ${srcdir}/kadu-build || return 1
49 git clone ${srcdir}/kadu ${srcdir}/kadu-build || return 1
50 cd ${srcdir}/kadu-build || return 1
52 # Include file with modules list
53 source ${srcdir}/kadu-git.modules || return 1
55 check_new_modules || return 1
56 change_modules || return 1
58 mkdir -p ${srcdir}/BUILD
61 cmake -D CMAKE_INSTALL_PREFIX=/usr -D CMAKE_BUILD_TYPE="Release" ../kadu-build || return 1
64 make DESTDIR=$startdir/pkg install
66 rm -rf $startdir/pkg/usr/share/kadu/{HISTORY,README}
70 for MOD in $modules_static; do
71 echo $MOD | grep '!' &> /dev/null
72 if [ "$?" == "1" ]; then
74 if [ ! -z "`grep -w $MOD .config`" ]; then
75 sed -i "s/^$MOD=./$MOD=y/" .config
77 error "$MOD not found in .config"
82 for MOD in $modules_dynamic; do
83 echo $MOD | grep '!' &> /dev/null
84 if [ "$?" == "1" ]; then
85 msg "As module... $MOD"
86 if [ ! -z "`grep -w $MOD .config`" ]; then
87 sed -i "s/^$MOD=./$MOD=m/" .config
89 error "$MOD not found in .config"
94 for MOD in $modules_skip; do
95 echo $MOD | grep '!' &> /dev/null
96 if [ "$?" == "1" ]; then
97 msg "Disabling module... $MOD"
98 if [ ! -z "`grep -w $MOD .config`" ]; then
99 sed -i "s/^$MOD=./$MOD=n/" .config
101 error "$MOD not found in .config"
108 check_new_modules() {
109 ALL_MODULES="`awk '/\=[ynm]/ && sub("=[ynm]","")' .config`"
112 for M in $ALL_MODULES; do
114 for m in $modules_static $modules_dynamic $modules_skip; do
115 if [ "$M" == "$m" -o "!$M" == "$m" ]; then
120 if [ "$found" == "0" ]; then
121 warning "$M not found in PKGBUILD variables"
125 if [ "$new_modules" != "0" ]; then