Sophie

Sophie

distrib > Mageia > 5 > i586 > media > nonfree-release-src > by-pkgid > 4cb45acdc2b50cd6c284df90ae08058b > files > 3

smathstudio-0.97.5346-3.mga5.nonfree.src.rpm

Name:		smathstudio
Version:	0.97.5346
Release:	%mkrel 3
Summary:	Small mathematic program with MathCad style
License:	Freeware
Group:		Sciences/Mathematics
URL:		http://en.smath.info
Source0:	http://smath.info/file/yNr4Q/SMathStudioDesktop.0_97_5346.Mono.tar.gz
Source1:	SSLogo48.png
Requires:	mono
Requires:	mono-winforms

%description
A free mathematical package with a graphical interface for the calculation
of mathematical expressions, and constructing two-dimensional and three-
dimensional graphs.

%build
#nothing

%prep
%setup -q -c -n %{name}-%{version}
rm -f %{name}_desktop_mono
gzip lang/*
gzip book/*
gzip examples/*
gzip plugins/*
gzip entries/*
gzip snippets/*
# fix wrong-script-end-of-line-encoding
sed -i 's/\r//' EULA/*
# fix permissions
chmod -x EULA/*
chmod -x book/*
chmod -x snippets/*
chmod -x lang/*
chmod -x entries/*

%install
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -af * %{buildroot}%{_datadir}/%{name}/
rm -rf %{buildroot}%{_datadir}/%{name}/EULA

mkdir -p %{buildroot}%{_datadir}/pixmaps
install -Dm644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.png

install -dm 755 %{buildroot}%{_datadir}/applications
cat > %{name}.desktop << EOF
[Desktop Entry]
Name=SMathStudio
GenericName=SMath Studio Desktop
Comment=Mathematical editor with MathCad style
Comment[ru]=Математический редактор с MathCad стилем
Exec=%{name}
Icon=%{name}
Type=Application
Categories=Education;Math;
EOF
install -m 0644 %{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop

install -dm 755 %{buildroot}%{_bindir}
cat > %{name} << EOF
#!/bin/bash
cd %{_datadir}/%{name}
exec mono "%{_datadir}/%{name}/SMathStudio_Desktop.exe" "\$@"
EOF
install -m 755 %{name} %{buildroot}%{_bindir}/%{name}

%post
gzip -d %{_datadir}/%{name}/lang/*.gz
gzip -d %{_datadir}/%{name}/examples/*.gz
gzip -d %{_datadir}/%{name}/book/*.gz
gzip -d %{_datadir}/%{name}/plugins/*.gz
gzip -d %{_datadir}/%{name}/entries/*.gz
gzip -d %{_datadir}/%{name}/snippets/*.gz

%postun
rm -rf %{_datadir}/%{name}

%files
%doc EULA/*
%{_datadir}/%{name}
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png


%changelog
* Wed Oct 15 2014 umeabot <umeabot> 0.97.5346-3.mga5
+ Revision: 740022
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 0.97.5346-2.mga5.nonfree
+ Revision: 689205
- Mageia 5 Mass Rebuild

* Sun Aug 31 2014 alexl <alexl> 0.97.5346-1.mga5.nonfree
+ Revision: 670155
- imported package smathstudio