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