add tcl.attr to generate 'tcl(abi)' requires automatically
This commit is contained in:
19
tcl.attr
Normal file
19
tcl.attr
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
%__tcl_path ^(%{_datadir}|%{_libdir})/tcl[[:digit:]]+\\.[[:digit:]]+/.+
|
||||||
|
|
||||||
|
%__tcl_requires() %{lua:
|
||||||
|
-- Match buildroot paths of the form
|
||||||
|
-- /PATH/OF/BUILDROOT/usr/lib(64)/tclMAJOR.MINOR/ and
|
||||||
|
-- /PATH/OF/BUILDROOT/usr/share/tclMAJOR.MINOR/
|
||||||
|
-- generating a line of the form:
|
||||||
|
-- tcl(abi) = MAJOR.MINOR
|
||||||
|
local path = rpm.expand('%1')
|
||||||
|
local datadir = rpm.expand('%_datadir')
|
||||||
|
local libdir = rpm.expand('%_libdir')
|
||||||
|
for i, dir in ipairs({datadir, libdir}) do
|
||||||
|
if path:match(dir .. '/tcl%d+%.%d+/.*') then
|
||||||
|
local requires = path:gsub('.*' .. dir .. '/tcl(%d+%.%d+)/.*', 'tcl(abi) = %1')
|
||||||
|
print(requires)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
}
|
||||||
8
tcl.spec
8
tcl.spec
@@ -2,13 +2,14 @@
|
|||||||
|
|
||||||
Name: tcl
|
Name: tcl
|
||||||
Version: 8.6.16
|
Version: 8.6.16
|
||||||
Release: 1
|
Release: 2
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: The Tool Command Language implementation
|
Summary: The Tool Command Language implementation
|
||||||
License: TCL AND GPL-3.0-or-later WITH bison-exception-2.2 AND BSD-3-Clause
|
License: TCL AND GPL-3.0-or-later WITH bison-exception-2.2 AND BSD-3-Clause
|
||||||
URL: https://sourceforge.net/projects/tcl/
|
URL: https://sourceforge.net/projects/tcl/
|
||||||
Source0: https://downloads.sourceforge.net/sourceforge/tcl/tcl-core%{version}-src.tar.gz
|
Source0: https://downloads.sourceforge.net/sourceforge/tcl/tcl-core%{version}-src.tar.gz
|
||||||
Source1: macros.tcl
|
Source1: macros.tcl
|
||||||
|
Source2: tcl.attr
|
||||||
|
|
||||||
BuildRequires: autoconf zlib-devel systemtap-sdt-devel gcc
|
BuildRequires: autoconf zlib-devel systemtap-sdt-devel gcc
|
||||||
Provides: tcl(abi) = %{MAJOR}
|
Provides: tcl(abi) = %{MAJOR}
|
||||||
@@ -90,6 +91,7 @@ sed -i -e "s|$PWD/unix|%{_libdir}|; s|$PWD|%{_includedir}/%{name}-private|" %{bu
|
|||||||
rm -rf %{buildroot}/%{_datadir}/%{name}%{MAJOR}/ldAix
|
rm -rf %{buildroot}/%{_datadir}/%{name}%{MAJOR}/ldAix
|
||||||
|
|
||||||
install -D -m644 %{S:1} %{buildroot}%{_rpmmacrodir}/macros.tcl
|
install -D -m644 %{S:1} %{buildroot}%{_rpmmacrodir}/macros.tcl
|
||||||
|
install -D -m644 %{S:2} %{buildroot}%{_fileattrsdir}/tcl.attr
|
||||||
|
|
||||||
%check
|
%check
|
||||||
pushd unix
|
pushd unix
|
||||||
@@ -106,6 +108,7 @@ popd
|
|||||||
%{_libdir}/lib%{name}%{MAJOR}.so
|
%{_libdir}/lib%{name}%{MAJOR}.so
|
||||||
%exclude %{_datadir}/%{name}%{MAJOR}/tclAppInit.c
|
%exclude %{_datadir}/%{name}%{MAJOR}/tclAppInit.c
|
||||||
%{_rpmmacrodir}/macros.tcl
|
%{_rpmmacrodir}/macros.tcl
|
||||||
|
%{_fileattrsdir}/tcl.attr
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_includedir}/*
|
%{_includedir}/*
|
||||||
@@ -121,6 +124,9 @@ popd
|
|||||||
%{_mandir}/man?/*
|
%{_mandir}/man?/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Aug 02 2025 Funda Wang <fundawang@yeah.net> - 1:8.6.16-2
|
||||||
|
- add tcl.attr to generate 'tcl(abi)' requires automatically
|
||||||
|
|
||||||
* Wed Dec 25 2024 Funda Wang <fundawang@yeah.net> - 1:8.6.16-1
|
* Wed Dec 25 2024 Funda Wang <fundawang@yeah.net> - 1:8.6.16-1
|
||||||
- update to 8.6.16
|
- update to 8.6.16
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user