35 Distribution: OpenPKG Community |
35 Distribution: OpenPKG Community |
36 Class: PLUS |
36 Class: PLUS |
37 Group: InstantMessaging |
37 Group: InstantMessaging |
38 License: JOSL/GPL |
38 License: JOSL/GPL |
39 Version: %{V_major}.%{V_minor} |
39 Version: %{V_major}.%{V_minor} |
40 Release: 20120800 |
40 Release: 20130000 |
41 |
41 |
42 # package options |
42 # package options |
43 %option with_sqlite yes |
43 %option with_sqlite yes |
44 %option with_mysql no |
44 %option with_mysql no |
45 %option with_pgsql no |
45 %option with_pgsql no |
46 %option with_pam no |
46 %option with_pam no |
47 %option with_mucon yes |
47 %option with_mucon yes |
48 |
48 |
49 # list of sources |
49 # list of sources |
50 Source0: http://www.github.com/downloads/Jabberd2/jabberd2/jabberd-%{version}.tar.xz |
50 Source0: http://www.github.com/downloads/Jabberd2/jabberd2/jabberd-%{version}.tar.xz |
51 Source1: http://download.gna.org/mu-conference/mu-conference_%{V_mucon}.tar.gz |
51 Source1: http://download.gna.org/mu-conference/mu-conference-%{V_mucon}.tar.gz |
52 Source1: rc.jabberd |
52 Source1: rc.jabberd |
53 Patch0: jabberd.patch |
53 Patch0: jabberd.patch |
54 |
54 |
55 # build information |
55 # build information |
56 BuildPreReq: OpenPKG, openpkg >= 20100101, make |
56 BuildPreReq: OpenPKG, openpkg >= 20100101, make |
81 %description |
81 %description |
82 JabberD is the original server implementation for the Jabber instant |
82 JabberD is the original server implementation for the Jabber instant |
83 messaging platform. JabberD 2 is the next generation of the JabberD |
83 messaging platform. JabberD 2 is the next generation of the JabberD |
84 server. It has been rewritten from the ground up to be scalable, |
84 server. It has been rewritten from the ground up to be scalable, |
85 architecturally sound, and to support the latest protocol extensions |
85 architecturally sound, and to support the latest protocol extensions |
86 coming out of the JSF. |
86 coming out of the XSF. |
87 |
87 |
88 %track |
88 %track |
89 prog jabberd = { |
89 prog jabberd = { |
90 version = %{version} |
90 version = %{version} |
91 url = http://www.github.com/downloads/Jabberd2/jabberd2/ |
91 url = http://www.github.com/downloads/Jabberd2/jabberd2/ |
92 regex = jabberd-(\d+\.\d+(\.\d+)*)\.tar\.xz |
92 regex = jabberd-(\d+\.\d+(\.\d+)*)\.tar\.xz |
93 } |
93 } |
94 prog jabberd:mucon = { |
94 prog jabberd:mucon = { |
95 version = %{V_mucon} |
95 version = %{V_mucon} |
96 url = http://download.gna.org/mu-conference/ |
96 url = http://download.gna.org/mu-conference/ |
97 regex = mu-conference_(__VER__)\.tar\.gz |
97 regex = mu-conference-(__VER__)\.tar\.gz |
98 } |
98 } |
99 |
99 |
100 %prep |
100 %prep |
101 %setup -q -n jabberd-%{version} |
101 %setup -q -n jabberd-%{version} |
102 %setup -q -D -T -a 1 |
102 %setup -q -D -T -a 1 |
109 etc/Makefile.in |
109 etc/Makefile.in |
110 %if "%{with_mucon}" == "yes" |
110 %if "%{with_mucon}" == "yes" |
111 %{l_shtool} subst \ |
111 %{l_shtool} subst \ |
112 -e 's;^\(CFLAGS\ *:=.*pkg-config --cflags glib-2.0\);\1 libidn;' \ |
112 -e 's;^\(CFLAGS\ *:=.*pkg-config --cflags glib-2.0\);\1 libidn;' \ |
113 -e 's;^\(LIBS\ *:=.*\);\1 $(LOCLIBS);' \ |
113 -e 's;^\(LIBS\ *:=.*\);\1 $(LOCLIBS);' \ |
114 mu-conference_%{V_mucon}/src/Makefile |
114 mu-conference-%{V_mucon}/src/Makefile |
115 %{l_shtool} subst \ |
115 %{l_shtool} subst \ |
116 -e 's;mu-conference.log;muc.log;g' \ |
116 -e 's;mu-conference.log;muc.log;g' \ |
117 mu-conference_%{V_mucon}/src/jcomp/jcr_log.c |
117 mu-conference-%{V_mucon}/src/jcomp/jcr_log.c |
118 %{l_shtool} subst \ |
118 %{l_shtool} subst \ |
119 -e 's;<port>[0-9][0-9]*</port>;<port>5347</port>;' \ |
119 -e 's;<port>[0-9][0-9]*</port>;<port>5347</port>;' \ |
120 -e 's;<spool>.*</spool>;<spool>%{l_prefix}/var/jabberd/spool/rooms</spool>;' \ |
120 -e 's;<spool>.*</spool>;<spool>%{l_prefix}/var/jabberd/spool/rooms</spool>;' \ |
121 -e 's;<logdir>\./syslogs</logdir>;<logdir>%{l_prefix}/var/jabberd/log</logdir>;' \ |
121 -e 's;<logdir>\./syslogs</logdir>;<logdir>%{l_prefix}/var/jabberd/log</logdir>;' \ |
122 -e 's;<logdir>\./logs/</logdir>;<logdir>%{l_prefix}/var/jabberd/spool/logs</logdir>;' \ |
122 -e 's;<logdir>\./logs/</logdir>;<logdir>%{l_prefix}/var/jabberd/spool/logs</logdir>;' \ |
123 -e 's;<pidfile>.*</pidfile>;<pidfile>%{l_prefix}/var/jabberd/pid/muc.pid</pidfile>;' \ |
123 -e 's;<pidfile>.*</pidfile>;<pidfile>%{l_prefix}/var/jabberd/pid/muc.pid</pidfile>;' \ |
124 -e 's;<URL>.*</URL>;<URL>http://name.host.tld/</URL>;' \ |
124 -e 's;<URL>.*</URL>;<URL>http://name.host.tld/</URL>;' \ |
125 -e 's;<stylesheet>.*</stylesheet>;<stylesheet>%{l_prefix}/share/jabberd/style.css</stylesheet>;' \ |
125 -e 's;<stylesheet>.*</stylesheet>;<stylesheet>%{l_prefix}/share/jabberd/style.css</stylesheet>;' \ |
126 mu-conference_%{V_mucon}/muc-default.xml |
126 mu-conference-%{V_mucon}/muc-default.xml |
127 echo \ |
127 echo \ |
128 'muc @sysconfdir@/muc.xml' \ |
128 'muc @sysconfdir@/muc.xml' \ |
129 >>etc/jabberd.cfg.dist.in |
129 >>etc/jabberd.cfg.dist.in |
130 %endif |
130 %endif |
131 |
131 |
186 --enable-shared |
186 --enable-shared |
187 |
187 |
188 # build program |
188 # build program |
189 %{l_make} %{l_mflags -O} |
189 %{l_make} %{l_mflags -O} |
190 |
190 |
191 %if "%{with_mucon}" == "yes" |
|
192 #http://www.suramya.com/linux/tutorials/JabberSetup/ |
191 #http://www.suramya.com/linux/tutorials/JabberSetup/ |
|
192 %if "%{with_mucon}" == "yes" |
193 loclibs='' |
193 loclibs='' |
194 case "%{l_platform -t}" in |
194 case "%{l_platform -t}" in |
195 *-sunos* ) |
195 *-sunos* ) |
196 loclibs='-lsocket -lnsl' |
196 loclibs='-lsocket -lnsl' |
197 ;; |
197 ;; |
198 esac |
198 esac |
199 ( cd mu-conference_%{V_mucon} |
199 ( cd mu-conference-%{V_mucon} |
200 %{l_make} %{l_mflags -O} LOCLIBS=$loclibs |
200 %{l_make} %{l_mflags -O} LOCLIBS=$loclibs |
201 ) || exit $? |
201 ) || exit $? |
202 %endif |
202 %endif |
203 |
203 |
204 %install |
204 %install |
220 %{l_shtool} mkdir -f -p -m 755 \ |
220 %{l_shtool} mkdir -f -p -m 755 \ |
221 $RPM_BUILD_ROOT%{l_prefix}/share/jabberd \ |
221 $RPM_BUILD_ROOT%{l_prefix}/share/jabberd \ |
222 $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/spool/logs \ |
222 $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/spool/logs \ |
223 $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/spool/rooms |
223 $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/spool/rooms |
224 %{l_shtool} install -c -m 644 \ |
224 %{l_shtool} install -c -m 644 \ |
225 mu-conference_%{V_mucon}/muc-default.xml \ |
225 mu-conference-%{V_mucon}/muc-default.xml \ |
226 $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/muc.xml |
226 $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/muc.xml |
227 %{l_shtool} install -c \ |
227 %{l_shtool} install -c \ |
228 mu-conference_%{V_mucon}/src/mu-conference \ |
228 mu-conference-%{V_mucon}/src/mu-conference \ |
229 $RPM_BUILD_ROOT%{l_prefix}/bin/ |
229 $RPM_BUILD_ROOT%{l_prefix}/bin/ |
230 %{l_shtool} install -c \ |
230 %{l_shtool} install -c \ |
231 mu-conference_%{V_mucon}/style.css \ |
231 mu-conference-%{V_mucon}/style.css \ |
232 $RPM_BUILD_ROOT%{l_prefix}/share/jabberd |
232 $RPM_BUILD_ROOT%{l_prefix}/share/jabberd |
233 %endif |
233 %endif |
234 |
234 |
235 # strip installation |
235 # strip installation |
236 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
236 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |