File tcl-epicstcl.spec of Package tcl-epicstcl
#
# spec file for package tcl-epicstcl
#
# 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 epicstcl_prefix %{_libdir}/tcl/epicstcl
Name: tcl-epicstcl
Version: 2.3+git1580913999.e6ea95d
Release: 0
Summary: Epics interfaces for Tcl/Tk
License: GPL-3.0-only OR TCL
Group: Development/Languages/Tcl
Url: https://sourceforge.net/projects/epicstcl/
Source: epicstcl-%{version}.tar.xz
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: chrpath
BuildRequires: epics-devel
BuildRequires: fontconfig-devel
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libXScrnSaver-devel
BuildRequires: libXext-devel
BuildRequires: libXft-devel
BuildRequires: libtclPlus-devel
BuildRequires: libtool
BuildRequires: make
BuildRequires: tcl
BuildRequires: tcl-devel
BuildRequires: xmlto
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Tcl/Tk bindings for Experimental Physics and Industrial Control System (EPICS).
%prep
%setup -q -n epicstcl-%{version}
%build
autoreconf -s -f -i
%configure \
--with-tclconfig=%{_libdir}/ \
--with-tkconfig=%{_libdir}/ \
--with-tclsh=%{_bindir}/tclsh \
--with-epics-rootdir=%{_libdir}/epics
make %{?_smp_mflags}
%install
mkdir -p %{buildroot}%{epicstcl_prefix}
find . -name \*.tcl -and -not -name epicsServer.tcl -exec install -D -m 0644 {} %{buildroot}%{epicstcl_prefix}/{} \;
echo "pkg_mkIndex %{buildroot}%{epicstcl_prefix} *.tcl" | tclsh
chrpath --delete .libs/libepics.so
install -D -m 0755 .libs/libepics.so %{buildroot}%{epicstcl_prefix}/libepics.so
echo "package ifneeded epics 2.2 [load %{epicstcl_prefix}/libepics.so]" >> %{buildroot}%{epicstcl_prefix}/pkgIndex.tcl
%files
%defattr(-,root,root)
%doc ChangeLog README COPYING
%dir %{epicstcl_prefix}
%{epicstcl_prefix}/*
%changelog