4be2c7
%global _hardened_build 1
4be2c7
4be2c7
Name:           tmux
4be2c7
Version:        2.7
4be2c7
Release:        1%{?dist}
4be2c7
Summary:        A terminal multiplexer
4be2c7
4be2c7
Group:          Applications/System
4be2c7
# Most of the source is ISC licensed; some of the files in compat/ are 2 and
4be2c7
# 3 clause BSD licensed.
4be2c7
License:        ISC and BSD
4be2c7
URL:            https://tmux.github.io/
4be2c7
Source0:        https://github.com/tmux/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
4be2c7
# Examples has been removed - so include the bash_completion here
4be2c7
Source1:        bash_completion_tmux.sh
4be2c7
4be2c7
BuildRequires:  gcc
4be2c7
BuildRequires:  ncurses-devel
4be2c7
BuildRequires:  libevent-devel
4be2c7
BuildRequires:  libutempter-devel
4be2c7
4be2c7
%description
4be2c7
tmux is a "terminal multiplexer."  It enables a number of terminals (or
4be2c7
windows) to be accessed and controlled from a single terminal.  tmux is
4be2c7
intended to be a simple, modern, BSD-licensed alternative to programs such
4be2c7
as GNU Screen.
4be2c7
4be2c7
%prep
4be2c7
%autosetup
4be2c7
4be2c7
%build
4be2c7
%configure
4be2c7
%make_build
4be2c7
4be2c7
4be2c7
%install
4be2c7
%make_install
4be2c7
# bash completion
4be2c7
install -Dpm 644 %{SOURCE1} %{buildroot}%{_datadir}/bash-completion/completions/tmux
4be2c7
4be2c7
%post
4be2c7
if [ "$1" = 1 ]; then
4be2c7
  if [ ! -f %{_sysconfdir}/shells ] ; then
4be2c7
    touch %{_sysconfdir}/shells
4be2c7
  fi
4be2c7
  for binpath in %{_bindir} /bin; do
4be2c7
    if ! grep -q "^${binpath}/tmux$" %{_sysconfdir}/shells; then
4be2c7
       (cat %{_sysconfdir}/shells; echo "$binpath/tmux") > %{_sysconfdir}/shells.new
4be2c7
       mv %{_sysconfdir}/shells{.new,}
4be2c7
    fi
4be2c7
  done
4be2c7
fi
4be2c7
4be2c7
%postun
4be2c7
if [ "$1" = 0 ] && [ -f %{_sysconfdir}/shells ] ; then
4be2c7
  sed -e '\!^%{_bindir}/tmux$!d' -e '\!^/bin/tmux$!d' < %{_sysconfdir}/shells > %{_sysconfdir}/shells.new
4be2c7
  mv %{_sysconfdir}/shells{.new,}
