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