File reptyr.spec of Package reptyr

#
# spec file for package reptyr
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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:           reptyr
Version:        0.6.2
Release:        0
Summary:        A tool for "re-ptying" programs
License:        MIT
Group:          System/Console
Url:            http://github.com/nelhage/reptyr
Source:         https://github.com/nelhage/reptyr/archive/%{name}-%{version}.tar.gz
Patch0:         0001-Placate-a-gcc7-warning.patch
Patch1:         0002-Include-sysmacros.h.patch
Patch2:         0003-Build-with-fstrict-aliasing.patch
BuildRequires:  gcc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %{ix86} x86_64 %{arm}

%description
reptyr is a utility for taking an existing running program and
attaching it to a new terminal. Started a long-running process over
ssh, but have to leave and don't want to interrupt it? Just start a
screen, use reptyr to grab it, and then kill the ssh session and head
on home.

%prep
%setup -q -n %{name}-%{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1

%build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
make

%install
make PREFIX="%{buildroot}%{_prefix}" install

%files
%defattr(-,root,root)
%doc ChangeLog COPYING README.md NOTES 
%doc %{_mandir}/man1/reptyr.1%{ext_man}
%doc %{_mandir}/fr/man1/reptyr.1%{ext_man}
%{_bindir}/reptyr

%changelog
openSUSE Build Service is sponsored by