File cssc.spec of Package cssc

#
# spec file for package cssc
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#


Name:           cssc
Version:        1.4.1
Release:        0
Summary:        GNU SCCS version control suite
License:        GPL-2.0-or-later AND BSD-3-Clause
Group:          Development/Tools/Version Control
Url:            http://savannah.gnu.org/projects/cssc
Source0:        http://ftp.gnu.org/gnu/cssc/CSSC-1.4.1.tar.gz
Source1:        http://ftp.gnu.org/gnu/cssc/CSSC-1.4.1.tar.gz.sig
Source2:        cssc.keyring
# Not part of the tarball; fetched from git://git.savannah.gnu.org/cssc.git
# The BSD license covers sccs.c, sccs.me, sccs.1
Source3:        COPYING.bsd
Provides:       /usr/bin/sccs
Provides:       SCCS
Requires(post):	%{install_info_prereq}
Requires(preun):	%{install_info_prereq}
Requires:       coreutils
Requires:       diffutils
BuildRequires:  gcc-c++
BuildRequires:  groff
BuildRequires:  makeinfo
# The following 3 are needed for autoreconf (see below)
BuildRequires:  autoconf213
BuildRequires:  automake
BuildRequires:  libtool
# The following dependencies are for building and running tests
# They could be dropped if "make check" was skipped
BuildRequires:  cvs
BuildRequires:  git-core
BuildRequires:  python

%description
CSSC is a compatible replacement for the traditional UNIX version control suite
SCCS. It is fully compatible in terms of file format and all the programs are
fully compatible with their SCCS equivalents (except for sccs-comb, which is not
provided). SCCS is a proprietary suite of tools which is provided with most
commercial versions of Unix. The purpose behind CSSC is to provide a work-alike
for SCCS which can be used on the various Free versions of Unix.
Using SCCS for version control is not recommended for new projects, but the
tools from this package may come handy when dealing with legacy code.

%package legacy
Summary:        GNU SCCS: legacy binaries
# ksh contains "what"
Group:          Development/Tools/Version Control
Conflicts:      ksh
Requires:       %{name} = %{version}-%{release}

%description legacy
This package contains symbolic links for the SCCS commands "get", "what", etc.
in /usr/bin.

%prep
%autosetup -n CSSC-%{version} -p1
cp %{SOURCE3} .

%build
autoreconf-2.13 -i
%configure --enable-binary
%make_build
groff -me -Tutf8 docs/sccs.me >docs/sccs.txt
cat >>docs/sccs.txt <<EOF
----
This file was generated with "groff -me -Tutf8 sccs.me".
Use groff's -T option to generate formats like ps or html.
EOF

%check
make check

%install
%make_install
relpath=$(/usr/bin/realpath --relative-to=%{_bindir} %{_libexecdir})
cd $RPM_BUILD_ROOT/%{_bindir}
ln -s -t . $relpath/cssc/*

%post
%install_info --info-dir=%{_infodir} %{_infodir}/cssc.info.gz

%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/cssc.info.gz

%files
%defattr(-, root, root)
%{_infodir}/cssc.info*
%{_mandir}/man1/sccs.1.gz
%dir %{_libexecdir}/cssc
%{_libexecdir}/cssc/*
%{_bindir}/sccs
%doc README AUTHORS NEWS THANKS
%doc docs/sccs.txt docs/sccs.me
%license COPYING
%license COPYING.bsd

%files legacy
%defattr(-, root, root)
%{_bindir}/*
%exclude %{_bindir}/sccs

%changelog
openSUSE Build Service is sponsored by