]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - sync pl | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_with otr # build without OTR | |
6 | %bcond_with purple # build with libpurple (not recommended for public servers). http://wiki.bitlbee.org/HowtoPurple | |
7 | ||
8 | Summary: An IRC to other chat networks gateway | |
9 | Summary(pl.UTF-8): Bramka pomiędzy IRC-em i innymi sieciami komunikacyjnymi | |
10 | Name: bitlbee | |
11 | Version: 3.2 | |
12 | Release: 3 | |
13 | License: GPL v2+ and MIT | |
14 | Group: Daemons | |
15 | Source0: http://get.bitlbee.org/src/%{name}-%{version}.tar.gz | |
16 | # Source0-md5: 6a8fe98e96a47c636004a245075d5d7c | |
17 | URL: http://www.bitlbee.org/ | |
18 | Patch0: config.patch | |
19 | Patch1: systemd.patch | |
20 | Patch3: skype-no-groups.patch | |
21 | Patch4: skyped-transport.patch | |
22 | BuildRequires: asciidoc | |
23 | BuildRequires: glib2-devel >= 1:2.14 | |
24 | BuildRequires: gnutls-devel | |
25 | %{?with_otr:BuildRequires: libotr-devel >= 3.2.0} | |
26 | %{?with_purple:BuildRequires: libpurple-devel} | |
27 | BuildRequires: rpmbuild(macros) >= 1.461 | |
28 | BuildRequires: systemd-units | |
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 | |
35 | Requires(post,preun,postun): systemd-units >= 38 | |
36 | Requires: systemd-units >= 38 | |
37 | Provides: group(bitlbee) | |
38 | Provides: user(bitlbee) | |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
40 | ||
41 | %description | |
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! | |
46 | ||
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 | |
51 | MSN/ICQ/Jabber. | |
52 | ||
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 | ||
71 | %package protocol-skype | |
72 | Summary: Skype protocol support for bitlbee | |
73 | Group: Daemons | |
74 | Requires: %{name} = %{version}-%{release} | |
75 | Suggests: skyped | |
76 | ||
77 | %description protocol-skype | |
78 | Skype protocol support for bitlbee. | |
79 | ||
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 | ||
93 | %prep | |
94 | %setup -q | |
95 | %patch0 -p1 | |
96 | %patch1 -p1 | |
97 | %patch3 -p1 | |
98 | %patch4 -p1 | |
99 | ||
100 | # fix wrong assumption with $DESTDIR | |
101 | %{__sed} -i -e 's,$(shell id -u),0,' Makefile | |
102 | ||
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 | ||
109 | %build | |
110 | CFLAGS="%{rpmcflags}" \ | |
111 | ./configure \ | |
112 | --prefix=%{_prefix} \ | |
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 \ | |
123 | --pie=1 \ | |
124 | %if %{with purple} | |
125 | --purple=1 \ | |
126 | %endif | |
127 | %if %{with otr} | |
128 | --otr=plugin \ | |
129 | %endif | |
130 | --skype=plugin \ | |
131 | ||
132 | %{__make} | |
133 | ||
134 | %install | |
135 | rm -rf $RPM_BUILD_ROOT | |
136 | install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name} | |
137 | %{__make} install install-dev install-etc install-systemd \ | |
138 | DESTDIR=$RPM_BUILD_ROOT | |
139 | ||
140 | %clean | |
141 | rm -rf $RPM_BUILD_ROOT | |
142 | ||
143 | %pre | |
144 | %groupadd -g 280 bitlbee | |
145 | %useradd -u 280 -d /var/lib/bitlbee -g bitlbee -c "Bitlbee User" bitlbee | |
146 | %systemd_post bitlbee.service | |
147 | ||
148 | %preun | |
149 | %systemd_preun bitlbee.service | |
150 | ||
151 | %postun | |
152 | if [ "$1" = "0" ]; then | |
153 | %userremove bitlbee | |
154 | %groupremove bitlbee | |
155 | fi | |
156 | %systemd_reload | |
157 | ||
158 | %files | |
159 | %defattr(644,root,root,755) | |
160 | %doc doc/{AUTHORS,CHANGES,CREDITS,FAQ,README} utils | |
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 | |
164 | %attr(755,root,root) %{_sbindir}/bitlbee | |
165 | %{_mandir}/man5/bitlbee.conf.5* | |
166 | %{_mandir}/man8/bitlbee.8* | |
167 | %{_datadir}/bitlbee | |
168 | %dir %{_libdir}/%{name} | |
169 | %attr(770,root,bitlbee) %{_localstatedir}/lib/bitlbee | |
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 | |
185 | ||
186 | %files protocol-skype | |
187 | %defattr(644,root,root,755) | |
188 | %doc protocols/skype/{HACKING,NEWS,README} | |
189 | %attr(755,root,root) %{_libdir}/%{name}/skype.so | |
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 | |
197 | %attr(755,root,root) %{_sbindir}/skyped | |
198 | %{_mandir}/man1/skyped.1* |