34 Distribution: OpenPKG Community |
35 Distribution: OpenPKG Community |
35 Class: PLUS |
36 Class: PLUS |
36 Group: InstantMessaging |
37 Group: InstantMessaging |
37 License: JOSL/GPL |
38 License: JOSL/GPL |
38 Version: %{V_major}.%{V_minor} |
39 Version: %{V_major}.%{V_minor} |
39 Release: 20110602 |
40 Release: 20120800 |
40 |
41 |
41 # package options |
42 # package options |
42 %option with_sqlite no |
43 %option with_sqlite no |
43 %option with_mysql no |
44 %option with_mysql no |
44 %option with_pgsql no |
45 %option with_pgsql no |
45 %option with_pam no |
46 %option with_pam no |
|
47 %option with_mucon yes |
46 |
48 |
47 # list of sources |
49 # list of sources |
48 Source0: http://codex.xiaoka.com/pub/jabberd2/releases/jabberd-%{version}.tar.gz |
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 |
49 Source1: rc.jabberd |
52 Source1: rc.jabberd |
50 Patch0: jabberd.patch |
53 Patch0: jabberd.patch |
51 |
54 |
52 # build information |
55 # build information |
53 BuildPreReq: OpenPKG, openpkg >= 20100101, make |
56 BuildPreReq: OpenPKG, openpkg >= 20100101, make |
68 %endif |
71 %endif |
69 %if "%{with_pam}" == "yes" |
72 %if "%{with_pam}" == "yes" |
70 BuildPreReq: PAM |
73 BuildPreReq: PAM |
71 PreReq: PAM |
74 PreReq: PAM |
72 %endif |
75 %endif |
|
76 %if "%{with_mucon}" == "yes" |
|
77 BuildPreReq: glib, pkgconfig |
|
78 PreReq: glib |
|
79 %endif |
73 |
80 |
74 %description |
81 %description |
75 JabberD is the original server implementation for the Jabber instant |
82 JabberD is the original server implementation for the Jabber instant |
76 messaging platform. JabberD 2 is the next generation of the JabberD |
83 messaging platform. JabberD 2 is the next generation of the JabberD |
77 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, |
79 coming out of the JSF. |
86 coming out of the JSF. |
80 |
87 |
81 %track |
88 %track |
82 prog jabberd = { |
89 prog jabberd = { |
83 version = %{version} |
90 version = %{version} |
84 url = http://codex.xiaoka.com/pub/jabberd2/releases/ |
91 url = http://www.github.com/downloads/Jabberd2/jabberd2/ |
85 regex = jabberd-(\d+\.\d+(\.\d+)*)\.tar\.gz |
92 regex = jabberd-(\d+\.\d+(\.\d+)*)\.tar\.xz |
|
93 } |
|
94 prog jabberd:mucon = { |
|
95 version = %{V_mucon} |
|
96 url = http://download.gna.org/mu-conference/ |
|
97 regex = mu-conference_(__VER__)\.tar\.gz |
86 } |
98 } |
87 |
99 |
88 %prep |
100 %prep |
89 %setup -q -n jabberd-%{version} |
101 %setup -q -n jabberd-%{version} |
90 %{l_sed} <%{PATCH0} -e 's;@l_prefix@;%{l_prefix};g' | %{l_patch} -p0 -b |
102 %setup -q -D -T -a 1 |
91 %{l_shtool} subst \ |
103 %{l_shtool} subst \ |
92 -e 's;exec perl;exec %{l_prefix}/bin/perl;' \ |
104 -e 's;exec perl;exec %{l_prefix}/bin/perl;' \ |
93 tools/jabberd.in |
105 tools/jabberd.in |
|
106 %{l_shtool} subst \ |
|
107 -e 's;\$(initdir);;g' \ |
|
108 etc/Makefile.in |
|
109 %if "%{with_mucon}" == "yes" |
|
110 %{l_shtool} subst \ |
|
111 -e 's;^\(CFLAGS\ *:=.*pkg-config --cflags glib-2.0\);\1 libidn;' \ |
|
112 -e 's;^\(LIBS\ *:=.*\);\1 $(LOCLIBS);' \ |
|
113 mu-conference_%{V_mucon}/src/Makefile |
|
114 %{l_shtool} subst \ |
|
115 -e 's;mu-conference.log;muc.log;g' \ |
|
116 mu-conference_%{V_mucon}/src/jcomp/jcr_log.c |
|
117 %{l_shtool} subst \ |
|
118 -e 's;<port>[0-9][0-9]*</port>;<port>5347</port>;' \ |
|
119 -e 's;<spool>.*</spool>;<spool>%{l_prefix}/var/jabberd/spool/rooms</spool>;' \ |
|
120 -e 's;<logdir>\./syslogs</logdir>;<logdir>%{l_prefix}/var/jabberd/log</logdir>;' \ |
|
121 -e 's;<logdir>\./logs/</logdir>;<logdir>%{l_prefix}/var/jabberd/spool/logs</logdir>;' \ |
|
122 -e 's;<pidfile>.*</pidfile>;<pidfile>%{l_prefix}/var/jabberd/pid/muc.pid</pidfile>;' \ |
|
123 -e 's;<URL>.*</URL>;<URL>http://name.host.tld/</URL>;' \ |
|
124 -e 's;<stylesheet>.*</stylesheet>;<stylesheet>%{l_prefix}/share/jabberd/style.css</stylesheet>;' \ |
|
125 mu-conference_%{V_mucon}/muc-default.xml |
|
126 echo \ |
|
127 'muc @sysconfdir@/muc.xml' \ |
|
128 >>etc/jabberd.cfg.dist.in |
|
129 %endif |
94 |
130 |
95 %build |
131 %build |
96 # configure program |
132 # configure program |
97 ( echo "ac_cv_func_kqueue=no" |
133 ( echo "ac_cv_func_kqueue=no" |
98 ) >config.cache |
134 ) >config.cache |
147 --disable-oracle \ |
183 --disable-oracle \ |
148 --enable-static \ |
184 --enable-static \ |
149 --enable-shared |
185 --enable-shared |
150 |
186 |
151 # build program |
187 # build program |
152 %{l_make} %{l_mflags} |
188 %{l_make} %{l_mflags -O} |
|
189 |
|
190 %if "%{with_mucon}" == "yes" |
|
191 loclibs='' |
|
192 case "%{l_platform -t}" in |
|
193 *-sunos* ) |
|
194 loclibs='-lsocket -lnsl' |
|
195 ;; |
|
196 esac |
|
197 ( cd mu-conference_%{V_mucon} |
|
198 %{l_make} %{l_mflags -O} LOCLIBS=$loclibs |
|
199 ) || exit $? |
|
200 %endif |
153 |
201 |
154 %install |
202 %install |
155 # create installation filesystem structure |
203 # create installation filesystem structure |
156 %{l_shtool} mkdir -f -p -m 755 \ |
204 %{l_shtool} mkdir -f -p -m 755 \ |
157 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \ |
205 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \ |
163 $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/log |
211 $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/log |
164 |
212 |
165 # install components |
213 # install components |
166 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
214 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
167 |
215 |
|
216 # install optional components |
|
217 %if "%{with_mucon}" == "yes" |
|
218 %{l_shtool} mkdir -f -p -m 755 \ |
|
219 $RPM_BUILD_ROOT%{l_prefix}/share/jabberd \ |
|
220 $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/spool/logs \ |
|
221 $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/spool/rooms |
|
222 %{l_shtool} install -c -m 644 \ |
|
223 mu-conference_%{V_mucon}/muc-default.xml \ |
|
224 $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/muc.xml |
|
225 %{l_shtool} install -c \ |
|
226 mu-conference_%{V_mucon}/src/mu-conference \ |
|
227 $RPM_BUILD_ROOT%{l_prefix}/bin/ |
|
228 %{l_shtool} install -c \ |
|
229 mu-conference_%{V_mucon}/style.css \ |
|
230 $RPM_BUILD_ROOT%{l_prefix}/share/jabberd |
|
231 %endif |
|
232 |
|
233 # strip installation |
|
234 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
|
235 |
168 # remove unnecessary files |
236 # remove unnecessary files |
169 rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/*.dist |
237 rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/*.dist |
170 rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/templates/*.dist |
238 rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/templates/*.dist |
171 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/jabberd/*.a |
239 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/jabberd/*.a |
172 |
240 |
173 # install run-command script |
241 # install runcommand script |
174 %{l_shtool} install -c -m 755 %{l_value -s -a} \ |
242 %{l_shtool} install -c -m 755 %{l_value -s -a} \ |
|
243 %if "%{with_mucon}" == "yes" |
|
244 -e 's;\(jabberd_daemons\s*=.*\)\s\s*\(\w\w*\);\1 mucon\2;' \ |
|
245 %endif |
175 %{SOURCE rc.jabberd} \ |
246 %{SOURCE rc.jabberd} \ |
176 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
247 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
177 |
248 |
178 # determine installation files |
249 # determine installation files |
179 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
250 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |