]>
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 |
0ca128fd JR |
11 | Version: 3.5.1 |
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 |
0ca128fd | 16 | # Source0-md5: ec866f937258c16e1e2e70f3dec67430 |
1b994aca | 17 | URL: http://www.bitlbee.org/ |
23eb96be | 18 | Patch0: config.patch |
f5618a74 | 19 | BuildRequires: asciidoc |
c09c60a2 | 20 | BuildRequires: glib2-devel >= 1:2.14 |
1b994aca | 21 | BuildRequires: gnutls-devel |
b8f37917 | 22 | %{?with_otr:BuildRequires: libotr-devel >= 3.2.0} |
ac1568af | 23 | %{?with_purple:BuildRequires: libpurple-devel} |
23eb96be | 24 | BuildRequires: rpmbuild(macros) >= 1.461 |
b8f37917 | 25 | BuildRequires: systemd-units |
23eb96be ER |
26 | Requires(postun): /usr/sbin/groupdel |
27 | Requires(postun): /usr/sbin/userdel | |
28 | Requires(pre): /bin/id | |
29 | Requires(pre): /usr/bin/getgid | |
30 | Requires(pre): /usr/sbin/groupadd | |
31 | Requires(pre): /usr/sbin/useradd | |
f1503526 JR |
32 | Requires(post,preun,postun): systemd-units >= 38 |
33 | Requires: systemd-units >= 38 | |
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 | ||
762288ea | 68 | %prep |
69 | %setup -q | |
23eb96be | 70 | %patch0 -p1 |
762288ea | 71 | |
b8f37917 ER |
72 | # fix wrong assumption with $DESTDIR |
73 | %{__sed} -i -e 's,$(shell id -u),0,' Makefile | |
74 | ||
762288ea | 75 | %build |
b8f37917 | 76 | CFLAGS="%{rpmcflags}" \ |
762288ea | 77 | ./configure \ |
762288ea | 78 | --prefix=%{_prefix} \ |
b8f37917 ER |
79 | --bindir=%{_sbindir} \ |
80 | --etcdir=%{_sysconfdir}/%{name} \ | |
81 | --mandir=%{_mandir} \ | |
82 | --datadir=%{_datadir}/%{name} \ | |
83 | --config=%{_localstatedir}/lib/%{name} \ | |
84 | --pcdir=%{_pkgconfigdir} \ | |
85 | --plugindir=%{_libdir}/%{name} \ | |
86 | --strip=0 \ | |
87 | --plugins=1 \ | |
88 | --ssl=gnutls \ | |
c09c60a2 | 89 | --pie=1 \ |
ac1568af ER |
90 | %if %{with purple} |
91 | --purple=1 \ | |
92 | %endif | |
b8f37917 ER |
93 | %if %{with otr} |
94 | --otr=plugin \ | |
95 | %endif | |
0ca128fd | 96 | --skype=0 |
f750a0e7 AG |
97 | |
98 | %{__make} | |
b8f37917 | 99 | |
762288ea | 100 | %install |
101 | rm -rf $RPM_BUILD_ROOT | |
b8f37917 | 102 | install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name} |
b8f37917 | 103 | %{__make} install install-dev install-etc install-systemd \ |
1b994aca | 104 | DESTDIR=$RPM_BUILD_ROOT |
762288ea | 105 | |
762288ea | 106 | %clean |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
23eb96be ER |
109 | %pre |
110 | %groupadd -g 280 bitlbee | |
111 | %useradd -u 280 -d /var/lib/bitlbee -g bitlbee -c "Bitlbee User" bitlbee | |
31b34380 ER |
112 | %systemd_post bitlbee.service |
113 | ||
114 | %preun | |
115 | %systemd_preun bitlbee.service | |
23eb96be ER |
116 | |
117 | %postun | |
118 | if [ "$1" = "0" ]; then | |
119 | %userremove bitlbee | |
120 | %groupremove bitlbee | |
121 | fi | |
31b34380 | 122 | %systemd_reload |
23eb96be | 123 | |
762288ea | 124 | %files |
125 | %defattr(644,root,root,755) | |
ac1568af | 126 | %doc doc/{AUTHORS,CHANGES,CREDITS,FAQ,README} utils |
23eb96be ER |
127 | %dir %attr(750,root,bitlbee) %{_sysconfdir}/%{name} |
128 | %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/bitlbee.conf | |
129 | %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/motd.txt | |
b8f37917 ER |
130 | %attr(755,root,root) %{_sbindir}/bitlbee |
131 | %{_mandir}/man5/bitlbee.conf.5* | |
132 | %{_mandir}/man8/bitlbee.8* | |
1b994aca | 133 | %{_datadir}/bitlbee |
23eb96be | 134 | %attr(770,root,bitlbee) %{_localstatedir}/lib/bitlbee |
b8f37917 ER |
135 | %{systemdunitdir}/bitlbee.service |
136 | %{systemdunitdir}/bitlbee.socket | |
137 | %{systemdunitdir}/bitlbee@.service | |
138 | ||
139 | %files devel | |
140 | %defattr(644,root,root,755) | |
141 | %doc doc/example_plugin.c | |
142 | %{_includedir}/%{name} | |
143 | %{_pkgconfigdir}/%{name}.pc | |
144 | ||
145 | %if %{with otr} | |
146 | %files otr | |
147 | %defattr(644,root,root,755) | |
148 | %attr(755,root,root) %{_libdir}/%{name}/otr.so | |
149 | %endif |