%{!?tcl_version: %define tcl_version %(echo 'puts $tcl_version' | tclsh)} %{!?tcl_sitelib: %define tcl_sitelib %{_datadir}/tcl%{tcl_version}} %define dotests 1 Summary: The standard Tcl library Name: tcllib Version: 1.20 Release: 1 License: TCL Group: Development/Libraries Source0: https://sourceforge.net/projects/tcllib/files/%{name}/%{version}/%{name}-%{version}.tar.gz/download URL: http://tcllib.sourceforge.net/ BuildRequires: tcl-devel >= 8.6.8 Requires: tcl >= 8.6.8 %description Tcllib, the Tcl Standard Library is a collection of Tcl packages that provide utility functions useful to a large collection of Tcl programmers. %prep %setup -q chmod -x modules/doctools/mpformats/fr.msg %build #configure is run to create test target ./configure --prefix=%{_prefix} # Nothing to build if [ "%{dotests}" == 1 ] then ( gmake -k check || true ) fi %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} echo 'not available' > modules/imap4/imap4.n %{_bindir}/tclsh installer.tcl -no-gui -no-wait -no-html -no-examples \ -pkg-path ${RPM_BUILD_ROOT}/%{tcl_sitelib}/%{name}-%{version} \ -app-path ${RPM_BUILD_ROOT}%{_bindir} \ -nroff-path ${RPM_BUILD_ROOT}%{_mandir}/man1 # install HTML documentation into specific modules sub-directories: ( cd modules cp ftp/docs/*.html ftp/ for module in comm exif ftp mime stooop struct textutil; do mkdir -p ../$module && cp $module/*.html ../$module/; done ) # clean up rpmlint warnings find ${RPM_BUILD_ROOT}%{_datadir} -name \*.tcl -exec chmod 0644 {} \; %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc support/releases/PACKAGES README.md support/releases/history/README-%{version}.txt %doc ChangeLog license.terms %{_bindir}/* %{_mandir}/man1/* %{tcl_sitelib}/%{name}-%{version} %changelog * Mon Dec 07 2020 Ashwini Chandrappa - 1.20-1 - Updated to new version 1.20 * Thu Jul 11 2019 Ravi Hirekurabar - 1.19-1 - Initial port to AIX