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