4be2c7
fi
4be2c7
4be2c7
%files
4be2c7
%doc CHANGES TODO
4be2c7
%{_bindir}/tmux
4be2c7
%{_mandir}/man1/tmux.1.*
4be2c7
%{_datadir}/bash-completion/completions/tmux
4be2c7
4be2c7
%changelog
4be2c7
* Thu Apr 19 2018 Filipe Rosset <rosset.filipe@gmail.com> - 2.7-1
4be2c7
- update to version 2.7, fixes rhbz #1486507
4be2c7
- removed upstreamed patches + spec modernization
4be2c7
4be2c7
* Mon Apr 09 2018 Filipe Rosset <rosset.filipe@gmail.com> - 2.6-4
4be2c7
- added gcc as BR
4be2c7
4be2c7
* Wed Feb 14 2018 Kevin Fenzi <kevin@scrye.com> - 2.6-3
4be2c7
- Rebuild for new libevent
4be2c7
4be2c7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-2
4be2c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
4be2c7
4be2c7
* Fri Jan 26 2018 Andreas Schneider <asn@redhat.com> - 2.6-1
4be2c7
- Update to version 2.6
4be2c7
- Use hardened build
4be2c7
4be2c7
* Sat Aug 05 2017 Filipe Rosset <rosset.filipe@gmail.com> - 2.5-4
4be2c7
- Fixes rhbz #1476851 tmux bell-action other not working
4be2c7
- Fixes rhbz #1476892 tmux update in F26 broke tmuxinator
4be2c7
4be2c7
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-3
4be2c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
4be2c7
4be2c7
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-2
4be2c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
4be2c7
4be2c7
* Sat Jun 10 2017 Filipe Rosset <rosset.filipe@gmail.com> - 2.5-1
4be2c7
- New upstream release 2.5 - fixes rhbz #1449666
4be2c7
- https://raw.githubusercontent.com/tmux/tmux/2.5/CHANGES
4be2c7
4be2c7
* Fri Apr 21 2017 Filipe Rosset <rosset.filipe@gmail.com> - 2.4-2
4be2c7
- rebuild tmux as PIE  - fixes rhbz #1324104
4be2c7
4be2c7
* Fri Apr 21 2017 Filipe Rosset <rosset.filipe@gmail.com> - 2.4-1
4be2c7
- New upstream release - fixes rhbz #1444011
4be2c7
4be2c7
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3-2
4be2c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
4be2c7
4be2c7
* Fri Oct 28 2016 Sven Lankes <sven@lank.es> - 2.3-1
4be2c7
- New upstream release - fixes rhbz #1380562
4be2c7
- Adapt shells handling to be atomic and support rpm-ostree - fixes rhbz #1367587
4be2c7
4be2c7
* Tue May 24 2016 Sven Lankes <sven@lank.es> - 2.2-3
4be2c7
- add libutempter-devel as buildrequires to allow writing to utmp
4be2c7
- fixes rhbz #1338936 
4be2c7
4be2c7
* Mon May 09 2016 Sven Lankes <sven@lank.es> - 2.2-2
4be2c7
- Adapt source0 and url for new website (fixes rhbz #1334255)
4be2c7
4be2c7
* Wed Apr 20 2016 Sven Lankes <sven@lank.es> - 2.2-1
4be2c7
- New upstream release
4be2c7
4be2c7
* Tue Feb 23 2016 Sven Lankes <sven@lank.es> - 2.1-3
4be2c7
- use more correct bash completion path (thanks to Carl George)
4be2c7
4be2c7
* Mon Feb 22 2016 Sven Lankes <sven@lank.es> - 2.1-2
4be2c7
- add upstream bash-completion (thanks to Scott Tsai - closes rhbz #1148183)
4be2c7
4be2c7
* Mon Feb 22 2016 Sven Lankes <sven@lank.es> - 2.1-1
4be2c7
- New upstream release 
4be2c7
4be2c7
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-3
4be2c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
4be2c7
4be2c7
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-2
4be2c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
4be2c7
4be2c7
* Thu May 07 2015 Filipe Rosset <rosset.filipe@gmail.com> - 2.0-1
4be2c7
- Rebuilt for new upstream version 2.0, fixes rhbz #1219300
4be2c7
4be2c7
* Fri Jan 02 2015 Sven Lankes <sven@lank.es> - 1.9a-5
4be2c7
- Pull in upstream commit to fix Fx-Key issues. rhbz #1177652
4be2c7
4be2c7
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9a-4
4be2c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
4be2c7
4be2c7
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9a-3
4be2c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
4be2c7
4be2c7
* Wed Feb 26 2014 Filipe Rosset <rosset.filipe@gmail.com> 1.9a-2
4be2c7
- Fix rhbz #1069950, upstream [tmux:tickets] #105
4be2c7
4be2c7
* Sun Feb 23 2014 Filipe Rosset <rosset.filipe@gmail.com> 1.9a-1
4be2c7
- New upstream release 1.9a
4be2c7
4be2c7
* Sat Feb 22 2014 Filipe Rosset <rosset.filipe@gmail.com> 1.9-1
4be2c7
- New upstream release 1.9
4be2c7
- Fix rhbz #1067860
4be2c7
4be2c7
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8-3
4be2c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4be2c7
4be2c7
* Mon Jun 10 2013 Petr Ĺ abata <contyk@redhat.com> - 1.8-2
4be2c7
- Remove tmux from the shells file upon package removal (#972633)
4be2c7
4be2c7
* Sat Apr 13 2013 Sven Lankes <sven@lank.es> 1.8-1
4be2c7
- New upstream release
4be2c7
4be2c7
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7-2
4be2c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
4be2c7
4be2c7
* Sat Oct 13 2012 Sven Lankes <sven@lank.es> 1.7-1
4be2c7
- New upstream release
4be2c7
4be2c7
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-2
4be2c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
4be2c7
4be2c7
* Tue Jan 31 2012 Sven Lankes <sven@lank.es> 1.6-1
4be2c7
- New upstream release
4be2c7
4be2c7
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-2
4be2c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
4be2c7
4be2c7
* Tue Nov 01 2011 Sven Lankes <sven@lank.es> 1.5-1
4be2c7
- New upstream release
4be2c7
- Do the right thing (tm) and revert to $upstream-behaviour: 
4be2c7
   No longer install tmux setgid and no longer use /var/run/tmux 
4be2c7
   for sockets. Use "tmux -S /var/run/tmux/tmux-`id -u`/default attach"
4be2c7
   if you need to access an "old" tmux session
4be2c7
- tmux can be used as a login shell so add it to /etc/shells
4be2c7
4be2c7
* Sat Apr 16 2011 Sven Lankes <sven@lank.es> 1.4-4
4be2c7
- Add /var/run/tmp to tmpdir.d - fixes rhbz 656704 and 697134
4be2c7
4be2c7
* Sun Apr 10 2011 Sven Lankes <sven@lank.es> 1.4-3
4be2c7
- Fix CVE-2011-1496
4be2c7
- Fixes rhbz #693824
4be2c7
4be2c7
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-2
4be2c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
4be2c7
4be2c7
* Tue Dec 28 2010 Filipe Rosset <rosset.filipe@gmail.com> 1.4-1
4be2c7
- New upstream release
4be2c7
4be2c7
* Fri Aug 06 2010 Filipe Rosset <filiperosset@fedoraproject.org> 1.3-2
4be2c7
- Rebuild for F-13
4be2c7
4be2c7
* Mon Jul 19 2010 Sven Lankes <sven@lank.es> 1.3-1
4be2c7
- New upstream release
4be2c7
4be2c7
* Sun Mar 28 2010 Sven Lankes <sven@lank.es> 1.2-1
4be2c7
- New upstream release
4be2c7
- rediff writehard patch
4be2c7
4be2c7
* Mon Nov 09 2009 Sven Lankes <sven@lank.es> 1.1-1
4be2c7
- New upstream release
4be2c7
4be2c7
* Sun Nov 01 2009 Sven Lankes <sven@lank.es> 1.0-2
4be2c7
- Add debian patches
4be2c7
- Add tmux group for improved socket handling
4be2c7
4be2c7
* Sat Oct 24 2009 Sven Lankes <sven@lank.es> 1.0-1
4be2c7
- New upstream release
4be2c7
4be2c7
* Mon Jul 13 2009 Chess Griffin <chess@chessgriffin.com> 0.9-1
4be2c7
- Update to version 0.9.
4be2c7
- Remove sed invocation as this was adopted upstream.
4be2c7
- Remove optflags patch since upstream source now uses ./configure and
4be2c7
  detects the flags when passed to make.
4be2c7
4be2c7
* Tue Jun 23 2009 Chess Griffin <chess@chessgriffin.com> 0.8-5
4be2c7
- Note that souce is mostly ISC licensed with some 2 and 3 clause BSD in
4be2c7
  compat/.
4be2c7
- Remove fixiquote.patch and instead use a sed invocation in setup.
4be2c7
4be2c7
* Mon Jun 22 2009 Chess Griffin <chess@chessgriffin.com> 0.8-4
4be2c7
- Add optimization flags by patching GNUmakefile and passing LDFLAGS
4be2c7
  to make command.
4be2c7
- Use consistent macro format.
4be2c7
- Change examples/* to examples/ and add TODO to docs.
4be2c7
4be2c7
* Sun Jun 21 2009 Chess Griffin <chess@chessgriffin.com> 0.8-3
4be2c7
- Remove fixperms.patch and instead pass them at make install stage.
4be2c7
4be2c7
* Sat Jun 20 2009 Chess Griffin <chess@chessgriffin.com> 0.8-2
4be2c7
- Fix Source0 URL to point to correct upstream source.
4be2c7
- Modify fixperms.patch to set 644 permissions on the tmux.1.gz man page.
4be2c7
- Remove wildcards from 'files' section and replace with specific paths and
4be2c7
  filenames.
4be2c7
4be2c7
* Mon Jun 15 2009 Chess Griffin <chess@chessgriffin.com> 0.8-1
4be2c7
- Initial RPM release.