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