]> git.pld-linux.org Git - packages/jabberd.git/blame - jabberd.spec
- updated to 2.3.6, tested with postgresql db
[packages/jabberd.git] / jabberd.spec
CommitLineData
891f342a 1#
348d001f 2# Conditional build
c942d35a
TP
3%bcond_without db # don't build db storage and authreg backends
4%bcond_without ldap # don't build ldap authreg backend
5%bcond_without mysql # don't build MySQL storage and authreg backends
6%bcond_without pgsql # don't build PostgreSQL storage and authreg backends
7%bcond_without sqlite # don't build SQLite v3 storage backend
5e18d8c5 8# allows limiting the number of offline messages stored per user (mysql storage)
9# and allows offline storage (queuing) of subscription requests and/or messages
10# to be disabled
e12a97ec 11%bcond_with bxmpp # - patches c2s to allow connections from Flash clients which don't use proper XMPP
12
4f2b5b0b 13%define skip_post_check_so mod_.*.so.0.0.0 libstorage.so.0.0.0
5282d2a7 14
c97879cb 15%include /usr/lib/rpm/macros.perl
07e127bc 16Summary: Jabber/XMPP server
90d7886c 17Summary(pl.UTF-8): Serwer Jabber/XMPP
07e127bc 18Name: jabberd
dbf65a43 19Version: 2.3.6
ac9c3733 20Release: 1
07e127bc
JK
21License: GPL
22Group: Applications/Communications
dbf65a43
BS
23Source0: https://github.com/jabberd2/jabberd2/releases/download/jabberd-%{version}/%{name}-%{version}.tar.xz
24# Source0-md5: e582cfbc77a6e443171c4a6931d707fd
1ba63c95
JK
25Source1: %{name}.init
26Source2: %{name}.sysconfig
07e127bc 27Patch0: %{name}-perlscript.patch
8c426eae
JK
28Patch1: %{name}-daemonize.patch
29Patch2: %{name}-default_config.patch
8c426eae
JK
30Patch4: %{name}-delay_jobs.patch
31Patch5: %{name}-binary_path.patch
df87453c 32Patch6: %{name}-reconnect.patch
e12a97ec 33#bcond bxmpp
de1cbcb0 34Patch22: http://www.marquard.net/jabber/patches/patch-flash-v2
dbf65a43 35URL: http://jabberd2.org/
c97879cb 36BuildRequires: autoconf
dbf65a43 37BuildRequires: autoconf-archive
c97879cb 38BuildRequires: automake
348d001f 39%{?with_db:BuildRequires: db-devel >= 4.1.24}
f3a89fef 40BuildRequires: expat-devel
e11a8e06 41BuildRequires: gettext-tools
b407d06c 42BuildRequires: gsasl-devel >= 0.2.28
fa345631 43BuildRequires: libidn-devel >= 0.3.0
c942d35a 44BuildRequires: libstdc++-devel
c97879cb 45BuildRequires: libtool
ffddf503 46%{?with_mysql:BuildRequires: mysql-devel}
db765d42 47%{?with_ldap:BuildRequires: openldap-devel}
227c9448 48BuildRequires: openssl-devel >= 0.9.6d
07e127bc 49BuildRequires: pam-devel
642dbe51 50%{?with_pgsql:BuildRequires: postgresql-devel}
6ce19c53 51BuildRequires: rpm-perlprov >= 3.0.3-16
b4669a57 52BuildRequires: rpmbuild(macros) >= 1.268
ecacb8a9 53%{?with_sqlite:BuildRequires: sqlite3-devel}
c942d35a 54BuildRequires: udns-devel
b4669a57 55Requires(post): sed >= 4.0
ecacb8a9 56Requires(post): textutils
891f342a
JB
57Requires(post,preun): /sbin/chkconfig
58Requires: jabber-common
ecacb8a9 59Requires: rc-scripts
4531e08f 60Obsoletes: jabber
07e127bc
JK
61BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63%description
64Modern open source Jabber server, implementing latest XMPP protocol.
65
cd9a8546
JR
66%description -l pl.UTF-8
67Nowoczesny, wolnodostępny serwer Jabbera implementujący najnowszy
68protokół XMPP.
891f342a 69
07e127bc 70%prep
047803aa 71%setup -q
07e127bc 72%patch0 -p1
1ba63c95
JK
73%patch1 -p1
74%patch2 -p1
4531e08f 75%patch4 -p1
3f5f0148 76%patch5 -p1
df87453c 77%patch6 -p1
e12a97ec 78
79%if %{with bxmpp}
d26d6d34 80%patch22 -p0
bb7afe2d 81%endif
a5fffa1d 82
07e127bc 83%build
f0440aa1 84#http://j2.openaether.org/bugzilla/show_bug.cgi?id=17
07e127bc 85%{__libtoolize}
076ba81e 86%{__aclocal}
07e127bc
JK
87%{__autoconf}
88%{__autoheader}
89%{__automake}
90%configure \
1ba63c95 91 --bindir="%{_libdir}/%{name}" \
db765d42 92 --sysconfdir="%{_sysconfdir}/jabber" \
94545cac 93 %{?with_db:--enable-db} \
533f35ba 94 %{?with_mysql:--enable-mysql} \
94545cac 95 %{?with_pgsql:--enable-pgsql} \
96 --enable-fs \
97 --enable-anon \
98 --enable-pipe \
99 --enable-pam \
100 %{?with_ldap:--enable-ldap} \
9b0c2259 101 %{?with_sqlite:--enable-sqlite} \
410e5bb6 102 %{?debug:--enable-debug}
07e127bc
JK
103
104%{__make}
105
106%install
107rm -rf $RPM_BUILD_ROOT
e674b6cf 108install -d $RPM_BUILD_ROOT{%{_sbindir},/var/lib/%{name}/{db,stats},/etc/{sysconfig,rc.d/init.d}}
dbf65a43 109install -d $RPM_BUILD_ROOT%{systemdunitdir}
07e127bc
JK
110
111%{__make} install \
1ba63c95 112 DESTDIR=$RPM_BUILD_ROOT
07e127bc 113
6feabb9c 114mv $RPM_BUILD_ROOT%{_libdir}/jabberd/jabberd $RPM_BUILD_ROOT%{_sbindir}
dbf65a43 115mv $RPM_BUILD_ROOT/usr/lib/systemd/system/* $RPM_BUILD_ROOT%{systemdunitdir}/
e674b6cf
ŁK
116%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/jabber{,/templates}/*.dist
117
118# drop Upstart configuration files
119%{__rm} -f $RPM_BUILD_ROOT%{_sysconfdir}/jabber/*.conf
120%{__rm} -f $RPM_BUILD_ROOT%{_prefix}/etc/init/*.conf
1ba63c95
JK
121
122install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
123install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
07e127bc
JK
124
125%clean
126rm -rf $RPM_BUILD_ROOT
127
07e127bc 128%post
b4669a57
ER
129if [ -f %{_sysconfdir}/jabber/secret ] ; then
130 SECRET=`cat %{_sysconfdir}/jabber/secret`
6ce19c53 131 if [ -n "$SECRET" ] ; then
891f342a 132 echo "Updating component authentication secret in Jabberd config files..."
b4669a57 133 %{__sed} -i -e "s/>secret</>$SECRET</" %{_sysconfdir}/jabber/*.xml
6ce19c53
JK
134 fi
135fi
136
1ba63c95 137/sbin/chkconfig --add jabberd
b4669a57 138%service jabberd restart "Jabber server"
dbf65a43 139%systemd_post jabberd.service
07e127bc 140
a5fffa1d 141%if %{with avatars}
50dc6c1c 142echo "This j2 package has new functionality, please read AVATARS file."
a5fffa1d 143%endif
6bd64d6d 144
07e127bc
JK
145%preun
146if [ "$1" = "0" ]; then
b4669a57 147 %service jabberd stop
1ba63c95 148 /sbin/chkconfig --del jabberd
07e127bc 149fi
dbf65a43
BS
150%systemd_preun jabberd.service
151
152%postun
153%systemd_reload
07e127bc 154
07e127bc
JK
155%files
156%defattr(644,root,root,755)
3cb45cd5 157%doc AUTHORS ChangeLog NEWS README TODO
dbf65a43 158%doc tools/{%{?with_mysql:db-*.mysql,}%{?with_pgsql:db-*.pgsql,}%{?with_sqlite:db-*.sqlite,}pipe-auth.pl}
076ba81e 159%attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/*.cfg
160%attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/*.xml
4531e08f 161%dir %{_sysconfdir}/jabber/templates
076ba81e 162%attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/templates/*.xml
6feabb9c 163%attr(755,root,root) %{_sbindir}/*
1ba63c95
JK
164%dir %{_libdir}/jabberd
165%attr(755,root,root) %{_libdir}/%{name}/*
6ce19c53
JK
166%dir %attr(770,root,jabber) /var/lib/%{name}
167%dir %attr(770,root,jabber) /var/lib/%{name}/db
c942d35a 168%dir %attr(770,root,jabber) /var/lib/%{name}/stats
1ba63c95 169%attr(754,root,root) /etc/rc.d/init.d/%{name}
076ba81e 170%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
07e127bc 171%{_mandir}/man*/*
dbf65a43
BS
172%{systemdunitdir}/jabberd-c2s.service
173%{systemdunitdir}/jabberd-router.service
174%{systemdunitdir}/jabberd-s2s.service
175%{systemdunitdir}/jabberd-sm.service
176%{systemdunitdir}/jabberd.service
This page took 0.1086 seconds and 4 git commands to generate.