File libtclPlus.spec of Package libtclplus
#
# spec file for package libtclPlus
#
# 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/
#
%define sover 2
Name: libtclPlus
Version: 3.0.6
Release: 0
Summary: C++ encapsulation of a Tcl API subset for NSCL Data Acquisition System
License: GPL-3.0-only
Group: Development/Languages/C and C++
Url: https://sourceforge.net/projects/nscldaq/
Source: %{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM fix-no-return-in-nonvoid-function.patch - matwey.kornilov@gmail.com -- fix UB
Patch2: fix-no-return-in-nonvoid-function.patch
# PATCH-FIX-UPSTREAM makefile-testrunner.patch - matwey.kornilov@gmail.com -- fix parallel build
Patch3: makefile-testrunner.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: make
BuildRequires: tcl-devel
BuildRequires: tk-devel
BuildRequires: pkgconfig(cppunit)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The tclPlus library provides a C++ object oriented encapsulation of a large
subset of the Tcl application programming interface.
%package -n libtclPlus%{sover}
Summary: C++ encapsulation of a Tcl API subset for NSCL Data Acquisition System
Group: Development/Libraries/C and C++
%description -n libtclPlus%{sover}
The tclPlus library provides a C++ object oriented encapsulation of a large
subset of the Tcl application programming interface.
%package devel
Summary: C++ encapsulation of a Tcl API subset for NSCL Data Acquisition System
Group: Development/Libraries/C and C++
Requires: libtclPlus%{sover} = %{version}
Requires: tcl-devel
Requires: tk-devel
%description devel
This package contains devel files for libtclPlus library.
%prep
%setup -q
%patch2 -p1
%patch3 -p1
%build
autoreconf -s -f -i
%configure --with-tclconfig=%{_libdir} --with-tkconfig=%{_libdir}
make %{?_smp_mflags} LIB_RUNTIME_DIR='%{_libdir}/tcl'
%install
%make_install LIB_RUNTIME_DIR='%{_libdir}/tcl'
# Drop static libraries
find %{buildroot} \( -name '*.la' -or -name '*.a' \) -delete
%fdupes %buildroot
%post -n libtclPlus%{sover} -p /sbin/ldconfig
%postun -n libtclPlus%{sover} -p /sbin/ldconfig
%files -n libtclPlus%{sover}
%defattr(-,root,root)
%doc ChangeLog
%license COPYING
%{_libdir}/libException.so.%{sover}*
%{_libdir}/libtclPlus.so.%{sover}*
%files devel
%license COPYING
%defattr(-,root,root)
%{_bindir}/evttclsh
%{_includedir}/*
%{_libdir}/libException.so
%{_libdir}/libtclPlus.so
%changelog