]>
Commit | Line | Data |
---|---|---|
b8f37917 ER |
1 | # TODO |
2 | # - sync pl | |
b8f37917 ER |
3 | # |
4 | # Conditional build: | |
5 | %bcond_without otr # build without OTR | |
ac1568af | 6 | %bcond_with purple # build with libpurple (not recommended for public servers). http://wiki.bitlbee.org/HowtoPurple |
b8f37917 | 7 | |
762288ea | 8 | Summary: An IRC to other chat networks gateway |
e2723aba | 9 | Summary(pl.UTF-8): Bramka pomiędzy IRC-em i innymi sieciami komunikacyjnymi |
762288ea | 10 | Name: bitlbee |
b8f37917 | 11 | Version: 3.0.5 |
ac1568af | 12 | Release: 0.13 |
b8f37917 | 13 | License: GPL v2+ and MIT |
762288ea | 14 | Group: Daemons |
762288ea | 15 | Source0: http://get.bitlbee.org/src/%{name}-%{version}.tar.gz |
b8f37917 | 16 | # Source0-md5: 9ff97260a2a7f3a7d102db158a8d9887 |
1b994aca | 17 | URL: http://www.bitlbee.org/ |
23eb96be | 18 | Patch0: config.patch |
31b34380 | 19 | Patch1: systemd.patch |
f5618a74 | 20 | BuildRequires: asciidoc |
1b994aca | 21 | BuildRequires: gnutls-devel |
b8f37917 | 22 | %{?with_otr:BuildRequires: libotr-devel >= 3.2.0} |
ac1568af | 23 | %{?with_purple:BuildRequires: libpurple-devel} |
23eb96be | 24 | BuildRequires: rpmbuild(macros) >= 1.461 |
b8f37917 | 25 | BuildRequires: systemd-units |
23eb96be ER |
26 | Requires(postun): /usr/sbin/groupdel |
27 | Requires(postun): /usr/sbin/userdel | |
28 | Requires(pre): /bin/id | |
29 | Requires(pre): /usr/bin/getgid | |
30 | Requires(pre): /usr/sbin/groupadd | |
31 | Requires(pre): /usr/sbin/useradd | |
32 | Provides: group(bitlbee) | |
33 | Provides: user(bitlbee) | |
31b34380 | 34 | Requires: systemd-units >= 37-0.10 |
762288ea | 35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
37 | %description | |
b8f37917 ER |
38 | Bitlbee is an IRC to other chat networks gateway. Bitlbee can be used |
39 | as an IRC server which forwards everything you say to people on other | |
40 | chat networks like ICQ/AIM, MSN, XMPP/Jabber (including Google Talk), | |
41 | Yahoo or Twitter! | |
762288ea | 42 | |
6b82b92d JR |
43 | %description -l pl.UTF-8 |
44 | Bramka pomiędzy IRC-em i innymi sieciami komunikacyjnymi. Ten program | |
45 | może być używany jako serwer IRC przekazujący wszystko co się mówi do | |
46 | ludzi korzystających z innych sieci komunikacyjnych, takich jak | |
1b994aca JB |
47 | MSN/ICQ/Jabber. |
48 | ||
b8f37917 ER |
49 | %package devel |
50 | Summary: Development files for bitlbee | |
51 | Group: Development/Libraries | |
52 | Requires: %{name} = %{version}-%{release} | |
53 | ||
54 | %description devel | |
55 | The bitlbee-devel package includes header files necessary for building | |
56 | and developing programs and plugins which use bitlbee. | |
57 | ||
58 | %package otr | |
59 | Summary: OTR plugin for bitlbee | |
60 | Group: Daemons | |
61 | Requires: %{name} = %{version}-%{release} | |
62 | ||
63 | %description otr | |
64 | The bitlbee-otr package includes OTR plugin for bitlbee. Not | |
65 | completely stable and not 100% foolproof so use at your own risk. | |
66 | ||
f5618a74 ER |
67 | %package protocol-skype |
68 | Summary: Skype protocol support for bitlbee | |
69 | Group: Daemons | |
70 | Requires: %{name} = %{version}-%{release} | |
71 | Requires: python-skype | |
72 | ||
73 | %description protocol-skype | |
74 | Skype protocol support for bitlbee. | |
75 | ||
762288ea | 76 | %prep |
77 | %setup -q | |
23eb96be | 78 | %patch0 -p1 |
31b34380 | 79 | %patch1 -p1 |
762288ea | 80 | |
b8f37917 ER |
81 | # fix wrong assumption with $DESTDIR |
82 | %{__sed} -i -e 's,$(shell id -u),0,' Makefile | |
83 | ||
f5618a74 ER |
84 | # fix #!%{_bindir}/env python -> #!%{__python}: |
85 | %{__sed} -i -e '1s,^#!.*python.*,#!%{__python},' protocols/skype/*.py | |
86 | ||
87 | # fix config path | |
88 | %{__sed} -i -e 's,/usr/local/etc/skyped,%{_sysconfdir}/skyped,' protocols/skype/*.py | |
89 | ||
762288ea | 90 | %build |
b8f37917 | 91 | CFLAGS="%{rpmcflags}" \ |
762288ea | 92 | ./configure \ |
762288ea | 93 | --prefix=%{_prefix} \ |
b8f37917 ER |
94 | --bindir=%{_sbindir} \ |
95 | --etcdir=%{_sysconfdir}/%{name} \ | |
96 | --mandir=%{_mandir} \ | |
97 | --datadir=%{_datadir}/%{name} \ | |
98 | --config=%{_localstatedir}/lib/%{name} \ | |
99 | --pcdir=%{_pkgconfigdir} \ | |
100 | --plugindir=%{_libdir}/%{name} \ | |
101 | --strip=0 \ | |
102 | --plugins=1 \ | |
103 | --ssl=gnutls \ | |
ac1568af ER |
104 | %if %{with purple} |
105 | --purple=1 \ | |
106 | %endif | |
b8f37917 ER |
107 | %if %{with otr} |
108 | --otr=plugin \ | |
109 | %endif | |
f5618a74 | 110 | --skype=plugin \ |
f750a0e7 AG |
111 | |
112 | %{__make} | |
b8f37917 | 113 | |
762288ea | 114 | %install |
115 | rm -rf $RPM_BUILD_ROOT | |
b8f37917 | 116 | install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name} |
b8f37917 | 117 | %{__make} install install-dev install-etc install-systemd \ |
1b994aca | 118 | DESTDIR=$RPM_BUILD_ROOT |
762288ea | 119 | |
762288ea | 120 | %clean |
121 | rm -rf $RPM_BUILD_ROOT | |
122 | ||
23eb96be ER |
123 | %pre |
124 | %groupadd -g 280 bitlbee | |
125 | %useradd -u 280 -d /var/lib/bitlbee -g bitlbee -c "Bitlbee User" bitlbee | |
31b34380 ER |
126 | %systemd_post bitlbee.service |
127 | ||
128 | %preun | |
129 | %systemd_preun bitlbee.service | |
23eb96be ER |
130 | |
131 | %postun | |
132 | if [ "$1" = "0" ]; then | |
133 | %userremove bitlbee | |
134 | %groupremove bitlbee | |
135 | fi | |
31b34380 | 136 | %systemd_reload |
23eb96be | 137 | |
762288ea | 138 | %files |
139 | %defattr(644,root,root,755) | |
ac1568af | 140 | %doc doc/{AUTHORS,CHANGES,CREDITS,FAQ,README} utils |
23eb96be ER |
141 | %dir %attr(750,root,bitlbee) %{_sysconfdir}/%{name} |
142 | %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/bitlbee.conf | |
143 | %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/motd.txt | |
b8f37917 ER |
144 | %attr(755,root,root) %{_sbindir}/bitlbee |
145 | %{_mandir}/man5/bitlbee.conf.5* | |
146 | %{_mandir}/man8/bitlbee.8* | |
1b994aca | 147 | %{_datadir}/bitlbee |
f5618a74 | 148 | %dir %{_libdir}/%{name} |
23eb96be | 149 | %attr(770,root,bitlbee) %{_localstatedir}/lib/bitlbee |
b8f37917 ER |
150 | %{systemdunitdir}/bitlbee.service |
151 | %{systemdunitdir}/bitlbee.socket | |
152 | %{systemdunitdir}/bitlbee@.service | |
153 | ||
154 | %files devel | |
155 | %defattr(644,root,root,755) | |
156 | %doc doc/example_plugin.c | |
157 | %{_includedir}/%{name} | |
158 | %{_pkgconfigdir}/%{name}.pc | |
159 | ||
160 | %if %{with otr} | |
161 | %files otr | |
162 | %defattr(644,root,root,755) | |
163 | %attr(755,root,root) %{_libdir}/%{name}/otr.so | |
164 | %endif | |
f5618a74 ER |
165 | |
166 | %files protocol-skype | |
167 | %defattr(644,root,root,755) | |
168 | %doc protocols/skype/{HACKING,NEWS,README,skyped.txt} | |
23eb96be ER |
169 | %dir %attr(750,root,bitlbee) %{_sysconfdir}/skyped |
170 | %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/skyped/skyped.cnf | |
171 | %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/skyped/skyped.conf | |
f5618a74 ER |
172 | %attr(755,root,root) %{_libdir}/%{name}/skype.so |
173 | %attr(755,root,root) %{_sbindir}/skyped | |
174 | %{_mandir}/man1/skyped.1* |