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