2014-06-19 11:12:17 +02:00
|
|
|
#
|
|
|
|
# spec file for package bitlbee
|
|
|
|
#
|
2015-04-24 09:51:19 +02:00
|
|
|
# Copyright (c) 2014-2015 SUSE Linux GmbH, Nuernberg, Germany.
|
2012-02-20 09:39:18 +01:00
|
|
|
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
2014-06-19 11:12:17 +02:00
|
|
|
#
|
|
|
|
|
2009-10-19 14:43:06 +02:00
|
|
|
|
2014-06-19 11:12:17 +02:00
|
|
|
# Define way to log messages for the machine:
|
|
|
|
%define nnmmsg logger -t %{name}/rpm
|
2014-09-01 11:06:57 +02:00
|
|
|
|
|
|
|
%if 0%{?suse_version} > 1110
|
2012-09-06 20:13:43 +02:00
|
|
|
%define with_libotr 1
|
2010-10-22 16:31:26 +02:00
|
|
|
%endif
|
2014-09-01 11:06:57 +02:00
|
|
|
|
2015-04-24 09:51:19 +02:00
|
|
|
#define systemd macro on post-12.3 systems only:
|
2014-06-19 11:12:17 +02:00
|
|
|
%if 0%{?suse_version} >= 1310
|
|
|
|
%define with_systemd 1
|
|
|
|
%else
|
|
|
|
%define with_systemd 0
|
|
|
|
%endif
|
|
|
|
# define patch where the service will have pid and socket store:
|
|
|
|
%if 0%{?suse_version} >= 1310
|
|
|
|
%define daemon_piddir /run/%{name}
|
|
|
|
%else
|
|
|
|
%define daemon_piddir %{_localstatedir}/run/%{name}
|
|
|
|
%endif
|
2012-02-20 09:39:18 +01:00
|
|
|
Name: bitlbee
|
2015-04-23 08:21:30 +02:00
|
|
|
Version: 3.4
|
2012-02-20 09:39:18 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: IRC to other Chat Networks Gateway
|
2014-06-19 11:12:17 +02:00
|
|
|
License: GPL-2.0
|
|
|
|
Group: Productivity/Networking/IRC
|
|
|
|
Url: http://www.bitlbee.org/
|
2012-02-20 09:39:18 +01:00
|
|
|
Source: http://get.bitlbee.org/src/bitlbee-%{version}.tar.gz
|
|
|
|
Source1: %{name}.xinetd-suse.in
|
2014-06-19 11:12:17 +02:00
|
|
|
Source2: %{name}.service-suse.in
|
|
|
|
Source3: %{name}.init.d-suse.in
|
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: glib2-devel
|
|
|
|
BuildRequires: glibc-devel
|
|
|
|
BuildRequires: gnutls-devel
|
|
|
|
BuildRequires: libgcrypt-devel
|
|
|
|
BuildRequires: lzo-devel
|
|
|
|
BuildRequires: make
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: zlib-devel
|
|
|
|
Requires: logrotate
|
2012-02-20 09:39:18 +01:00
|
|
|
Requires: xinetd
|
2014-06-19 11:12:17 +02:00
|
|
|
Requires(pre): %{_sbindir}/groupadd
|
|
|
|
Requires(pre): %{_sbindir}/useradd
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-05-16 00:53:38 +02:00
|
|
|
%if 0%{?suse_version} >= 1010
|
|
|
|
BuildRequires: xmlto
|
|
|
|
%endif
|
2009-10-19 22:04:54 +02:00
|
|
|
%if 0%{?suse_version} >= 1030
|
2010-03-17 09:28:53 +01:00
|
|
|
BuildRequires: fdupes
|
2009-10-19 22:04:54 +02:00
|
|
|
%endif
|
2010-10-22 16:31:26 +02:00
|
|
|
%if 0%{?with_libotr:1}
|
2014-08-29 10:18:43 +02:00
|
|
|
BuildRequires: libotr-devel >= 4.0.0
|
2013-04-11 22:10:50 +02:00
|
|
|
%endif
|
2014-04-23 16:25:13 +02:00
|
|
|
%if 0%{?suse_version} >= 1110
|
2012-02-20 09:39:18 +01:00
|
|
|
BuildRequires: libpurple-devel
|
2011-03-08 15:02:30 +01:00
|
|
|
%endif
|
2014-06-19 11:12:17 +02:00
|
|
|
%if %{with_systemd}
|
|
|
|
BuildRequires: systemd
|
2015-04-23 16:11:50 +02:00
|
|
|
%if 0%{?suse_version} > 1310
|
2014-11-10 12:43:37 +01:00
|
|
|
BuildRequires: util-linux-systemd
|
|
|
|
%endif
|
2014-06-19 11:12:17 +02:00
|
|
|
%endif
|
2009-10-19 14:43:06 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
We are both console lovers. But it is annoying to have a few tty's open with
|
|
|
|
chat things in them. IRC, ICQ, MSN, Jabber... For X there is Gaim, which
|
|
|
|
supports many chatprotocols. Why wasn't there such a thing for the console?
|
|
|
|
|
|
|
|
The idea to port Gaim was easily thought of, of course. But we liked our IRC
|
|
|
|
clients. And we used it the most, so we used it best. Importing it into the
|
|
|
|
IRC client was a nice idea. But what if someone liked a different client. Then
|
|
|
|
(s)he had to duplicate our work.
|
|
|
|
|
|
|
|
That's a shame, we thought. Doing work twice is pointless. So when Wilmer got
|
|
|
|
the ingenious thought in his mind while farming, to create an IRC to other
|
|
|
|
chatnetworks gateway, we were both so excited, that we started working on it
|
|
|
|
almost immediately. And the result is BitlBee.
|
|
|
|
|
|
|
|
This package comes with support for MSN, Jabber, Oscar and Yahoo, as well as
|
|
|
|
enabled flood protection.
|
|
|
|
|
2011-03-08 12:04:51 +01:00
|
|
|
%package doc
|
2012-02-20 09:39:18 +01:00
|
|
|
Summary: IRC to other Chat Networks Gateway (User Guide)
|
|
|
|
Group: Productivity/Networking/IRC
|
2011-03-08 12:04:51 +01:00
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
We are both console lovers. But it is annoying to have a few tty's open with
|
|
|
|
chat things in them. IRC, ICQ, MSN, Jabber... For X there is Gaim, which
|
|
|
|
supports many chatprotocols. Why wasn't there such a thing for the console?
|
|
|
|
|
|
|
|
The idea to port Gaim was easily thought of, of course. But we liked our IRC
|
|
|
|
clients. And we used it the most, so we used it best. Importing it into the
|
|
|
|
IRC client was a nice idea. But what if someone liked a different client. Then
|
|
|
|
(s)he had to duplicate our work.
|
|
|
|
|
|
|
|
That's a shame, we thought. Doing work twice is pointless. So when Wilmer got
|
|
|
|
the ingenious thought in his mind while farming, to create an IRC to other
|
|
|
|
chatnetworks gateway, we were both so excited, that we started working on it
|
|
|
|
almost immediately. And the result is BitlBee.
|
|
|
|
|
|
|
|
This package contains the user guide:
|
|
|
|
%{_docdir}/%{name}/user-guide
|
|
|
|
|
2009-10-19 14:43:06 +02:00
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
2010-05-16 00:53:38 +02:00
|
|
|
# make it verbose!
|
2014-06-19 11:12:17 +02:00
|
|
|
find . -name Makefile -exec sed -i.orig 's|@$(CC)|$(CC)|;s|@$(LD)|$(LD)|' {} \;
|
2010-05-16 00:53:38 +02:00
|
|
|
|
2009-10-19 14:43:06 +02:00
|
|
|
%build
|
2014-06-19 11:12:17 +02:00
|
|
|
|
2009-10-19 14:43:06 +02:00
|
|
|
# not autoconf
|
|
|
|
CFLAGS="%{optflags} -fno-strict-aliasing" \
|
|
|
|
CXXFLAGS="%{optflags} -fno-strict-aliasing" \
|
|
|
|
./configure \
|
2012-02-20 09:39:18 +01:00
|
|
|
--prefix="%{_prefix}" \
|
|
|
|
--bindir="%{_sbindir}" \
|
|
|
|
--etcdir="%{_sysconfdir}/%{name}" \
|
|
|
|
--mandir="%{_mandir}" \
|
|
|
|
--datadir="%{_datadir}/%{name}" \
|
|
|
|
--plugindir="%{_libdir}/%{name}" \
|
2014-06-19 11:12:17 +02:00
|
|
|
--pidfile="%{daemon_piddir}/%{name}.pid" \
|
2012-02-20 09:39:18 +01:00
|
|
|
--config="%{_localstatedir}/lib/%{name}" \
|
2014-06-19 11:12:17 +02:00
|
|
|
--ipcsocket="%{daemon_piddir}/%{name}.sock" \
|
2014-04-23 16:25:13 +02:00
|
|
|
%if 0%{?suse_version} >= 1110
|
2011-03-08 12:04:51 +01:00
|
|
|
--purple=1 \
|
2011-03-08 15:02:30 +01:00
|
|
|
%else
|
|
|
|
--purple=0 \
|
|
|
|
%endif
|
2010-10-22 16:31:26 +02:00
|
|
|
%if 0%{?with_libotr:1}
|
2010-10-22 15:51:09 +02:00
|
|
|
--otr=1 \
|
2010-10-22 16:31:26 +02:00
|
|
|
%else
|
|
|
|
--otr=0 \
|
|
|
|
%endif
|
2012-02-20 09:39:18 +01:00
|
|
|
--msn=1 \
|
|
|
|
--jabber=1 \
|
2010-05-16 00:53:38 +02:00
|
|
|
--twitter=1 \
|
2012-02-20 09:39:18 +01:00
|
|
|
--oscar=1 \
|
|
|
|
--yahoo=1 \
|
2015-06-16 10:59:14 +02:00
|
|
|
--sipe=1 \
|
2012-02-20 09:39:18 +01:00
|
|
|
--debug=0 \
|
|
|
|
--strip=0 \
|
|
|
|
--gcov=0 \
|
|
|
|
--flood=0 \
|
|
|
|
--plugins=1 \
|
|
|
|
--ssl=gnutls
|
2009-10-19 14:43:06 +02:00
|
|
|
|
2014-06-19 11:12:17 +02:00
|
|
|
make %{?_smp_flags}
|
2009-10-19 14:43:06 +02:00
|
|
|
|
|
|
|
%install
|
2014-06-19 11:12:17 +02:00
|
|
|
install -d "%{buildroot}%{_mandir}/man1"
|
|
|
|
install -d "%{buildroot}%{_mandir}/man8"
|
|
|
|
install -d "%{buildroot}%{_sysconfdir}/bitlbee"
|
|
|
|
install -d "%{buildroot}%{_localstatedir}/lib/bitlbee"
|
2009-10-19 14:43:06 +02:00
|
|
|
|
2010-05-16 00:53:38 +02:00
|
|
|
%if 0%{?suse_version} >= 1010
|
2014-06-19 11:12:17 +02:00
|
|
|
make DESTDIR=%{buildroot} -C doc
|
2010-05-16 00:53:38 +02:00
|
|
|
%endif
|
2014-06-19 11:12:17 +02:00
|
|
|
%{makeinstall} install-etc
|
2009-10-19 14:43:06 +02:00
|
|
|
|
2014-06-19 11:12:17 +02:00
|
|
|
install -d "%{buildroot}%{_sysconfdir}/xinetd.d"
|
|
|
|
sed -e "s+@@BITLBEE@@+%{_sbindir}/bitlbee+g" \
|
2012-02-20 09:39:18 +01:00
|
|
|
< "%{SOURCE1}" > "%{buildroot}%{_sysconfdir}/xinetd.d/bitlbee"
|
2009-10-19 14:43:06 +02:00
|
|
|
|
2009-10-19 22:04:54 +02:00
|
|
|
%if 0%{?suse_version} >= 1030
|
2009-10-19 14:43:06 +02:00
|
|
|
%fdupes -s
|
2009-10-19 22:04:54 +02:00
|
|
|
%endif
|
2009-10-19 14:43:06 +02:00
|
|
|
|
2014-06-19 11:12:17 +02:00
|
|
|
%if %{with_systemd}
|
|
|
|
install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
|
|
|
|
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}
|
|
|
|
%else
|
|
|
|
install -D -p -m 0755 %{SOURCE3} %{buildroot}%{_initrddir}/%{name}
|
|
|
|
ln -s %{_initrddir}/%{name} %{buildroot}/%{_sbindir}/rc%{name}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
install -d "%{buildroot}%{_docdir}/%{name}"
|
2011-03-08 12:04:51 +01:00
|
|
|
LM="$PWD/%{name}.lang"
|
|
|
|
echo -n > "$LM"
|
|
|
|
for f in COPYING doc/AUTHORS doc/CHANGES doc/CREDITS doc/FAQ doc/README; do
|
|
|
|
b="${f##*/}"
|
2014-06-19 11:12:17 +02:00
|
|
|
install -m0644 "$f" "%{buildroot}%{_docdir}/%{name}/$b"
|
2011-03-08 12:04:51 +01:00
|
|
|
echo "%doc %{_docdir}/%{name}/$b" >>"$LM"
|
|
|
|
done
|
|
|
|
|
2014-06-19 11:12:17 +02:00
|
|
|
install -d "%{buildroot}%{_docdir}/%{name}/user-guide"
|
|
|
|
cp -a doc/user-guide/*.{txt,html} "%{buildroot}%{_docdir}/%{name}/user-guide/"
|
|
|
|
|
2011-03-08 12:04:51 +01:00
|
|
|
|
2009-10-19 14:43:06 +02:00
|
|
|
%pre
|
2014-06-19 11:12:17 +02:00
|
|
|
# create default user if its need it.
|
|
|
|
if id bitlbee > /dev/null 2>&1;then
|
|
|
|
: OK user %{name} already present
|
|
|
|
%{nnmmsg} "info: The user %{name} for package %{name} is already present"
|
|
|
|
else
|
2015-04-23 08:21:30 +02:00
|
|
|
useradd -r -U -s /bin/false -c "bitlbee User" -d %{_localstatedir}/lib/%{name} bitlbee 2> /dev/null || :
|
2014-06-19 11:12:17 +02:00
|
|
|
%{nnmmsg} "Added user bitlbee for package %{name}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
%if %{with_systemd}
|
|
|
|
%service_add_pre %{name}.service
|
|
|
|
%endif
|
2009-10-19 14:43:06 +02:00
|
|
|
|
2014-06-19 11:12:17 +02:00
|
|
|
%post
|
|
|
|
%if %{with_systemd}
|
|
|
|
%service_add_post %{name}.service
|
|
|
|
%else
|
|
|
|
%{fillup_and_insserv -n %{name} }
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%if %{with_systemd}
|
|
|
|
%service_del_preun %{name}.service
|
|
|
|
%else
|
|
|
|
%stop_on_removal %{name}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%if %{with_systemd}
|
2014-11-10 12:43:37 +01:00
|
|
|
%service_del_postun %{name}.service
|
2014-06-19 11:12:17 +02:00
|
|
|
%else
|
|
|
|
%restart_on_update %{name}
|
|
|
|
%insserv_cleanup
|
|
|
|
%endif
|
2009-10-19 14:43:06 +02:00
|
|
|
|
2011-03-08 12:04:51 +01:00
|
|
|
%files -f %{name}.lang
|
2009-10-19 14:43:06 +02:00
|
|
|
%defattr(-,root,root)
|
2011-03-08 12:04:51 +01:00
|
|
|
%doc %dir %{_docdir}/%{name}
|
2009-10-19 14:43:06 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/xinetd.d/bitlbee
|
|
|
|
%attr(0750,root,bitlbee) %dir %{_sysconfdir}/bitlbee
|
2014-06-19 11:12:17 +02:00
|
|
|
%if %{with_systemd}
|
|
|
|
%{_unitdir}/%{name}.service
|
|
|
|
%else
|
|
|
|
%attr(755,root,root) %{_initrddir}/%{name}
|
|
|
|
%endif
|
|
|
|
%{_sbindir}/rc%{name}
|
2009-10-19 14:43:06 +02:00
|
|
|
%config(noreplace) %attr(0640,root,bitlbee) %{_sysconfdir}/bitlbee/bitlbee.conf
|
|
|
|
%config(noreplace) %attr(0640,root,bitlbee) %{_sysconfdir}/bitlbee/motd.txt
|
|
|
|
%{_sbindir}/bitlbee
|
|
|
|
%{_datadir}/bitlbee
|
2010-05-16 00:53:38 +02:00
|
|
|
%doc %{_mandir}/man5/bitlbee.conf.5%{ext_man}
|
|
|
|
%doc %{_mandir}/man8/bitlbee.8%{ext_man}
|
2009-10-19 14:43:06 +02:00
|
|
|
%attr(0750,bitlbee,bitlbee) %dir %{_localstatedir}/lib/bitlbee
|
|
|
|
|
2011-03-08 12:04:51 +01:00
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc %dir %{_docdir}/%{name}
|
|
|
|
%{_docdir}/%{name}/user-guide
|
|
|
|
|
2012-02-20 09:39:18 +01:00
|
|
|
%changelog
|