File squeak-image.spec of Package squeak-image

%global image_major 4
%global image_minor 5
%global image_release 13680
%global full_name Squeak%{image_major}.%{image_minor}-%{image_release}
%global sources_minor 1

Name:           squeak-image
Version:        %{image_major}.%{image_minor}.%{image_release}
Release:        0
Summary:        The image files for Squeak

Group:          Development/Languages/Other
License:        MIT
URL:            http://www.squeak.org
Source0:        http://ftp.squeak.org/%{version}/%{full_name}.zip
Source1:        http://ftp.squeak.org/sources_files/SqueakV%{image_major}%{sources_minor}.sources.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Requires:       squeak-vm >= 4.4.7.2357
BuildRequires:  unzip

BuildArch:      noarch

%description
This is the standard Squeak image as distributed by sqeak.org.
The Squeak image is split into three interdependent parts,
the .image file, the .changes file, and the .sources file.

%prep
%setup -q -c %{name}-%{version}

%build

%install
mkdir -p %{buildroot}%{_datadir}/squeak
cp %{full_name}.image %{buildroot}%{_datadir}/squeak
cp %{full_name}.changes %{buildroot}%{_datadir}/squeak
zcat %{SOURCE1} > %{buildroot}%{_datadir}/squeak/SqueakV%{image_major}%{sources_minor}.sources
cd %{buildroot}%{_datadir}/squeak
ln -sf %{full_name}.image squeak.image
ln -sf %{full_name}.changes squeak.changes
ln -s SqueakV%{image_major}%{sources_minor}.sources SqueakV%{image_major}.sources
ln -s SqueakV%{image_major}%{sources_minor}.sources squeak.sources

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%{_datadir}/squeak

%changelog
openSUSE Build Service is sponsored by