SHA256
1
0
forked from pool/bitlbee
bitlbee/bitlbee.spec
Theo Chatzimichos 3f5c89650e Accepting request 314057 from home:lmuelle
- update to 3.4.1:
  msn:
  + Upgraded protocol to MSNP21, works again (dx)
  + Contact list management, groupchats and skype username logins won't work.
    Next release!
 jabber:
  + Add "hipchat" protocol, for smoother login. Takes the same username as the
    official client. Note that unlike the 'hip-cat' branch, this doesn't
    preload channels. https://wiki.bitlbee.org/HowtoHipchat for details (dx)
  + Fixed a bug when receiving topics set by people who left the channel (dx)
  + Create fake users instead of showing "unknown participant" errors (dx)
  + Gmail mail notifications support (Artem Savkov)
  + Lowering xmpp presence priority on away (Artem Savkov)
  twitter:
  + Show quoted tweets/RTs with comment inline (wilmer)
  + Added "url" command, can be used to quote tweets (wilmer)
  + Make replies to self work (wilmer)
  Building documentation is now done with a python script (both 2.x/3.x work)
  Asciidoc/xsltproc/xmlto are no longer build dependencies (dx)
- Require w3m at built time to generate the userguide in html format.

OBS-URL: https://build.opensuse.org/request/show/314057
OBS-URL: https://build.opensuse.org/package/show/server:irc/bitlbee?expand=0&rev=36
2015-06-27 09:16:29 +00:00

275 lines
8.0 KiB
RPMSpec

#
# spec file for package bitlbee
#
# Copyright (c) 2014-2015 SUSE Linux GmbH, Nuernberg, Germany.
# 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/
#
# Define way to log messages for the machine:
%define nnmmsg logger -t %{name}/rpm
%if 0%{?suse_version} > 1110
%define with_libotr 1
%endif
#define systemd macro on post-12.3 systems only:
%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
Name: bitlbee
Version: 3.4.1
Release: 0
Summary: IRC to other Chat Networks Gateway
License: GPL-2.0
Group: Productivity/Networking/IRC
Url: http://www.bitlbee.org/
Source: http://get.bitlbee.org/src/bitlbee-%{version}.tar.gz
Source1: %{name}.xinetd-suse.in
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: w3m
BuildRequires: zlib-devel
Requires: logrotate
Requires: xinetd
Requires(pre): %{_sbindir}/groupadd
Requires(pre): %{_sbindir}/useradd
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1010
BuildRequires: xmlto
%endif
%if 0%{?suse_version} >= 1030
BuildRequires: fdupes
%endif
%if 0%{?with_libotr:1}
BuildRequires: libotr-devel >= 4.0.0
%endif
%if 0%{?suse_version} >= 1110
BuildRequires: libpurple-devel
%endif
%if %{with_systemd}
BuildRequires: systemd
%if 0%{?suse_version} > 1310
BuildRequires: util-linux-systemd
%endif
%endif
%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.
%package doc
Summary: IRC to other Chat Networks Gateway (User Guide)
Group: Productivity/Networking/IRC
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
%prep
%setup -q
# make it verbose!
find . -name Makefile -exec sed -i.orig 's|@$(CC)|$(CC)|;s|@$(LD)|$(LD)|' {} \;
%build
# not autoconf
CFLAGS="%{optflags} -fno-strict-aliasing" \
CXXFLAGS="%{optflags} -fno-strict-aliasing" \
./configure \
--prefix="%{_prefix}" \
--bindir="%{_sbindir}" \
--etcdir="%{_sysconfdir}/%{name}" \
--mandir="%{_mandir}" \
--datadir="%{_datadir}/%{name}" \
--plugindir="%{_libdir}/%{name}" \
--pidfile="%{daemon_piddir}/%{name}.pid" \
--config="%{_localstatedir}/lib/%{name}" \
--ipcsocket="%{daemon_piddir}/%{name}.sock" \
%if 0%{?suse_version} >= 1110
--purple=1 \
%else
--purple=0 \
%endif
%if 0%{?with_libotr:1}
--otr=1 \
%else
--otr=0 \
%endif
--msn=1 \
--jabber=1 \
--twitter=1 \
--oscar=1 \
--yahoo=1 \
--sipe=1 \
--debug=0 \
--strip=0 \
--gcov=0 \
--flood=0 \
--plugins=1 \
--ssl=gnutls
make %{?_smp_flags}
%install
install -d "%{buildroot}%{_mandir}/man1"
install -d "%{buildroot}%{_mandir}/man8"
install -d "%{buildroot}%{_sysconfdir}/bitlbee"
install -d "%{buildroot}%{_localstatedir}/lib/bitlbee"
%if 0%{?suse_version} >= 1010
make DESTDIR=%{buildroot} -C doc
%endif
%{makeinstall} install-etc
install -d "%{buildroot}%{_sysconfdir}/xinetd.d"
sed -e "s+@@BITLBEE@@+%{_sbindir}/bitlbee+g" \
< "%{SOURCE1}" > "%{buildroot}%{_sysconfdir}/xinetd.d/bitlbee"
%if 0%{?suse_version} >= 1030
%fdupes -s
%endif
%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}"
LM="$PWD/%{name}.lang"
echo -n > "$LM"
for f in COPYING doc/AUTHORS doc/CHANGES doc/CREDITS doc/FAQ doc/README; do
b="${f##*/}"
install -m0644 "$f" "%{buildroot}%{_docdir}/%{name}/$b"
echo "%doc %{_docdir}/%{name}/$b" >>"$LM"
done
pushd doc/user-guide
make user-guide.html user-guide.txt
popd
install -d "%{buildroot}%{_docdir}/%{name}/user-guide"
cp -a doc/user-guide/*.{txt,html} "%{buildroot}%{_docdir}/%{name}/user-guide/"
%pre
# 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
useradd -r -U -s /bin/false -c "bitlbee User" -d %{_localstatedir}/lib/%{name} bitlbee 2> /dev/null || :
%{nnmmsg} "Added user bitlbee for package %{name}"
fi
%if %{with_systemd}
%service_add_pre %{name}.service
%endif
%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}
%service_del_postun %{name}.service
%else
%restart_on_update %{name}
%insserv_cleanup
%endif
%files -f %{name}.lang
%defattr(-,root,root)
%doc %dir %{_docdir}/%{name}
%config(noreplace) %{_sysconfdir}/xinetd.d/bitlbee
%attr(0750,root,bitlbee) %dir %{_sysconfdir}/bitlbee
%if %{with_systemd}
%{_unitdir}/%{name}.service
%else
%attr(755,root,root) %{_initrddir}/%{name}
%endif
%{_sbindir}/rc%{name}
%config(noreplace) %attr(0640,root,bitlbee) %{_sysconfdir}/bitlbee/bitlbee.conf
%config(noreplace) %attr(0640,root,bitlbee) %{_sysconfdir}/bitlbee/motd.txt
%{_sbindir}/bitlbee
%{_datadir}/bitlbee
%doc %{_mandir}/man5/bitlbee.conf.5%{ext_man}
%doc %{_mandir}/man8/bitlbee.8%{ext_man}
%attr(0750,bitlbee,bitlbee) %dir %{_localstatedir}/lib/bitlbee
%files doc
%defattr(-,root,root)
%doc %dir %{_docdir}/%{name}
%{_docdir}/%{name}/user-guide
%changelog