bitlbee/bitlbee.spec
Theo Chatzimichos ca5bfa9feb Accepting request 403364 from home:scarabeus_iv:branches:server:irc
- Install devel files to be able to build plugins

- Drop sle11 support as we run it on sle12

- Version update to 3.4.2:
  * irc: Self-messages (messages sent by yourself from other IM clients). IRCv3.1
  * support and part of 3.2. Many important groupchat related bugfixes.
  * jabber: Carbons, see help set carbons. Removed facebook XMPP, use
  * bitlbee-facebook instead. SASL ANONYMOUS login, see help set anonymous.
  * hipchat: Channels can now be added with chat add hipchat "channel name" which
    tries to guess the channel JID. Read more
  * skype: Show all messages as groupchats since we can't tell which ones are
    private. This plugin is mostly-deprecated and mostly-broken, use the skypeweb
  * purple plugin or msn instead.
  * purple: Fix problems remembering SSL certificates as trusted. Groupchat related
    fixes. Better error reporting. Fixed setting jabber away states.
  * And lots of bugfixes / stability improvements.

- Cleanup a bit with spec-cleaner and remove sle10 support for readability

OBS-URL: https://build.opensuse.org/request/show/403364
OBS-URL: https://build.opensuse.org/package/show/server:irc/bitlbee?expand=0&rev=37
2016-06-18 13:12:31 +00:00

265 lines
8.7 KiB
RPMSpec

#
# spec file for package bitlbee
#
# Copyright (c) 2016 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 daemon_piddir /run/%{name}
Name: bitlbee
Version: 3.4.2
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
BuildRequires: fdupes
BuildRequires: glibc-devel
BuildRequires: gnutls-devel
BuildRequires: libgcrypt-devel
BuildRequires: lzo-devel
BuildRequires: pkgconfig
BuildRequires: w3m
BuildRequires: xmlto
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libotr) >= 4.0.0
BuildRequires: pkgconfig(purple)
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(zlib)
Requires: logrotate
Requires: xinetd
Requires(pre): shadow
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1310
BuildRequires: util-linux-systemd
%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
%package devel
Summary: IRC to other Chat Networks Gateway (Devel files)
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
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 development files for external plugins.
%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" \
# FIXME: you should use the %%configure macro
./configure \
--prefix="%{_prefix}" \
--bindir="%{_sbindir}" \
--etcdir="%{_sysconfdir}/%{name}" \
--mandir="%{_mandir}" \
--pcdir="%{_libdir}/pkgconfig" \
--datadir="%{_datadir}/%{name}" \
--plugindir="%{_libdir}/%{name}" \
--pidfile="%{daemon_piddir}/%{name}.pid" \
--config="%{_localstatedir}/lib/%{name}" \
--ipcsocket="%{daemon_piddir}/%{name}.sock" \
--purple=1 \
--otr=1 \
--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_mflags}
%install
install -d "%{buildroot}%{_mandir}/man1"
install -d "%{buildroot}%{_mandir}/man8"
install -d "%{buildroot}%{_sysconfdir}/bitlbee"
install -d "%{buildroot}%{_localstatedir}/lib/bitlbee"
make DESTDIR=%{buildroot} -C doc
make DESTDIR=%{buildroot} install install-etc
make DESTDIR=%{buildroot} install-dev
install -d "%{buildroot}%{_sysconfdir}/xinetd.d"
sed -e "s+@@BITLBEE@@+%{_sbindir}/bitlbee+g" \
< "%{SOURCE1}" > "%{buildroot}%{_sysconfdir}/xinetd.d/bitlbee"
%fdupes -s
install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}
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
getent passwd bitlbee >/dev/null || useradd -r -U -d %{_localstatedir}/lib/%{name} -s /sbin/nologin -c "user for %{name}" bitlbee
%service_add_pre %{name}.service
%post
%service_add_post %{name}.service
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%files -f %{name}.lang
%defattr(-,root,root)
%doc %dir %{_docdir}/%{name}
%config(noreplace) %{_sysconfdir}/xinetd.d/bitlbee
%attr(0750,root,bitlbee) %dir %{_sysconfdir}/bitlbee
%{_unitdir}/%{name}.service
%{_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
%{_mandir}/man5/bitlbee.conf.5%{ext_man}
%{_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
%files devel
%defattr(-,root,root)
%dir %{_includedir}/bitlbee
%{_includedir}/bitlbee/account.h
%{_includedir}/bitlbee/arc.h
%{_includedir}/bitlbee/base64.h
%{_includedir}/bitlbee/bee.h
%{_includedir}/bitlbee/bitlbee.h
%{_includedir}/bitlbee/commands.h
%{_includedir}/bitlbee/conf.h
%{_includedir}/bitlbee/config.h
%{_includedir}/bitlbee/dcc.h
%{_includedir}/bitlbee/events.h
%{_includedir}/bitlbee/ft.h
%{_includedir}/bitlbee/ftutil.h
%{_includedir}/bitlbee/help.h
%{_includedir}/bitlbee/http_client.h
%{_includedir}/bitlbee/ini.h
%{_includedir}/bitlbee/ipc.h
%{_includedir}/bitlbee/irc.h
%{_includedir}/bitlbee/json.h
%{_includedir}/bitlbee/json_util.h
%{_includedir}/bitlbee/log.h
%{_includedir}/bitlbee/md5.h
%{_includedir}/bitlbee/misc.h
%{_includedir}/bitlbee/nick.h
%{_includedir}/bitlbee/nogaim.h
%{_includedir}/bitlbee/oauth.h
%{_includedir}/bitlbee/oauth2.h
%{_includedir}/bitlbee/otr.h
%{_includedir}/bitlbee/proxy.h
%{_includedir}/bitlbee/query.h
%{_includedir}/bitlbee/set.h
%{_includedir}/bitlbee/sha1.h
%{_includedir}/bitlbee/sock.h
%{_includedir}/bitlbee/ssl_client.h
%{_includedir}/bitlbee/storage.h
%{_includedir}/bitlbee/url.h
%{_includedir}/bitlbee/xmltree.h
%{_libdir}/pkgconfig/bitlbee.pc
%changelog