File matlab-support.spec of Package matlab-launcher

Name:           matlab-launcher
Version:        0.0.1
Release:        0
Summary:        MATLAB launcher
License:        GPL-2.0+
Group:          Development/Tools/Other 
Url:            http://www.mathworks.com
Source0:        matlab.desktop
Source1:        matlab.png
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} 
BuildRequires:  update-desktop-files
%endif

%description
MATLAB launcher. Whole package is pointless without Matlab.

%prep

%build

%install
mkdir -p %{buildroot}%{_datadir}/icons
cp %{SOURCE1} %{buildroot}%{_datadir}/icons/matlab.png
mkdir -p %{buildroot}%{_datadir}/applications
cp %{SOURCE0} %{buildroot}%{_datadir}/applications/matlab.desktop

%if 0%{?suse_version} 
 %suse_update_desktop_file matlab
%endif

%posttrans
%if 0%{?suse_version} > 1140
 %desktop_database_posttrans
%endif

%postun
%if 0%{?suse_version} > 1140
 %desktop_database_postun
%endif

%files
%defattr(755,root,root,755)
%{_datadir}/applications/matlab.desktop
%defattr(644,root,root,755)
%{_datadir}/icons/matlab.png

%changelog
openSUSE Build Service is sponsored by