## # Don't try fancy stuff like debuginfo, which is useless on binary-only # packages. %define __spec_install_post /usr/lib/rpm/brp-compress %define parent matlabR14 %define _instdir /opt/matlabR14 ## # Tooldirs are the ones to pay attention to. There will also be "etc" and # "update" but they will just get in the way. For the vast majority of # toolboxes, these are either "help toolbox" or "help java toolbox". Some of # them will also have "bin". %define _tooldirs help toolbox #------------------------------------------------------------------------------ Summary: MatlabR14 (7.0) [[NAME]] toolbox ## # Prodname is the abbreviation mathworks uses in their URL. I.e. if # the URL for the toolbox is http://mathworks.com/products/sysid, then # "prodname" is "sysid". Name: %{parent}-toolbox-[[prodname]] ## # Toolbox version is listed in the file Contents.m somewhere in the # toolbox source. I usually use this while in the toolbox install tree: # find -name 'Contents.m' -exec grep Version {} \; # Version: [[toolbox-version]] Release: 0.duke.1 Epoch: 0 License: Commercial ## # Your toolbox will need to be installed in the # matlab[[R-version]]-toolbox-[[prodname]] and then tarred into .tar.gz # that way. I.e. matlabR14-toolbox-sysid-1.1.tar.gz # Source: %{name}-%{version}.tar.gz NoSource: 0 Group: Applications/Engineering URL: http://www.mathworks.com/products/[[prodname]] AutoReqProv: 0 BuildArch: i386 BuildRoot: %{_tmppath}/%{name}-%{version}-root ## # Some toolboxes have inter-dependencies! # Requires: %{parent}-toolbox-control ## # This is so pathdef.m file gets regenerated after toolbox install. # PreReq: %{parent} ## # Description can be obtained on the page listed in the URL field. # %description [[Get it from mathworks.com]] #------------------------------------------------------------------------------ %prep %setup -q ## # Remove junk left over from installation. # find -name 'install_matlab*' -exec rm -f {} \; find -name 'license.dat' -exec rm -f {} \; #------------------------------------------------------------------------------ %install %{__rm} -rf %{buildroot} %{__mkdir_p} -m 755 %{buildroot}%{_instdir} for TOOLDIR in %{_tooldirs}; do %{__cp} -rp $TOOLDIR %{buildroot}%{_instdir} done ## # This will be auto-generated during install. # %{__rm} -f %{buildroot}%{_instdir}/toolbox/local/pathdef.m #------------------------------------------------------------------------------ %clean %{__rm} -rf %{buildroot} #------------------------------------------------------------------------------ %post %{_sysconfdir}/%{parent}/mkpathdef #------------------------------------------------------------------------------ %postun %{_sysconfdir}/%{parent}/mkpathdef #------------------------------------------------------------------------------ %files %defattr(-,root,root,-) %{_instdir}/* #------------------------------------------------------------------------------ %changelog * Thu Oct 04 2004 Konstantin Ryabitsev - Template created.