diff options
| author | Ben Marsh <[email protected]> | 2019-10-22 09:07:59 -0400 |
|---|---|---|
| committer | Ben Marsh <[email protected]> | 2019-10-22 09:07:59 -0400 |
| commit | bd0027e737c6512397f841c22786274ed74b927f (patch) | |
| tree | f7ffbdb8f3741bb7f24635616cc189cba5cb865c /spec.in | |
| download | shave-and-a-haircut-bd0027e737c6512397f841c22786274ed74b927f.tar.xz shave-and-a-haircut-bd0027e737c6512397f841c22786274ed74b927f.zip | |
Adding Shave-and-a-Haircut 9.6
Diffstat (limited to 'spec.in')
| -rw-r--r-- | spec.in | 146 |
1 files changed, 146 insertions, 0 deletions
@@ -0,0 +1,146 @@ +# Turn off m4 quoting and comments. +m4_changequote(`', `') +m4_changecom(`', `') + +# Shave and a Haircut +# (c) 2019 Epic Games +# US Patent 6720962 + +# +# Under normal circumstances, all you should need to change are the +# following sections: +# +# Packager: +# Summary: +# %description +# + +Packager: Unreal Engine +Summary: A Maya plugin providing photorealistic hair, plus tools to style it. +Name: _PACKAGE_FULL_ +Version: _VERSION_ +Release: _RELEASE_ +License: (c) 2019 Epic Games +Group: Applications/Multimedia +Source: _PACKAGE_FULL_-_VERSION_.tgz +URL: https://www.unrealengine.com/en-US/programs/shave-and-a-haircut +Vendor: Epic Games + +# +# By default, rpmbuild will actually install the package's files (although, +# oddly enough, not the package itself) on the current system. To get +# around that, we can tell it to install everything into a temp directory. +# That also requires that our install section (and by extension, our +# Makefile's "install" target) be flexible enough to install into a +# variable directory. +# +BuildRoot: /tmp/_PACKAGE_FULL_-_VERSION_ + +# +# Maya does not list each of its .so files as a separate provided resource, +# so we have to turn off rpmbuild's automatic generation of requirements +# and provide our own. +# +# Unfortunately that also turns off automatic generation of what this +# package provides, so we must specify that ourselves as well. +# +AutoReqProv: no +# Requires: _MAYA_RPM_VERSION_REQUIRED_ +Provides: _PACKAGE_FULL_ + +# +# Let's not have rpmbuild creating unneeded debuginfo RPMs. +# +%define debug_package %{nil} + +%description +The _PACKAGE_ plugin allows users of Autodesk's Maya modeling and +animation package to create photorealistic hair on polygonal, NURBS and +subdivision surfaces. The plugin supports dynamic collisions between the +hairs and other objects. Tools are providing for styling the hair +interactively. + +%prep +%setup + +%build + +%install +make -f Makefile.linux INSTALL_ROOT=$RPM_BUILD_ROOT install + +# Modern rpmbuild implementations have a "build policy" script which +# compiles all python scripts in the tree. We don't want the resulting +# .pyc and .pyo files in our rpm. We can avoid that by explicitly exiting +# the install section and thereby preventing the build policy scripts +# from executing. +# +exit 0 + +%post +# +# If this is the first install of this package (as opposed to an upgrade) +# then look around for any old pre-rpm versions of the package and get rid +# of their files. +# +if [ $1 = 1 ]; then + # + # Remove old scripts + # + oldFiles="AEshaveGlobalsTemplate.mel AEshaveNodeTemplate.mel \ + shaveDiag.mel shaveRelationshipEditor.mel shaveUI.mel shaveVersion.mel" + + paths="_MAYA_LOCATION_/scripts/AETemplates _MAYA_LOCATION_/scripts/others \ + _MAYA_LOCATION_/scripts/startup _MAYA_LOCATION_/scripts/obsolete \ + _MAYA_LOCATION_/scripts/unsupported" + + for d in $paths; do + if [ -d $d ]; then + for f in $oldFiles; do + if [ -r $d/$f ]; then + rm -f $d/$f + fi + done + fi + done + + # + # Remove old plugins and executables + # + oldFiles="shaveNode.so shaveRibDump shave" + paths="_MAYA_LOCATION_/bin/plug-ins" + + for f in $oldFiles; do + if [ -r $paths/$f ]; then + rm -f $paths/$f + fi + done +fi + +# Remove the old Joe Alter shave tree, if it is empty. +# +oldAlterTree="_MAYA_LOCATION_/modules/JoeAlter" +oldShaveTree="${oldAlterTree}/shaveHaircut" + +if [ -d "${oldShaveTree}" ]; then + nonDirs=`find "${oldShaveTree}" \! -type d` + + if [ -z "${nonDirs}" ]; then + rm -rf "${oldShaveTree}" + fi +fi + +# Remove the Joe Alter tree as well, if it is now empty. +# +if [ -d "${oldAlterTree}" ]; then + nonDirs=`find "${oldAlterTree}" \! -type d` + + if [ -z "${nonDirs}" ]; then + rm -rf "${oldAlterTree}" + fi +fi + +# +# The Makefile will automatically append the package's files to the end of +# this file, so make sure that %files is the very last section. +# +%files |