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