2001-01-11 00:32:10 +08:00
|
|
|
#!/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 \
|
2001-09-22 10:42:08 +08:00
|
|
|
/usr/src/redhat/BUILD/osg-"$OSGVERSION"/$dd/$f /usr/$dd/$f
|
2001-01-11 00:32:10 +08:00
|
|
|
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
|
2001-09-22 10:42:08 +08:00
|
|
|
Name: osg
|
2001-01-11 00:32:10 +08:00
|
|
|
Version: $OSGVERSION
|
|
|
|
Release: $OSGRELEASE
|
|
|
|
Copyright: GLPL
|
|
|
|
Group: Graphics
|
2001-09-22 10:42:08 +08:00
|
|
|
Source: osg-$OSGVERSION.tar.gz
|
2001-01-11 00:32:10 +08:00
|
|
|
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
|