# HG changeset patch # User Michael Schloh von Bennewitz # Date 1346171440 -7200 # Node ID 869d6847b13e7d7a9186f8fad8b669d1f072b0c0 # Parent 6becb64fe77d81f5f7b203d9d3e5746381167045 Update version and new vendor, and reintroduce multiuser conference server. diff -r 6becb64fe77d -r 869d6847b13e jabberd/jabberd.patch --- a/jabberd/jabberd.patch Tue Aug 28 18:30:35 2012 +0200 +++ b/jabberd/jabberd.patch Tue Aug 28 18:30:40 2012 +0200 @@ -1,7 +1,8 @@ +diff -Nau etc/c2s.xml.dist.in.orig etc/c2s.xml.dist.in Index: etc/c2s.xml.dist.in ---- etc/c2s.xml.dist.in.orig 2009-06-30 11:38:16 +0200 -+++ etc/c2s.xml.dist.in 2009-06-30 20:45:22 +0200 -@@ -50,18 +50,16 @@ +--- etc/c2s.xml.dist.in.orig 2012-05-22 22:27:51.000000000 +0200 ++++ etc/c2s.xml.dist.in 2012-08-27 13:44:20.119445160 +0200 +@@ -50,13 +50,13 @@ @@ -17,14 +18,9 @@ + -- - - - -@@ -137,7 +135,7 @@ - --> + - 0.0.0.0 @@ -32,7 +28,7 @@ -@@ -331,7 +329,7 @@ +@@ -370,7 +370,7 @@ @pkglibdir@ @@ -41,11 +37,12 @@ +diff -Nau etc/router.xml.dist.in.orig etc/router.xml.dist.in Index: etc/router.xml.dist.in ---- etc/router.xml.dist.in.orig 2009-06-30 11:38:16 +0200 -+++ etc/router.xml.dist.in 2009-06-30 20:45:06 +0200 -@@ -8,24 +8,22 @@ - @localstatedir@/jabberd/pid/router.pid +--- etc/router.xml.dist.in.orig 2012-05-04 18:24:36.000000000 +0200 ++++ etc/router.xml.dist.in 2012-08-27 13:47:20.357743449 +0200 +@@ -8,13 +8,13 @@ + @localstatedir@/@package@/pid/router.pid - @@ -60,11 +57,8 @@ + -- - - + @@ -73,10 +67,11 @@ 5347 +diff -Nau etc/s2s.xml.dist.in.orig etc/s2s.xml.dist.in Index: etc/s2s.xml.dist.in ---- etc/s2s.xml.dist.in.orig 2009-06-30 11:38:16 +0200 -+++ etc/s2s.xml.dist.in 2009-06-30 20:45:06 +0200 -@@ -60,25 +60,23 @@ +--- etc/s2s.xml.dist.in.orig 2012-08-06 20:18:46.000000000 +0200 ++++ etc/s2s.xml.dist.in 2012-08-27 13:45:50.771011934 +0200 +@@ -60,13 +60,13 @@ @@ -92,12 +87,8 @@ + -- - - - + @@ -106,9 +97,10 @@ 5269 @@ -135,9 +127,10 @@ +diff -Nau sm/mod_iq_time.c.orig sm/mod_iq_time.c Index: sm/mod_iq_time.c ---- sm/mod_iq_time.c.orig 2009-06-30 11:38:15 +0200 -+++ sm/mod_iq_time.c 2009-06-30 20:45:06 +0200 +--- sm/mod_iq_time.c.orig 2011-10-22 21:56:00.000000000 +0200 ++++ sm/mod_iq_time.c 2012-08-27 13:41:59.773059371 +0200 @@ -39,6 +39,7 @@ static mod_ret_t _iq_time_pkt_sm(mod_instance_t mi, pkt_t pkt) { @@ -156,10 +149,11 @@ #else snprintf(buf, 64, "%+03d:%02d", (int) tm->tm_gmtoff/(60*60), (int) tm->tm_gmtoff%(60*60)); #endif +diff -Nau sm/mod_roster.c.orig sm/mod_roster.c Index: sm/mod_roster.c ---- sm/mod_roster.c.orig 2009-06-30 11:38:15 +0200 -+++ sm/mod_roster.c 2009-06-30 20:45:06 +0200 -@@ -635,6 +635,9 @@ +--- sm/mod_roster.c.orig 2012-02-12 22:36:18.000000000 +0100 ++++ sm/mod_roster.c 2012-08-27 13:41:59.773438877 +0200 +@@ -717,6 +717,9 @@ if(user->sessions == NULL) return mod_PASS; @@ -169,9 +163,10 @@ /* build a new packet to push out to everyone */ pkt = pkt_create(user->sm, "iq", "set", NULL, NULL); pkt_id_new(pkt); +diff -Nau util/util.h.orig util/util.h Index: util/util.h ---- util/util.h.orig 2009-06-30 11:38:16 +0200 -+++ util/util.h 2009-06-30 20:45:06 +0200 +--- util/util.h.orig 2012-08-22 08:03:58.000000000 +0200 ++++ util/util.h 2012-08-27 13:41:59.773719964 +0200 @@ -30,6 +30,8 @@ #include #include diff -r 6becb64fe77d -r 869d6847b13e jabberd/jabberd.spec --- a/jabberd/jabberd.spec Tue Aug 28 18:30:35 2012 +0200 +++ b/jabberd/jabberd.spec Tue Aug 28 18:30:40 2012 +0200 @@ -23,7 +23,8 @@ # package version %define V_major 2.2 -%define V_minor 14 +%define V_minor 17 +%define V_mucon 0.8 # package information Name: jabberd @@ -36,16 +37,18 @@ Group: InstantMessaging License: JOSL/GPL Version: %{V_major}.%{V_minor} -Release: 20110602 +Release: 20120800 # package options %option with_sqlite no %option with_mysql no %option with_pgsql no %option with_pam no +%option with_mucon yes # list of sources -Source0: http://codex.xiaoka.com/pub/jabberd2/releases/jabberd-%{version}.tar.gz +Source0: http://www.github.com/downloads/Jabberd2/jabberd2/jabberd-%{version}.tar.xz +Source1: http://download.gna.org/mu-conference/mu-conference_%{V_mucon}.tar.gz Source1: rc.jabberd Patch0: jabberd.patch @@ -70,6 +73,10 @@ BuildPreReq: PAM PreReq: PAM %endif +%if "%{with_mucon}" == "yes" +BuildPreReq: glib, pkgconfig +PreReq: glib +%endif %description JabberD is the original server implementation for the Jabber instant @@ -81,16 +88,45 @@ %track prog jabberd = { version = %{version} - url = http://codex.xiaoka.com/pub/jabberd2/releases/ - regex = jabberd-(\d+\.\d+(\.\d+)*)\.tar\.gz + url = http://www.github.com/downloads/Jabberd2/jabberd2/ + regex = jabberd-(\d+\.\d+(\.\d+)*)\.tar\.xz + } + prog jabberd:mucon = { + version = %{V_mucon} + url = http://download.gna.org/mu-conference/ + regex = mu-conference_(__VER__)\.tar\.gz } %prep %setup -q -n jabberd-%{version} - %{l_sed} <%{PATCH0} -e 's;@l_prefix@;%{l_prefix};g' | %{l_patch} -p0 -b + %setup -q -D -T -a 1 %{l_shtool} subst \ -e 's;exec perl;exec %{l_prefix}/bin/perl;' \ tools/jabberd.in + %{l_shtool} subst \ + -e 's;\$(initdir);;g' \ + etc/Makefile.in +%if "%{with_mucon}" == "yes" + %{l_shtool} subst \ + -e 's;^\(CFLAGS\ *:=.*pkg-config --cflags glib-2.0\);\1 libidn;' \ + -e 's;^\(LIBS\ *:=.*\);\1 $(LOCLIBS);' \ + mu-conference_%{V_mucon}/src/Makefile + %{l_shtool} subst \ + -e 's;mu-conference.log;muc.log;g' \ + mu-conference_%{V_mucon}/src/jcomp/jcr_log.c + %{l_shtool} subst \ + -e 's;[0-9][0-9]*;5347;' \ + -e 's;.*;%{l_prefix}/var/jabberd/spool/rooms;' \ + -e 's;\./syslogs;%{l_prefix}/var/jabberd/log;' \ + -e 's;\./logs/;%{l_prefix}/var/jabberd/spool/logs;' \ + -e 's;.*;%{l_prefix}/var/jabberd/pid/muc.pid;' \ + -e 's;.*;http://name.host.tld/;' \ + -e 's;.*;%{l_prefix}/share/jabberd/style.css;' \ + mu-conference_%{V_mucon}/muc-default.xml + echo \ + 'muc @sysconfdir@/muc.xml' \ + >>etc/jabberd.cfg.dist.in +%endif %build # configure program @@ -149,7 +185,19 @@ --enable-shared # build program - %{l_make} %{l_mflags} + %{l_make} %{l_mflags -O} + +%if "%{with_mucon}" == "yes" + loclibs='' + case "%{l_platform -t}" in + *-sunos* ) + loclibs='-lsocket -lnsl' + ;; + esac + ( cd mu-conference_%{V_mucon} + %{l_make} %{l_mflags -O} LOCLIBS=$loclibs + ) || exit $? +%endif %install # create installation filesystem structure @@ -165,13 +213,36 @@ # install components %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + # install optional components +%if "%{with_mucon}" == "yes" + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/share/jabberd \ + $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/spool/logs \ + $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/spool/rooms + %{l_shtool} install -c -m 644 \ + mu-conference_%{V_mucon}/muc-default.xml \ + $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/muc.xml + %{l_shtool} install -c \ + mu-conference_%{V_mucon}/src/mu-conference \ + $RPM_BUILD_ROOT%{l_prefix}/bin/ + %{l_shtool} install -c \ + mu-conference_%{V_mucon}/style.css \ + $RPM_BUILD_ROOT%{l_prefix}/share/jabberd +%endif + + # strip installation + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + # remove unnecessary files rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/*.dist rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/templates/*.dist rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/jabberd/*.a - # install run-command script + # install runcommand script %{l_shtool} install -c -m 755 %{l_value -s -a} \ +%if "%{with_mucon}" == "yes" + -e 's;\(jabberd_daemons\s*=.*\)\s\s*\(\w\w*\);\1 mucon\2;' \ +%endif %{SOURCE rc.jabberd} \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ diff -r 6becb64fe77d -r 869d6847b13e jabberd/rc.jabberd --- a/jabberd/rc.jabberd Tue Aug 28 18:30:35 2012 +0200 +++ b/jabberd/rc.jabberd Tue Aug 28 18:30:40 2012 +0200 @@ -6,7 +6,7 @@ %config jabberd_enable="$openpkg_rc_def" jabberd_hostname=`hostname` - jabberd_daemons="c2s resolver router s2s sm" + jabberd_daemons="c2s router s2s sm" jabberd_cfgfile="@l_prefix@/etc/jabberd/jabberd.cfg" jabberd_log_prolog="true" jabberd_log_epilog="true"