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