Sat, 31 Oct 2009 19:03:03 +0100
Use sqlite and new muc by default, enable debug, don't erase SQL files.
jabberd/jabberd.patch | file | annotate | diff | comparison | revisions | |
jabberd/jabberd.spec | file | annotate | diff | comparison | revisions | |
jabberd/rc.jabberd | file | annotate | diff | comparison | revisions |
1.1 --- a/jabberd/jabberd.patch Sat Oct 31 19:00:00 2009 +0100 1.2 +++ b/jabberd/jabberd.patch Sat Oct 31 19:03:03 2009 +0100 1.3 @@ -32,15 +32,6 @@ 1.4 1.5 <!-- Port to bind to, or 0 to disable unencrypted access to the 1.6 server (default: 5222) --> 1.7 -@@ -331,7 +329,7 @@ 1.8 - <path>@pkglibdir@</path> 1.9 - 1.10 - <!-- Backend module to use --> 1.11 -- <module>sqlite</module> 1.12 -+ <module>db</module> 1.13 - 1.14 - <!-- Available authentication mechanisms --> 1.15 - <mechanisms> 1.16 Index: etc/router.xml.dist.in 1.17 --- etc/router.xml.dist.in.orig 2009-06-30 11:38:16 +0200 1.18 +++ etc/router.xml.dist.in 2009-06-30 20:45:06 +0200 1.19 @@ -126,15 +117,6 @@ 1.20 1.21 <!-- If logging to file, this is the filename of the logfile --> 1.22 <!-- 1.23 -@@ -85,7 +85,7 @@ 1.24 - <path>@pkglibdir@</path> 1.25 - 1.26 - <!-- By default, we use the SQLite driver for all storage --> 1.27 -- <driver>sqlite</driver> 1.28 -+ <driver>db</driver> 1.29 - 1.30 - <!-- Its also possible to explicitly list alternate drivers for 1.31 - specific data types. --> 1.32 Index: sm/mod_iq_time.c 1.33 --- sm/mod_iq_time.c.orig 2009-06-30 11:38:15 +0200 1.34 +++ sm/mod_iq_time.c 2009-06-30 20:45:06 +0200 1.35 @@ -181,3 +163,33 @@ 1.36 1.37 #include <expat.h> 1.38 1.39 +Index: tools/jabberd.in 1.40 +--- tools/jabberd.in.orig 2009-10-31 17:51:42.857115000 +0100 1.41 ++++ tools/jabberd.in 2009-10-31 18:07:52.095812899 +0100 1.42 +@@ -63,7 +63,7 @@ 1.43 + 1.44 + 1.45 + #----------------------------------------------------------------------------- 1.46 +-# Setup the jobs: router, sm, c2s, s2s 1.47 ++# Setup the jobs: router, sm, c2s, s2s, mu-conference 1.48 + #----------------------------------------------------------------------------- 1.49 + $jobs{jabberd}->{prefix} = "JBRD"; 1.50 + 1.51 +@@ -83,12 +83,17 @@ 1.52 + $jobs{s2s}->{config} = "$config_dir/s2s.xml"; 1.53 + $jobs{s2s}->{prefix} = "S2S"; 1.54 + 1.55 ++$jobs{muc}->{cmd} = "$Bin/mu-conference"; 1.56 ++$jobs{muc}->{config} = "$config_dir/muc.xml"; 1.57 ++$jobs{muc}->{prefix} = "MUC"; 1.58 ++ 1.59 + if ($config eq "internal") 1.60 + { 1.61 + $programs[0] = ["router"]; 1.62 + $programs[1] = ["sm"]; 1.63 + $programs[2] = ["c2s"]; 1.64 + $programs[3] = ["s2s"]; 1.65 ++ $programs[4] = ["muc"]; 1.66 + } 1.67 + else 1.68 + {
2.1 --- a/jabberd/jabberd.spec Sat Oct 31 19:00:00 2009 +0100 2.2 +++ b/jabberd/jabberd.spec Sat Oct 31 19:03:03 2009 +0100 2.3 @@ -24,6 +24,7 @@ 2.4 # package version 2.5 %define V_major 2.2 2.6 %define V_minor 9 2.7 +%define V_mucon 0.8 2.8 2.9 # package information 2.10 Name: jabberd 2.11 @@ -36,17 +37,19 @@ 2.12 Group: InstantMessaging 2.13 License: JOSL/GPL 2.14 Version: %{V_major}.%{V_minor} 2.15 -Release: 20090707 2.16 +Release: 20091028 2.17 2.18 # package options 2.19 -%option with_sqlite no 2.20 +%option with_mucon yes 2.21 +%option with_sqlite yes 2.22 %option with_mysql no 2.23 %option with_pgsql no 2.24 %option with_pam no 2.25 2.26 # list of sources 2.27 Source0: http://codex.xiaoka.com/pub/jabberd2/releases/jabberd-%{version}.tar.gz 2.28 -Source1: rc.jabberd 2.29 +Source1: http://download.gna.org/mu-conference/mu-conference_%{V_mucon}.tar.gz 2.30 +Source2: rc.jabberd 2.31 Patch0: jabberd.patch 2.32 2.33 # build information 2.34 @@ -56,6 +59,10 @@ 2.35 PreReq: OpenPKG, openpkg >= 20060823, perl 2.36 BuildPreReq: db, expat, libiconv, libidn, gpg-error, gcrypt, libgsasl, openssl, udns 2.37 PreReq: db, expat, libiconv, libidn, gpg-error, gcrypt, libgsasl, openssl, udns 2.38 +%if "%{with_mucon}" == "yes" 2.39 +BuildPreReq: glib2 2.40 +PreReq: glib2 2.41 +%endif 2.42 %if "%{with_sqlite}" == "yes" 2.43 BuildPreReq: sqlite 2.44 PreReq: sqlite 2.45 @@ -88,13 +95,40 @@ 2.46 url = http://codex.xiaoka.com/pub/jabberd2/releases/ 2.47 regex = jabberd-(\d+\.\d+(\.\d+)*)\.tar\.gz 2.48 } 2.49 + prog jabberd:mucon = { 2.50 + version = %{V_mucon} 2.51 + url = http://download.gna.org/mu-conference/ 2.52 + regex = mu-conference_(__VER__)\.tar\.gz 2.53 + } 2.54 2.55 %prep 2.56 %setup -q -n jabberd-%{version} 2.57 + %setup -q -D -T -a 1 2.58 %{l_sed} <%{PATCH0} -e 's;@l_prefix@;%{l_prefix};g' | %{l_patch} -p0 -b 2.59 %{l_shtool} subst \ 2.60 -e 's;exec perl;exec %{l_prefix}/bin/perl;' \ 2.61 tools/jabberd.in 2.62 +%if "%{with_mucon}" == "yes" 2.63 + %{l_shtool} subst \ 2.64 + -e 's;^\(CFLAGS\ *:=.*pkg-config --cflags glib-2.0\);\1 libidn;' \ 2.65 + -e 's;^\(LIBS\ *:=.*\);\1 $(LOCLIBS);' \ 2.66 + mu-conference_%{V_mucon}/src/Makefile 2.67 + %{l_shtool} subst \ 2.68 + -e 's;mu-conference.log;muc.log;g' \ 2.69 + mu-conference_%{V_mucon}/src/jcomp/jcr_log.c 2.70 + %{l_shtool} subst \ 2.71 + -e 's;<port>[0-9][0-9]*</port>;<port>5347</port>;' \ 2.72 + -e 's;<spool>.*</spool>;<spool>%{l_prefix}/var/jabberd/spool/rooms</spool>;' \ 2.73 + -e 's;<logdir>\./syslogs</logdir>;<logdir>%{l_prefix}/var/jabberd/log</logdir>;' \ 2.74 + -e 's;<logdir>\./logs/</logdir>;<logdir>%{l_prefix}/var/jabberd/spool/logs</logdir>;' \ 2.75 + -e 's;<pidfile>.*</pidfile>;<pidfile>%{l_prefix}/var/jabberd/pid/muc.pid</pidfile>;' \ 2.76 + -e 's;<URL>.*</URL>;<URL>http://name.host.tld/</URL>;' \ 2.77 + -e 's;<stylesheet>.*</stylesheet>;<stylesheet>%{l_prefix}/share/jabberd/style.css</stylesheet>;' \ 2.78 + mu-conference_%{V_mucon}/muc-default.xml 2.79 + echo \ 2.80 + 'muc @sysconfdir@/muc.xml' \ 2.81 + >>etc/jabberd.cfg.dist.in 2.82 +%endif 2.83 2.84 %build 2.85 # configure program 2.86 @@ -124,6 +158,7 @@ 2.87 --enable-fs \ 2.88 --enable-pipe \ 2.89 --enable-ssl \ 2.90 + --enable-debug \ 2.91 --with-sasl=gsasl \ 2.92 %if "%{with_sqlite}" == "yes" 2.93 --enable-sqlite \ 2.94 @@ -150,7 +185,19 @@ 2.95 --enable-shared 2.96 2.97 # build program 2.98 - %{l_make} %{l_mflags} 2.99 + %{l_make} %{l_mflags -O} 2.100 + 2.101 +%if "%{with_mucon}" == "yes" 2.102 + loclibs='' 2.103 + case "%{l_platform -t}" in 2.104 + *-sunos* ) 2.105 + loclibs='-lsocket -lnsl' 2.106 + ;; 2.107 + esac 2.108 + ( cd mu-conference_%{V_mucon} 2.109 + %{l_make} %{l_mflags -O} LOCLIBS=$loclibs 2.110 + ) || exit $? 2.111 +%endif 2.112 2.113 %install 2.114 # create installation filesystem structure 2.115 @@ -164,9 +211,29 @@ 2.116 $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/pid \ 2.117 $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/log 2.118 2.119 - # install components 2.120 + # install required components 2.121 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 2.122 2.123 + # install optional components 2.124 +%if "%{with_mucon}" == "yes" 2.125 + %{l_shtool} mkdir -f -p -m 755 \ 2.126 + $RPM_BUILD_ROOT%{l_prefix}/share/jabberd \ 2.127 + $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/spool/logs \ 2.128 + $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/spool/rooms 2.129 + %{l_shtool} install -c -m 644 \ 2.130 + mu-conference_%{V_mucon}/muc-default.xml \ 2.131 + $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/muc.xml 2.132 + %{l_shtool} install -c \ 2.133 + mu-conference_%{V_mucon}/src/mu-conference \ 2.134 + $RPM_BUILD_ROOT%{l_prefix}/bin/ 2.135 + %{l_shtool} install -c \ 2.136 + mu-conference_%{V_mucon}/style.css \ 2.137 + $RPM_BUILD_ROOT%{l_prefix}/share/jabberd 2.138 +%endif 2.139 + 2.140 + # strip installation 2.141 + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true 2.142 + 2.143 # remove unnecessary files 2.144 rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/*.dist 2.145 rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/templates/*.dist 2.146 @@ -174,6 +241,9 @@ 2.147 2.148 # install run-command script 2.149 %{l_shtool} install -c -m 755 %{l_value -s -a} \ 2.150 +%if "%{with_mucon}" == "yes" 2.151 + -e 's;\(jabberd_daemons\s*=.*\)\s\s*\(\w\w*\);\1 mucon\2;' \ 2.152 +%endif 2.153 %{SOURCE rc.jabberd} \ 2.154 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ 2.155 2.156 @@ -181,6 +251,7 @@ 2.157 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 2.158 %{l_files_std} \ 2.159 '%config %{l_prefix}/etc/jabberd/*' \ 2.160 + '%config %{l_prefix}/var/jabberd/db/*' \ 2.161 '%dir %attr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/jabberd' \ 2.162 '%dir %attr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/jabberd/*' 2.163
3.1 --- a/jabberd/rc.jabberd Sat Oct 31 19:00:00 2009 +0100 3.2 +++ b/jabberd/rc.jabberd Sat Oct 31 19:03:03 2009 +0100 3.3 @@ -6,7 +6,7 @@ 3.4 %config 3.5 jabberd_enable="$openpkg_rc_def" 3.6 jabberd_hostname=`hostname` 3.7 - jabberd_daemons="c2s resolver router s2s sm" 3.8 + jabberd_daemons="c2s router s2s sm" 3.9 jabberd_cfgfile="@l_prefix@/etc/jabberd/jabberd.cfg" 3.10 jabberd_log_prolog="true" 3.11 jabberd_log_epilog="true"