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