1 # qutIM smart builder system.
3 # Contributor: atommix aka Aleks Lifey <Aleks.Lifey@gmail.com> (mail and jid)
6 # Code for ImagePub and Yandex.Narod plugins writing by Alexander Kazarin <boiler@co.ru>
9 #qutim_include = install src/qutim/include/qutim to /usr/include/
10 builds=(qutim icq jabber !mrim qutim_include \
11 protocolicon imagepub yandexnarod weather)
13 #Read more herŠµ http://www.qutim.org/forum/viewtopic.php?f=30&t=698&p=8720#p8720
14 #only one parametr for crypt please
15 #plugin_jabber_param=([-DGNUTLS=1 || -DOpenSSL=1 || -DWinTLS=1] [-DZLib=1] [-DPhonon=1])
17 plugin_jabber_param=(-DGNUTLS=1 -DZLib=1)
19 #if 1 then true, if 0 then false
20 fully_stopping_building_if_error=0
22 #rm -rf $startdir/src/$_svnmod-build
25 pkgname=qutim-svn-archangel
28 pkgdesc="Multiplatform instant messenger, with plugin system. Currently support ICQ, Jabber, MRIM and other additional plugins"
29 arch=('i686' 'x86_64')
30 url="http://qutim.org"
32 makedepends=('subversion' 'cmake' 'qt' 'wget' 'tar' 'bzip2' 'gzip')
34 conflicts=('qutim' 'qutim-svn')
35 provides=('qutim' 'qutim-svn')
39 _svntrunk=http://qutim.org/svn/qutim
46 remove_src_build_func()
48 if [[ "$remove_src_build" = "1" ]]; then
49 rm -rf $startdir/src/$_svnmod-build
55 #everythig first. else trouble.
58 if [[ "$fully_stopping_building_if_error" = "1" ]]; then
59 echo "exceptions_func(): $1 $2 $s #######################################"
60 echo "exceptions_func(): fully_stopping_building_if_error = 1 #######################################"
63 echo "exceptions_func(): $1 $2 $s #######################################"
64 exceptions[${#exceptions[@]}]="$1"
65 exceptions[${#exceptions[@]}]="$2"
66 exceptions[${#exceptions[@]}]="$s"
69 exceptions_result_func()
71 if [[ "${#exceptions[@]}" > "0" ]]; then
72 echo "exceptions_result_func():"
73 echo "WARNING! EXCEPTIONS ########################################"
75 for ((i=0; i<${#exceptions[@]}; i+=3))
77 #name (qutim, icq, jabber, mrim)
83 echo " $s <$s1> return error $s2"
86 echo "WARNING! EXCEPTIONS ########################################"
92 for i in "${builds[@]}"
94 if [[ ${i:0:1} != "!" ]]; then
95 echo "update_func(): $i +++++++++++++++++++++++++++++++++++++++++"
99 svn co http://qutim.org/svn/$i || exceptions_func $i "svn"
102 cd $startdir/src/$_svnmod/plugins || exceptions_func $i "cd"
103 svn co http://qutim.org/svn/$i || exceptions_func $i "svn"
106 cd $startdir/src/$_svnmod/plugins || exceptions_func $i "cd"
107 svn co http://qutim.org/svn/$i/trunk mrim || exceptions_func $i "svn"
110 cd $startdir/src/$_svnmod/plugins || exceptions_func $i "cd"
111 wget -O $i.tar.bz2 http://qutim.org/downloads/$i.tar.bz2 || exceptions_func $i "wget"
112 tar jxvf $i.tar.bz2 || exceptions_func $i "tar"
114 imagepub | yandexnarod)
115 cd $startdir/src/$_svnmod/plugins || exceptions_func $i "cd"
116 wget -O $i.tar.gz http://boiler.co.ru/qutim/$i.tar.gz || exceptions_func $i "wget"
117 tar zxvf $i.tar.gz || exceptions_func $i "tar"
120 cd $startdir/src/$_svnmod/plugins || exceptions_func $i "cd"
121 wget -O $i.tar http://deltaz.ru/sites/default/files/archive.tar || exceptions_func $i "wget"
122 tar xvf $i.tar || exceptions_func $i "tar"
130 for i in "${builds[@]}"
132 if [[ ${i:0:1} != "!" ]]; then
133 echo "build_func(): $i +++++++++++++++++++++++++++++++++++++++++"
137 cmake . || exceptions_func $i "cmake"
138 make || exceptions_func $i "make"
140 icq | mrim | imagepub | yandexnarod | protocolicon | weather)
141 cd $startdir/src/$_svnmod-build/plugins/$i
142 qmake || exceptions_func $i "qmake"
143 make || exceptions_func $i "make"
146 cd $startdir/src/$_svnmod-build/plugins/$i
147 echo "cmake ${plugin_jabber_param[@]} ."
148 cmake ${plugin_jabber_param[@]} . || exceptions_func $i "cmake"
149 make || exceptions_func $i "make"
157 for i in "${builds[@]}"
159 if [[ ${i:0:1} != "!" ]]; then
160 echo "install_func(): $i +++++++++++++++++++++++++++++++++++++++++"
165 $startdir/src/$_svnmod-build/$i \
166 $pkgdir/usr/bin/$i || exceptions_func $i "install"
170 $startdir/src/$_svnmod-build/plugins/lib$i.so \
171 $pkgdir/usr/lib/$_svnmod/lib$i.so || exceptions_func $i "install"
175 $startdir/src/$_svnmod-build/plugins/$i/lib$i.so \
176 $pkgdir/usr/lib/$_svnmod/lib$i.so || exceptions_func $i "install"
180 $startdir/src/$_svnmod-build/include/qutim \
181 $pkgdir/usr/include/$_svnmod || exceptions_func $i "install_dir"
183 $startdir/src/$_svnmod-build/include/qutim/*.h \
184 $pkgdir/usr/include/$_svnmod/ || exceptions_func $i "install_files"
186 imagepub | yandexnarod | protocolicon | weather)
188 $startdir/src/$_svnmod-build/plugins/lib$i.so \
189 $pkgdir/usr/lib/$_svnmod/lib$i.so || exceptions_func $i "install"
196 msg "Getting sources from SVN..."
200 remove_src_build_func
202 cp -rf $startdir/src/$_svnmod $startdir/src/$_svnmod-build
203 cd $startdir/src/$_svnmod-build
204 msg "SVN checkout done or server timeout"
205 msg "Starting make..."
210 exceptions_result_func
212 mkdir -p $pkgdir/usr/share/pixmaps
213 cp $startdir/src/$_svnmod-build/icons/qutim_64.png $pkgdir/usr/share/pixmaps/qutim.png
215 mkdir -p $pkgdir/usr/share/applications
217 echo "[Desktop Entry]
223 Icon=/usr/share/pixmaps/qutim.png
224 Categories=Application;Network;" > $pkgdir/usr/share/applications/qutim.desktop
226 remove_src_build_func