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