5 %bcond_without otr # build without OTR
6 %bcond_with purple # build with libpurple (not recommended for public servers). http://wiki.bitlbee.org/HowtoPurple
8 Summary: An IRC to other chat networks gateway
9 Summary(pl.UTF-8): Bramka pomiędzy IRC-em i innymi sieciami komunikacyjnymi
13 License: GPL v2+ and MIT
15 Source0: http://get.bitlbee.org/src/%{name}-%{version}.tar.gz
16 # Source0-md5: 9ff97260a2a7f3a7d102db158a8d9887
17 URL: http://www.bitlbee.org/
20 Patch2: skyped-FD_CLOEXEC.patch
21 Patch3: skype-no-groups.patch
22 BuildRequires: asciidoc
23 BuildRequires: gnutls-devel
24 %{?with_otr:BuildRequires: libotr-devel >= 3.2.0}
25 %{?with_purple:BuildRequires: libpurple-devel}
26 BuildRequires: rpmbuild(macros) >= 1.461
27 BuildRequires: systemd-units
28 Requires(postun): /usr/sbin/groupdel
29 Requires(postun): /usr/sbin/userdel
30 Requires(pre): /bin/id
31 Requires(pre): /usr/bin/getgid
32 Requires(pre): /usr/sbin/groupadd
33 Requires(pre): /usr/sbin/useradd
34 Requires(post,preun,postun): systemd-units >= 38
35 Requires: systemd-units >= 38
36 Provides: group(bitlbee)
37 Provides: user(bitlbee)
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 Bitlbee is an IRC to other chat networks gateway. Bitlbee can be used
42 as an IRC server which forwards everything you say to people on other
43 chat networks like ICQ/AIM, MSN, XMPP/Jabber (including Google Talk),
46 %description -l pl.UTF-8
47 Bramka pomiędzy IRC-em i innymi sieciami komunikacyjnymi. Ten program
48 może być używany jako serwer IRC przekazujący wszystko co się mówi do
49 ludzi korzystających z innych sieci komunikacyjnych, takich jak
53 Summary: Development files for bitlbee
54 Group: Development/Libraries
55 Requires: %{name} = %{version}-%{release}
58 The bitlbee-devel package includes header files necessary for building
59 and developing programs and plugins which use bitlbee.
62 Summary: OTR plugin for bitlbee
64 Requires: %{name} = %{version}-%{release}
67 The bitlbee-otr package includes OTR plugin for bitlbee. Not
68 completely stable and not 100% foolproof so use at your own risk.
70 %package protocol-skype
71 Summary: Skype protocol support for bitlbee
73 Requires: %{name} = %{version}-%{release}
74 Requires: python-skype
76 %description protocol-skype
77 Skype protocol support for bitlbee.
86 # fix wrong assumption with $DESTDIR
87 %{__sed} -i -e 's,$(shell id -u),0,' Makefile
89 # fix #!%{_bindir}/env python -> #!%{__python}:
90 %{__sed} -i -e '1s,^#!.*python.*,#!%{__python},' protocols/skype/*.py
93 %{__sed} -i -e 's,/usr/local/etc/skyped,%{_sysconfdir}/skyped,' protocols/skype/*.py
96 CFLAGS="%{rpmcflags}" \
99 --bindir=%{_sbindir} \
100 --etcdir=%{_sysconfdir}/%{name} \
101 --mandir=%{_mandir} \
102 --datadir=%{_datadir}/%{name} \
103 --config=%{_localstatedir}/lib/%{name} \
104 --pcdir=%{_pkgconfigdir} \
105 --plugindir=%{_libdir}/%{name} \
120 rm -rf $RPM_BUILD_ROOT
121 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
122 %{__make} install install-dev install-etc install-systemd \
123 DESTDIR=$RPM_BUILD_ROOT
126 rm -rf $RPM_BUILD_ROOT
129 %groupadd -g 280 bitlbee
130 %useradd -u 280 -d /var/lib/bitlbee -g bitlbee -c "Bitlbee User" bitlbee
131 %systemd_post bitlbee.service
134 %systemd_preun bitlbee.service
137 if [ "$1" = "0" ]; then
144 %defattr(644,root,root,755)
145 %doc doc/{AUTHORS,CHANGES,CREDITS,FAQ,README} utils
146 %dir %attr(750,root,bitlbee) %{_sysconfdir}/%{name}
147 %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/bitlbee.conf
148 %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/motd.txt
149 %attr(755,root,root) %{_sbindir}/bitlbee
150 %{_mandir}/man5/bitlbee.conf.5*
151 %{_mandir}/man8/bitlbee.8*
153 %dir %{_libdir}/%{name}
154 %attr(770,root,bitlbee) %{_localstatedir}/lib/bitlbee
155 %{systemdunitdir}/bitlbee.service
156 %{systemdunitdir}/bitlbee.socket
157 %{systemdunitdir}/bitlbee@.service
160 %defattr(644,root,root,755)
161 %doc doc/example_plugin.c
162 %{_includedir}/%{name}
163 %{_pkgconfigdir}/%{name}.pc
167 %defattr(644,root,root,755)
168 %attr(755,root,root) %{_libdir}/%{name}/otr.so
171 %files protocol-skype
172 %defattr(644,root,root,755)
173 %doc protocols/skype/{HACKING,NEWS,README,skyped.txt}
174 %dir %attr(750,root,bitlbee) %{_sysconfdir}/skyped
175 %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/skyped/skyped.cnf
176 %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/skyped/skyped.conf
177 %attr(755,root,root) %{_libdir}/%{name}/skype.so
178 %attr(755,root,root) %{_sbindir}/skyped
179 %{_mandir}/man1/skyped.1*