]>
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 |
080485b4 | 11 | Version: 3.6 |
0ca128fd | 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 |
080485b4 | 16 | # Source0-md5: a11c5d18848b1533e1a1aaa516ea4388 |
1b994aca | 17 | URL: http://www.bitlbee.org/ |
23eb96be | 18 | Patch0: config.patch |
f5618a74 | 19 | BuildRequires: asciidoc |
080485b4 | 20 | BuildRequires: glib2-devel >= 1:2.32 |
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 | 32 | Requires(post,preun,postun): systemd-units >= 38 |
080485b4 | 33 | Requires: glib2 >= 1:2.32 |
f1503526 | 34 | Requires: systemd-units >= 38 |
23eb96be ER |
35 | Provides: group(bitlbee) |
36 | Provides: user(bitlbee) | |
762288ea | 37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
38 | ||
39 | %description | |
b8f37917 ER |
40 | Bitlbee is an IRC to other chat networks gateway. Bitlbee can be used |
41 | as an IRC server which forwards everything you say to people on other | |
42 | chat networks like ICQ/AIM, MSN, XMPP/Jabber (including Google Talk), | |
43 | Yahoo or Twitter! | |
762288ea | 44 | |
6b82b92d JR |
45 | %description -l pl.UTF-8 |
46 | Bramka pomiędzy IRC-em i innymi sieciami komunikacyjnymi. Ten program | |
47 | może być używany jako serwer IRC przekazujący wszystko co się mówi do | |
48 | ludzi korzystających z innych sieci komunikacyjnych, takich jak | |
1b994aca JB |
49 | MSN/ICQ/Jabber. |
50 | ||
b8f37917 ER |
51 | %package devel |
52 | Summary: Development files for bitlbee | |
53 | Group: Development/Libraries | |
54 | Requires: %{name} = %{version}-%{release} | |
55 | ||
56 | %description devel | |
57 | The bitlbee-devel package includes header files necessary for building | |
58 | and developing programs and plugins which use bitlbee. | |
59 | ||
60 | %package otr | |
61 | Summary: OTR plugin for bitlbee | |
62 | Group: Daemons | |
63 | Requires: %{name} = %{version}-%{release} | |
64 | ||
65 | %description otr | |
66 | The bitlbee-otr package includes OTR plugin for bitlbee. Not | |
67 | completely stable and not 100% foolproof so use at your own risk. | |
68 | ||
762288ea | 69 | %prep |
70 | %setup -q | |
23eb96be | 71 | %patch0 -p1 |
762288ea | 72 | |
b8f37917 ER |
73 | # fix wrong assumption with $DESTDIR |
74 | %{__sed} -i -e 's,$(shell id -u),0,' Makefile | |
75 | ||
762288ea | 76 | %build |
b8f37917 | 77 | CFLAGS="%{rpmcflags}" \ |
762288ea | 78 | ./configure \ |
762288ea | 79 | --prefix=%{_prefix} \ |
b8f37917 ER |
80 | --bindir=%{_sbindir} \ |
81 | --etcdir=%{_sysconfdir}/%{name} \ | |
82 | --mandir=%{_mandir} \ | |
83 | --datadir=%{_datadir}/%{name} \ | |
84 | --config=%{_localstatedir}/lib/%{name} \ | |
85 | --pcdir=%{_pkgconfigdir} \ | |
86 | --plugindir=%{_libdir}/%{name} \ | |
87 | --strip=0 \ | |
88 | --plugins=1 \ | |
89 | --ssl=gnutls \ | |
c09c60a2 | 90 | --pie=1 \ |
ac1568af ER |
91 | %if %{with purple} |
92 | --purple=1 \ | |
93 | %endif | |
b8f37917 ER |
94 | %if %{with otr} |
95 | --otr=plugin \ | |
96 | %endif | |
0ca128fd | 97 | --skype=0 |
f750a0e7 AG |
98 | |
99 | %{__make} | |
b8f37917 | 100 | |
762288ea | 101 | %install |
102 | rm -rf $RPM_BUILD_ROOT | |
b8f37917 | 103 | install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name} |
b8f37917 | 104 | %{__make} install install-dev install-etc install-systemd \ |
1b994aca | 105 | DESTDIR=$RPM_BUILD_ROOT |
762288ea | 106 | |
762288ea | 107 | %clean |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
23eb96be ER |
110 | %pre |
111 | %groupadd -g 280 bitlbee | |
112 | %useradd -u 280 -d /var/lib/bitlbee -g bitlbee -c "Bitlbee User" bitlbee | |
31b34380 ER |
113 | %systemd_post bitlbee.service |
114 | ||
115 | %preun | |
116 | %systemd_preun bitlbee.service | |
23eb96be ER |
117 | |
118 | %postun | |
119 | if [ "$1" = "0" ]; then | |
120 | %userremove bitlbee | |
121 | %groupremove bitlbee | |
122 | fi | |
31b34380 | 123 | %systemd_reload |
23eb96be | 124 | |
762288ea | 125 | %files |
126 | %defattr(644,root,root,755) | |
ac1568af | 127 | %doc doc/{AUTHORS,CHANGES,CREDITS,FAQ,README} utils |
23eb96be ER |
128 | %dir %attr(750,root,bitlbee) %{_sysconfdir}/%{name} |
129 | %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/bitlbee.conf | |
130 | %attr(640,root,bitlbee) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/motd.txt | |
b8f37917 ER |
131 | %attr(755,root,root) %{_sbindir}/bitlbee |
132 | %{_mandir}/man5/bitlbee.conf.5* | |
133 | %{_mandir}/man8/bitlbee.8* | |
1b994aca | 134 | %{_datadir}/bitlbee |
23eb96be | 135 | %attr(770,root,bitlbee) %{_localstatedir}/lib/bitlbee |
b8f37917 ER |
136 | %{systemdunitdir}/bitlbee.service |
137 | %{systemdunitdir}/bitlbee.socket | |
138 | %{systemdunitdir}/bitlbee@.service | |
139 | ||
140 | %files devel | |
141 | %defattr(644,root,root,755) | |
142 | %doc doc/example_plugin.c | |
143 | %{_includedir}/%{name} | |
144 | %{_pkgconfigdir}/%{name}.pc | |
145 | ||
146 | %if %{with otr} | |
147 | %files otr | |
148 | %defattr(644,root,root,755) | |
149 | %attr(755,root,root) %{_libdir}/%{name}/otr.so | |
150 | %endif |