85 lines
1.4 KiB
Plaintext
85 lines
1.4 KiB
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
list_install_files()
|
||
|
{
|
||
|
for d in \
|
||
|
${OSGHOME}/bin\
|
||
|
${OSGHOME}/lib\
|
||
|
${OSGHOME}/include
|
||
|
do
|
||
|
dd=`basename $d`
|
||
|
for f in `ls -1 $d`
|
||
|
do
|
||
|
echo cp -rf \
|
||
|
/usr/src/redhat/BUILD/OpenSceneGraph-"$OSGVERSION"/$dd/$f /usr/$dd/$f
|
||
|
done
|
||
|
done
|
||
|
}
|
||
|
|
||
|
list_attr_files()
|
||
|
{
|
||
|
for d in \
|
||
|
${OSGHOME}/bin\
|
||
|
${OSGHOME}/lib
|
||
|
do
|
||
|
dd=`basename $d`
|
||
|
for f in $d/*
|
||
|
do
|
||
|
ff=`basename $f`
|
||
|
echo "%attr(755, root, root) /usr/$dd/$ff"
|
||
|
done
|
||
|
done
|
||
|
|
||
|
for f in ${OSGHOME}/include/osg/*
|
||
|
do
|
||
|
ff=`basename $f`
|
||
|
echo "%attr(444, root, root) /usr/include/osg/$ff"
|
||
|
done
|
||
|
}
|
||
|
|
||
|
[ -z "$OSGHOME" ] && (echo Please define OSGHOME; exit 1)
|
||
|
[ -z "$OSGVERSION" ] && (echo Please define OSGVERSION; exit 1)
|
||
|
[ -z "$OSGRELEASE" ] && (echo Please define OSGRELEASE; exit 1)
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
cat <<-LEOF > osg.spec
|
||
|
|
||
|
Summary: Open Scene Graph
|
||
|
Name: OpenSceneGraph
|
||
|
Version: $OSGVERSION
|
||
|
Release: $OSGRELEASE
|
||
|
Copyright: GLPL
|
||
|
Group: Graphics
|
||
|
Source: osg-$OSGVERSION-$OSGRELEASE.tar.gz
|
||
|
URL: http://www.openscenegraph.org
|
||
|
Packager: `awk -f - /etc/passwd <<-EOF
|
||
|
BEGIN { FS=":"}
|
||
|
{
|
||
|
if( \\$1 == "$LOGNAME" )
|
||
|
print \\$5
|
||
|
}
|
||
|
EOF`
|
||
|
|
||
|
%description
|
||
|
|
||
|
Open Scene Graph is an open-source scene graph API.
|
||
|
|
||
|
%prep
|
||
|
%setup
|
||
|
%build
|
||
|
%install
|
||
|
|
||
|
`list_install_files`
|
||
|
|
||
|
|
||
|
|
||
|
# ---------------------
|
||
|
# FILES Sections
|
||
|
%files
|
||
|
|
||
|
`list_attr_files`
|
||
|
|
||
|
LEOF
|