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 BuildRequires: asciidoc
22 BuildRequires: gnutls-devel
23 %{?with_otr:BuildRequires: libotr-devel >= 3.2.0}
24 %{?with_purple:BuildRequires: libpurple-devel}
25 BuildRequires: rpmbuild(macros) >= 1.461
26 BuildRequires: systemd-units
27 Requires(postun): /usr/sbin/groupdel
28 Requires(postun): /usr/sbin/userdel
29 Requires(pre): /bin/id
30 Requires(pre): /usr/bin/getgid
31 Requires(pre): /usr/sbin/groupadd
32 Requires(pre): /usr/sbin/useradd
33 Requires(post,preun,postun): systemd-units >= 38
34 Requires: systemd-units >= 38
35 Provides: group(bitlbee)
36 Provides: user(bitlbee)
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 Bitlbee is an IRC to other chat networks gateway. Bitlbee can be used
41 as an IRC server which forwards everything you say to people on other
42 chat networks like ICQ/AIM, MSN, XMPP/Jabber (including Google Talk),
45 %description -l pl.UTF-8
46 Bramka pomiędzy IRC-em i innymi sieciami komunikacyjnymi. Ten program
47 może być używany jako serwer IRC przekazujący wszystko co się mówi do
48 ludzi korzystających z innych sieci komunikacyjnych, takich jak
52 Summary: Development files for bitlbee
53 Group: Development/Libraries
54 Requires: %{name} = %{version}-%{release}
57 The bitlbee-devel package includes header files necessary for building
58 and developing programs and plugins which use bitlbee.
61 Summary: OTR plugin for bitlbee
63 Requires: %{name} = %{version}-%{release}
66 The bitlbee-otr package includes OTR plugin for bitlbee. Not
67 completely stable and not 100% foolproof so use at your own risk.
69 %package protocol-skype
70 Summary: Skype protocol support for bitlbee
72 Requires: %{name} = %{version}-%{release}
73 Requires: python-skype
75 %description protocol-skype
76 Skype protocol support for bitlbee.
84 # fix wrong assumption with $DESTDIR
85 %{__sed} -i -e 's,$(shell id -u),0,' Makefile
87 # fix #!%{_bindir}/env python -> #!%{__python}:
88 %{__sed} -i -e '1s,^#!.*python.*,#!%{__python},' protocols/skype/*.py
91 %{__sed} -i -e 's,/usr/local/etc/skyped,%{_sysconfdir}/skyped,' protocols/skype/*.py
94 CFLAGS="%{rpmcflags}" \
97 --bindir=%{_sbindir} \
98 --etcdir=%{_sysconfdir}/%{name} \
100 --datadir=%{_datadir}/%{name} \
101 --config=%{_localstatedir}/lib/%{name} \
102 --pcdir=%{_pkgconfigdir} \
103 --plugindir=%{_libdir}/%{name} \
118 rm -rf $RPM_BUILD_ROOT
119 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
120 %{__make} install install-dev install-etc install-systemd \
121 DESTDIR=$RPM_BUILD_ROOT
124 rm -rf $RPM_BUILD_ROOT
127 %groupadd -g 280 bitlbee
128 %useradd -u 280 -d /var/lib/bitlbee -g bitlbee -c "Bitlbee User" bitlbee
129 %systemd_post bitlbee.service
132 %systemd_preun bitlbee.service
135 if [ "$1" = "0" ]; then
142 %defattr(644,root,root,755)
143 %doc doc/{AUTHORS,CHANGES,CREDITS,FAQ,README} utils
144 %dir %attr(750,root,bitlbee) %{_sysconfdir}/%{name}
145 %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/bitlbee.conf
146 %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/motd.txt
147 %attr(755,root,root) %{_sbindir}/bitlbee
148 %{_mandir}/man5/bitlbee.conf.5*
149 %{_mandir}/man8/bitlbee.8*
151 %dir %{_libdir}/%{name}
152 %attr(770,root,bitlbee) %{_localstatedir}/lib/bitlbee
153 %{systemdunitdir}/bitlbee.service
154 %{systemdunitdir}/bitlbee.socket
155 %{systemdunitdir}/bitlbee@.service
158 %defattr(644,root,root,755)
159 %doc doc/example_plugin.c
160 %{_includedir}/%{name}
161 %{_pkgconfigdir}/%{name}.pc
165 %defattr(644,root,root,755)
166 %attr(755,root,root) %{_libdir}/%{name}/otr.so
169 %files protocol-skype
170 %defattr(644,root,root,755)
171 %doc protocols/skype/{HACKING,NEWS,README,skyped.txt}
172 %dir %attr(750,root,bitlbee) %{_sysconfdir}/skyped
173 %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/skyped/skyped.cnf
174 %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/skyped/skyped.conf
175 %attr(755,root,root) %{_libdir}/%{name}/skype.so
176 %attr(755,root,root) %{_sbindir}/skyped
177 %{_mandir}/man1/skyped.1*