File tmux.spec of Package tmux.openSUSE_13.1_Update
#
# spec file for package tmux
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2010 Guido Berhoerster.
#
# 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/
#
Name: tmux
Version: 1.9a
Release: 0
Summary: Terminal multiplexer
License: ISC and BSD-3-Clause and BSD-2-Clause
Group: System/Console
Url: http://tmux.sourceforge.net/
Source: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM tmux-fix-malloc-check-abort.patch http://sourceforge.net/p/tmux/tickets/105/ bnc#869950 dmacvicar@suse.de -- Fix glibc aborting with MALLOC_CHECK_=2
Patch0: tmux-fix-malloc-check-abort.patch
# PATCH-FIX-OPENSUSE tmux-socket-path.patch crrodriguez@opensuse.org -- Use /run/tmux instead of /tmp as the default socket path, this add some robustness against accidental deletion via systemd-tmpfiles-clean, tmpwatch, or similar
Patch1: tmux-socket-path.patch
BuildRequires: libevent-devel
BuildRequires: ncurses-devel
BuildRequires: pkgconfig(systemd)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
tmux is a terminal multiplexer: it enables a number of terminals (or windows),
each running a separate program, to be created, accessed, and controlled from a
single screen. tmux may be detached from a screen and continue running in the
background, then later reattached. tmux is intended to be a modern,
BSD-licensed alternative to programs such as GNU screen.
tmux uses a client-server model. The server holds multiple sessions and each
window is a independent entity which may be freely linked to multiple sessions,
moved between sessions and otherwise manipulated. Each session may be attached
to (display and accept keyboard input from) multiple clients.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
%configure
make %{?_smp_mflags}
%install
%make_install
mkdir -p %{buildroot}%{_tmpfilesdir}
printf 'd /run/tmux 1777 root root -' > %{buildroot}%{_tmpfilesdir}/tmux.conf
%post
%{?tmpfiles_create:%tmpfiles_create %{_tmpfilesdir}/tmux.conf}
%files
%defattr(-,root,root,-)
%doc CHANGES FAQ TODO examples/
%doc %{_mandir}/man1/tmux.1.*
%{_bindir}/tmux
%{_tmpfilesdir}/tmux.conf
%changelog