Blob Blame History Raw
%global commit ac3f1cd082ba21a55edaabd826580996f5b77595
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name:           jimtcl
Version:        0.73
Release:        4%{?dist}
Summary:        A small embeddable Tcl interpreter

License:        BSD
Group:          Development/Languages
URL:            http://jim.tcl.tk
Source0:        https://github.com/msteveb/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
Patch0:         jimtcl-dont_delete_source_files.patch
Patch1:         jimtcl-fix_hardcoded_install_paths.patch
Patch2:         jimtcl-fix_doc_paths.patch
Patch3:         jimtcl-add_soname.patch

BuildRequires:  asciidoc 
#Requires:       

%description
Jim is an opensource small-footprint implementation of the Tcl programming 
language. It implements a large subset of Tcl and adds new features like 
references with garbage collection, closures, built-in Object Oriented 
Programming system, Functional Programming commands, first-class arrays and 
UTF-8 support.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%prep
%setup -qn %{name}-%{commit}
%patch0
%patch1
%patch2
%patch3
iconv --from=ISO-8859-1 --to=UTF-8 AUTHORS > AUTHORS.new
mv AUTHORS.new AUTHORS
iconv --from=ISO-8859-1 --to=UTF-8 LICENSE > LICENSE.new
mv LICENSE.new LICENSE


%build
#configure is not able to locate the needed binaries, so specify it manualy
export CC=gcc
export LD=ld
export AR=ar
export RANLIB=ranlib
export STRIP=strip

%configure --full --shared --disable-option-checking
make %{?_smp_mflags}

%check
make test

%install
%make_install
rm -rf %{buildroot}/%{_datadir}/doc/%{name}
pushd %{buildroot}/%{_libdir}/
ln -s libjim.so.* libjim.so
popd

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%doc LICENSE AUTHORS README Tcl.html
%{_bindir}/jimsh
%{_libdir}/libjim.so.*

%files devel
%doc DEVELOPING README.extensions README.metakit README.namespaces README.oo README.utf-8 STYLE
%{_includedir}/*
%{_bindir}/build-jim-ext
%{_libdir}/libjim.so

%changelog
* Mon May 06 2013 Markus Mayer <lotharlutz@gmx.de> - 0.73-4
- Change soname to libjim.0.73 (as suggested by upstream)

* Sun May 05 2013 Markus Mayer <lotharlutz@gmx.de> - 0.73-3
- fix source url
- add symlink to library to devel package

* Sun May 05 2013 Markus Mayer <lotharlutz@gmx.de> - 0.73-2
- fix source url
- convert LICENSE and AUTHORS to UTF-8
- remove not needed '%defattr(-,root,root,-)' and 'rm -rf $RPM_BUILD_ROOT'
- add add soname to lib(jimtcl-add_soname.patch)
- add README.* files to %doc
- add STYLE file to %doc

* Sun May 05 2013 Markus Mayer <lotharlutz@gmx.de> - 0.73-1
- inital prm release