Hi Folks,

Geoffery Lee updated the following spec files:

Device3Dfx.spec:
* Sat Apr 08 2000 Geoffrey Lee <[EMAIL PROTECTED]>
- archexclusive and buildarch, it's for x86 only

Glide_V2.spec:
* Sat Apr 08 2000 Geoffrey Lee <[EMAIL PROTECTED]>
- exclusivearch and buildarch, this is for x86 machines only
- change buildroot so as not to cause confliects if v2 and v3 are built
  at the same time

Glide_V3.spec
* Sat Apr 08 2000 Geoffrey Lee <[EMAIL PROTECTED]>
- exclusivearch and buildarch, it's for x86 only
- change buildroot in case glide v2 and v3 are built at the same time

Please update this into cooker...
Summary: Device driver for 3Dfx boards for 2.x kernels
Name: Device3Dfx
Version: 2.3.4
Release: 4mdk
Source: Device3Dfx.tar.bz2
License: GPL
Group: System/Kernel and hardware
Buildroot: /var/tmp/%{name}-%{version}-root
ExclusiveArch: %{ix86} k6 k7
BuildArch: %{ix86} k6 k7

%changelog
* Sat Apr 08 2000 Geoffrey Lee <[EMAIL PROTECTED]>
- archexclusive and buildarch, it's for x86 only

* Mon Mar 20 2000 Yoann Vandoorselaere <[EMAIL PROTECTED]> 2.3.4-3mdk
- bziped
- Mandrakeized
- 3dfx team increment the release number even for bugfix, so just use it as a version 
number.
- Check for conf.modules and modules.conf.
- Do not use a world writable character device, create a tdfx group...
  User which want to use the card should be in this group.

* Wed Jan 04 2000 Joseph Kain <[EMAIL PROTECTED]>
  Release 2.3-4

- Forgot to include kinfo.h in 3dfx_driver.c in the last release.   This 
  fixes some build problems for SMP kernels.

* Wed Dec 22 1999 Joseph Kain <[EMAIL PROTECTED]>
  Release 2.3-3

- Fixes to the Makefile to stop grepping the header files.  Changes to 
  mtrr.c and 3dfx_driver.c to support these Makefile changes.
- 3dfx_driver.c now supports 2.3.14+ kernels.

* Mon Dec 13 1999 Joseph Kain <[EMAIL PROTECTED]>
  Release 2.3-2
  
- Removed depmod -a from the Makefile.  This elliminates errors in the
  build on systems with modules with broken depedancies (Happens on Madrake)
- Changed depmod -a to depmod -a > /dev/null in the post and postun to
  elliminate any warnings/errors with modules that don't have anything
  to do with Device3Dfx.  Warnings scare people.

* Tue Nov 09 1999 Joseph Kain <[EMAIL PROTECTED]>
  Release 2.3:

- Made cards static to remove conflict with hisax ISDN driver.
- Removed 3dfx.o from the source distribution

* Fri Jun 25 1999 Daryll Strauss <[EMAIL PROTECTED]>

  Release 2.2:

- Set MTRR for VB/V3 boards
- Allow build without kernel sources installed
- Code cleanup
- Improvements in /etc/conf.modules setup

* Sun May 16 1999 Daryll Strauss <[EMAIL PROTECTED]>

  Release 2.1:

- Added support for multiple board mappings
- Enlarged size of mappings
- Changes to support VB/V3 boards

* Sun Apr 4 1999 Daryll Strauss <[EMAIL PROTECTED]>

  Release 2.0-1:

- This is just a rename of Michael's version to return it to my original 
  naming scheme.
- Added the License field to the spec file.

* Thu Mar 11 1999 Michael Vance <[EMAIL PROTECTED]>

  Release 2.5-2:

- Fixed for 2.2.3 kernels because of an mmap() update

* Fri Oct 30 1998 Carlo Wood <[EMAIL PROTECTED]>

  Release 2.5-1:

- Upped source to Dev3Dfx-2.5.tar.gz
- Boosted version number of rpm to the version of the tar.gz.
  Moved everything to the Makefile, so Dev3Dfx-2.5.tar.gz is
  self containing and will work without rpm too.
  
* Wed Oct 21 1998 Carlo Wood <[EMAIL PROTECTED]>

  Release 1.2-5:

- Upped source to Dev3Dfx-2.4.tar.gz
- Removed dangerous and confusing use of /lib/modules/preferred
- Removed the use of `uname': It now will compile for the kernel
  version in /usr/src/linux and not be bothered by the running
  kernel version.

* Wed Oct 21 1998 Carlo Wood <[EMAIL PROTECTED]>

  Release 1.2-4:

- Upped source to Dev3Dfx-2.3.tar.gz

* Mon Oct 19 1998 Carlo Wood <[EMAIL PROTECTED]>
 
  Release 1.2-3:

- Corrected Summary and Description to refer to 2.x rather
  then 2.1 kernels.
- Removed script lines that write an `option' line to /etc/conf.modules.
- Upped source to Dev3Dfx-2.2.tar.gz

* Sun Oct 18 1998 Carlo Wood <[EMAIL PROTECTED]>

  Release 1.2-2:

- Added OPT_CFLAGS stuff.
  
* Sun Oct 18 1998 Carlo Wood <[EMAIL PROTECTED]>

  Release 1.2-1:

- Packaged version 1.2 with support for 2.1 kernels by John Taylor and
  MTRR settings added by Jens Axboe.
 
%description
This package installs the 3Dfx device driver to allow access to 3Dfx
boards without the user having root privledges.  It should work on both
2.0 and 2.1/2.2 kernels and set the MTRR settings correctly.  It should
also work with SMP kernels (2.1/2.2).

%prep
%setup -c

%build
make OPT_CFLAGS="$RPM_OPT_FLAGS"

%install
#make RPM_INSTALL="1" install | grep '^/lib/modules/' > modules-file-list
mkdir -p $RPM_BUILD_ROOT/lib/modules/`uname -r`/misc
cp 3dfx.o $RPM_BUILD_ROOT/lib/modules/`uname -r`/misc/3dfx.o

if [ -d $RPM_BUILD_ROOT/usr/man ]; then
  find $RPM_BUILD_ROOT/usr/man -type f -exec bzip2 -9f {} \;
fi
if [ -d $RPM_BUILD_ROOT/usr/info ]; then
  find $RPM_BUILD_ROOT/usr/info -type f -exec bzip2 -9f {} \;
fi
if [ -d $RPM_BUILD_ROOT/usr/X11R6/man ]; then
  find $RPM_BUILD_ROOT/usr/X11R6/man -type f -exec bzip2 -9f {} \;
fi
if [ -d $RPM_BUILD_ROOT/usr/lib/perl5/man ]; then
  find $RPM_BUILD_ROOT/usr/lib/perl5/man -type f -exec bzip2 -9f {} \;
fi

cd $RPM_BUILD_ROOT
echo '%defattr(-,root,root)' > $RPM_BUILD_DIR/file.list.%{name}

find . -type d | sed -e '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > \
        $RPM_BUILD_DIR/file.list.%{name}

find . -type f | sed -e 's,^\.,\%attr(-\,root\,root) ,' \
       -e '/\/etc\//s|^|%config|' \
       -e '/\/config\//s|^|%config|' \
       >> $RPM_BUILD_DIR/file.list.%{name}

find . -type l | sed -e 's,^\.,\%attr(-\,root\,root) ,' >> \
        $RPM_BUILD_DIR/file.list.%{name}


%pre
groupadd tdfx >& /dev/null

%post
if [ "$1" = 1 ]; then
        if [ ! -c /dev/3dfx ]; then
            mknod /dev/3dfx c 107 0
            chown root.tdfx /dev/3dfx
            chmod 660 /dev/3dfx
        fi

        if [[ -f /etc/conf.modules ]]; then
            if ! grep -q 3dfx /etc/conf.modules; then 
                echo alias char-major-107 3dfx >> /etc/conf.modules
            fi
        fi

        if [[ -f /etc/modules.conf ]]; then
             if ! grep -q 3dfx /etc/modules.conf; then
                echo alias char-major-107 3dfx >> /etc/modules.conf
             fi
        fi
fi
/sbin/depmod -a > /dev/null

%postun
if [ "$1" = 0 ]; then
        if [[ -f /etc/conf.modules ]]; then
            grep -v 3dfx /etc/conf.modules > /etc/conf.modules.tmp
            mv /etc/conf.modules.tmp /etc/conf.modules
        fi

        if [[ -f /etc/modules.conf ]]; then
            grep -v 3dfx /etc/modules.conf > /etc/modules.conf.tmp
            mv /etc/modules.conf.tmp /etc/modules.conf
        fi

        if [ -c /dev/3dfx ]; then
            rm -f /dev/3dfx
        fi

        # Delete the 3dfx group.
        groupdel tdfx >& /dev/null
fi

/sbin/depmod -a > /dev/null

%verifyscript
inconf=`grep 'alias char-major-107 3dfx' /etc/conf.modules`
if [ "x$inconf" = "x" ]; then
        echo "3dfx entry not included in /etc/conf.modules"
fi

#%files -f modules-file-list
#%attr (-,root,tdfx) /dev/3dfx

%files -f ../file.list.%{name}

%clean
rm -rf $RPM_BUILD_ROOT file.list.%{name}
Summary: Glide runtime for 3Dfx Voodoo2 boards
Name: Glide_V2
Version: 2.53.5
Release: 2mdk
Source: GlideV2.tar.bz2
URL: http://www.3dfx.com        
Copyright: 3DFX GLIDE Source Code General Public License
Vendor: 3Dfx Interactive Inc.
Group: System/Libraries
Prefix: /usr
BuildRoot: /var/tmp/%{name}-%{version}
BuildArch: %{ix86} k6 k7
ExclusiveArch: %{ix86} k6 k7

%description
This library allows the user to use a 3dfx Interactive Voodoo Banshee or Voodoo3 card 
under Linux.

%package -n Glide2x_SDK
Summary: Development libraries for Glide 2.x
Version: 2.1
Group: Development/Libraries

%description -n Glide2x_SDK
This package includes the headers files, documentation, and test files
necessary for developing applications that use the 3Dfx Interactive
Voodoo Graphics, Voodoo Rush, or Voodoo2 card.

%prep
%setup -c
chmod +x GlideV2/swlibs/include/make/ostype

%build

# Make sure we build for Voodoo2
export FX_GLIDE_HW=cvg

# A lot of people don't have the compatibility tools/libs installed and
# don't want to build the compat libraries.  However I want to build the
# compat libraries for official 3dfx builds so it gets triggered by
# an env variable.  Resetting to GO and TRUE are used by the Makefile
# to control the buidling of glide2x and not glide3x

if [ "$GLIDE_BUILD_COMPAT" = "TRUE" ]; then
export CC=i386-glibc20-linux-gcc
export GLIDE_BUILD_COMPAT=GO
make -C GlideV2 V2

# Save the compat libraries for the install section
mv GlideV2/glide2x/cvg/lib/libglide.so.2.53 \
  GlideV2/glide2x/cvg/lib/libglide2x.glibc20
mv GlideV2/swlibs/lib/libtexus.so.1.1 GlideV2/swlibs/lib/libtexus.glibc20

# Clean up the compat build
make -C GlideV2 clean_V2

# Reset this so that other checks pass
export GLIDE_BUILD_COMPAT=TRUE

# Unset CC so it goes back to the default
unset CC
fi

# Now build for native compiler unconditionally
make -C GlideV2 V2

%install
rm -rf $RPM_BUILD_ROOT

######################################################################
# Create directories
######################################################################

install -d -m 755 $RPM_BUILD_ROOT/usr/include/glide
install -d -m 755 $RPM_BUILD_ROOT/usr/local/glide/bin
install -d -m 755 $RPM_BUILD_ROOT/usr/local/glide/src/tests
install -d -m 755 $RPM_BUILD_ROOT/usr/local/glide/src/texus/lib
install -d -m 755 $RPM_BUILD_ROOT/usr/local/glide/src/texus/cmd
install -d -m 755 $RPM_BUILD_ROOT/usr/local/glide/src/texus/examples
install -d -m 755 $RPM_BUILD_ROOT/usr/doc/Glide2
install -d -m 755 $RPM_BUILD_ROOT/usr/doc/Glide3
install -d -m 755 $RPM_BUILD_ROOT/usr/lib
install -d -m 755 $RPM_BUILD_ROOT/usr/bin
install -d -m 755 $RPM_BUILD_ROOT/usr/include
if [ "$GLIDE_BUILD_COMPAT" = "TRUE" ]; then
install -d -m 755 $RPM_BUILD_ROOT/usr/i386-glibc20-linux/lib
fi

######################################################################
# Install the Glide2x libraries
######################################################################

# Install the glibc 2.1 libraries normally
install -m 755 GlideV2/glide2x/cvg/lib/libglide.so.2.53 \
  $RPM_BUILD_ROOT/usr/lib/libglide.so.2.53

# Create symlinks
rm -f $RPM_BUILD_ROOT/usr/lib/libglide.so.2
ln -s libglide.so.2.53 $RPM_BUILD_ROOT/usr/lib/libglide.so.2

rm -f $RPM_BUILD_ROOT/usr/lib/libglide.so
ln -s libglide.so.2 $RPM_BUILD_ROOT/usr/lib/libglide.so

# Create a compatibility link for the old name
rm -f $RPM_BUILD_ROOT/usr/lib/libglide2x.so
ln -s libglide.so.2.53 $RPM_BUILD_ROOT/usr/lib/libglide2x.so

rm -f $RPM_BUILD_ROOT/usr/lib/libglide2x.so.2
ln -s libglide2x.so $RPM_BUILD_ROOT/usr/lib/libglide2x.so.2

######################################################################
# Install the Compat Libraries in the compat directory
######################################################################
echo >  compat
if [ "$GLIDE_BUILD_COMPAT" = "TRUE" ]; then
# Install the glibc 2.0 libraries in the compat directory
install -m 755 GlideV2/glide2x/cvg/lib/libglide2x.glibc20 \
    $RPM_BUILD_ROOT/usr/i386-glibc20-linux/lib/libglide2x_V2.so
rm -f $RPM_BUILD_ROOT/usr/i386-glibc20-linux/lib/libglide2x.so
ln -s libglide2x_V2.so $RPM_BUILD_ROOT/usr/i386-glibc20-linux/lib/libglide2x.so
install -m 755 GlideV2/glide2x/swlibs/lib/libtexus.glibc20 \
    $RPM_BUILD_ROOT/usr/i386-glibc20-linux/lib/libtexus.so

# This part is a bit of a pain.  The %files section of the spec isn't shell 
# script so I can't make it conditional on $GLIDE_BUILD_COMPAT.  I can 
# include a file, so I write the compat file names to a file.
echo /usr/i386-glibc20-linux/lib/libglide2x_V2.so >  compat
echo /usr/i386-glibc20-linux/lib/libglide2x.so    >> compat
echo /usr/i386-glibc20-linux/lib/libtexus.so      >> compat
fi

######################################################################
# Install the Glide3X libraries
######################################################################
install -m 755 GlideV2/glide3x/cvg/lib/libglide3.so.3.01 \
  $RPM_BUILD_ROOT/usr/lib/libglide3.so.3.01
rm -f $RPM_BUILD_ROOT/usr/lib/libglide3x.so

# Create symlinks
rm -f $RPM_BUILD_ROOT/usr/lib/libglide3.so.3
ln -s libglide3.so.3.01 $RPM_BUILD_ROOT/usr/lib/libglide3.so.3

# Is this my responsibility or ldconfig's?
rm -f $RPM_BUILD_ROOT/usr/lib/libglide3.so
ln -s libglide3.so.3 $RPM_BUILD_ROOT/usr/lib/libglide3.so

# Create a compatibility link for the old name
rm -f $RPM_BUILD_ROOT/usr/lib/libglide3x.so
ln -s libglide3.so.3 $RPM_BUILD_ROOT/usr/lib/libglide3x.so

rm -f $RPM_BUILD_ROOT/usr/lib/libglide3x.so.3
ln -s libglide3x.so $RPM_BUILD_ROOT/usr/lib/libglide3x.so.3

######################################################################
# Install Texus
######################################################################
install -m 755 GlideV2/glide2x/swlibs/lib/libtexus.so.1.1 \
    $RPM_BUILD_ROOT/usr/lib

rm -f $RPM_BUILD_ROOT/usr/lib/libtexus.so.1
ln -s libtexus.so.1.1 $RPM_BUILD_ROOT/usr/lib/libtexus.so.1

rm -f $RPM_BUILD_ROOT/usr/lib/libtexus.so
ln -s libtexus.so.1 $RPM_BUILD_ROOT/usr/lib/libtexus.so

install -m 755 GlideV2/swlibs/bin/texus $RPM_BUILD_ROOT/usr/bin

######################################################################
# Install the Glide2x SDK material
######################################################################
# I don't build an SDK from the Voodoo2 sources, the Voodoo3 sources
# have newer headers
# Do however, install the license file.
install -m 644 GlideV2/glide_license.txt $RPM_BUILD_ROOT/usr/doc/Glide2
install -m 644 GlideV2/glide_license.txt $RPM_BUILD_ROOT/usr/doc/Glide3

######################################################################
# Install the Test Programs
######################################################################
# Make two copies so that the old test3Dfx is still there and
# we now have a consisten testGlide2x, testGlide3x
install -m 755 GlideV2/glide2x/cvg/glide/tests/test00 \
  $RPM_BUILD_ROOT/usr/local/glide/bin/test3Dfx
install -m 755 GlideV2/glide2x/cvg/glide/tests/test00 \
  $RPM_BUILD_ROOT/usr/local/glide/bin/testGlide2x

install -m 755 GlideV2/glide3x/cvg/glide3/tests/test00 \
  $RPM_BUILD_ROOT/usr/local/glide/bin/testGlide3x

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig

if [ "$1" = 1 ]; then
        # Cleanup old GlideSDK
        rm -rf /usr/local/glide/lib
        grep -v '/usr/local/glide/lib' /etc/ld.so.conf > /etc/ld.so.conf.tmp
        mv /etc/ld.so.conf.tmp /etc/ld.so.conf
fi

%post -n Glide2x_SDK

if [ "$1" = 1 ]; then
        # Cleanup old GlideSDK
        rm -rf /usr/local/glide/include
        set nonomatch
        rm -f /usr/local/glide/src/tldata.inc
        rm -f /usr/local/glide/src/Makefile
        rm -f /usr/local/glide/src/*.3df
        rm -f /usr/local/glide/src/*.c
        rm -f /usr/local/glide/src/*.h
fi

%postun
/sbin/ldconfig

%files -f compat
%docdir /usr/doc/Glide2
%docdir /usr/doc/Glide3
%dir /usr/local/glide
%dir /usr/local/glide/bin
/usr/doc/Glide2/glide_license.txt
/usr/doc/Glide3/glide_license.txt
/usr/lib/libglide.so.2.53
/usr/lib/libglide.so.2
/usr/lib/libglide.so
/usr/lib/libglide2x.so
/usr/lib/libglide2x.so.2
/usr/lib/libglide3.so.3.01
/usr/lib/libglide3.so.3
/usr/lib/libglide3.so
/usr/lib/libglide3x.so
/usr/lib/libglide3x.so.3
/usr/lib/libtexus.so.1.1
/usr/lib/libtexus.so.1
/usr/lib/libtexus.so
/usr/bin/texus
/usr/local/glide/bin/test3Dfx
/usr/local/glide/bin/testGlide3x
/usr/local/glide/bin/testGlide2x

%changelog
* Sat Apr 08 2000 Geoffrey Lee <[EMAIL PROTECTED]>
- exclusivearch and buildarch, this is for x86 machines only
- change buildroot so as not to cause confliects if v2 and v3 are built
  at the same time


* Wed Mar 23 2000 Yoann Vandoorselaere <[EMAIL PROTECTED]> 2.53.5-1mdk
- Mandrake version.
- Group fix.

* Thu Feb 17 2000 Joseph Kain <[EMAIL PROTECTED]>
- Release 5
- Fixes to unmap boards properly at shutdown

* Fri Feb 04 2000 Joseph Kain <[EMAIL PROTECTED]>
- Fixed typo that messed up compatbility symlinks for glide3
- Added libglide3x.so.3 and libglide2x.so.2 that were missing from %files

* Mon Jan 31 2000 Joseph Kain <[EMAIL PROTECTED]>
- Merged Glide2x and Glide3x kits into a single package.

* Tue Nov 30 1999 Joseph Kain <[EMAIL PROTECTED]>
- Built against initial source release
Summary: Glide runtime for 3Dfx Voodoo Banshee and Voodoo3 boards
Name: Glide_V3
Version: 2.60.15
Release: 2mdk
Source: GlideV3.tar.bz2
URL: http://www.3dfx.com        
Copyright: 3DFX GLIDE Source Code General Public License
Vendor: 3Dfx Interactive Inc.
Group: System/Libraries
Prefix: /usr
BuildRoot: /var/tmp/%{name}-%{version}
ExclusiveArch: %{ix86} k6 k7
BuildArch: %{ix86} k6 k7

%description 
This package now includes both Glide2x and Glide3x.  Glide is a
lowlevel API for accessing 3dfx Interactive's Voodoo Hardware.  This
version of Glide supports Voodoo Banshee and Voodoo3 based 3D
acclerators.

%package -n Glide_SDK
Summary: Development libraries for Glide 2.x
Version: 2.2
Group: Development/Libraries

%description -n Glide_SDK
This package includes the header files, documentation, and test files
necessary for developing applications that use any of the 3D acceleratos in 
the 3Dfx Interactive Voodoo line.

%prep
%setup -c
chmod +x GlideV3/swlibs/include/make/ostype

%build

# A lot of people don't have the compatibility tools/libs installed and
# don't want to build the compat libraries.  However I want to build the
# compat libraries for official 3dfx builds so it gets triggered by
# an env variable.  Resetting to GO and TRUE are used by the Makefile
# to control the buidling of glide2x and not glide3x

if [ "$GLIDE_BUILD_COMPAT" = "TRUE" ]; then
export CC=i386-glibc20-linux-gcc
export GLIDE_BUILD_COMPAT=GO
make -C GlideV3 V3_NODRI

# Save the compat libraries for the install section
mv GlideV3/glide2x/h3/lib/libglide.so.2 \
  GlideV3/glide2x/h3/lib/libglide2x.glibc20
mv GlideV3/swlibs/lib/libtexus.so.1.1 GlideV3/swlibs/lib/libtexus.glibc20

# Clean up the compat build
make -C GlideV3 clean_V3

# Reset this so that other checks pass
export GLIDE_BUILD_COMPAT=TRUE

# Unset CC so it goes back to the default
unset CC
fi

# Now build for native compiler unconditionally
make -C GlideV3 V3_NODRI

%install
rm -rf $RPM_BUILD_ROOT

######################################################################
# Create directories
######################################################################

install -d -m 755 $RPM_BUILD_ROOT/usr/lib
install -d -m 755 $RPM_BUILD_ROOT/usr/bin
install -d -m 755 $RPM_BUILD_ROOT/usr/include
install -d -m 755 $RPM_BUILD_ROOT/usr/include/glide
install -d -m 755 $RPM_BUILD_ROOT/usr/include/glide3
install -d -m 755 $RPM_BUILD_ROOT/usr/local/glide/bin
install -d -m 755 $RPM_BUILD_ROOT/usr/local/glide/src/tests
install -d -m 755 $RPM_BUILD_ROOT/usr/local/glide/src/tests3x
install -d -m 755 $RPM_BUILD_ROOT/usr/local/glide/src/texus/lib
install -d -m 755 $RPM_BUILD_ROOT/usr/local/glide/src/texus/cmd
install -d -m 755 $RPM_BUILD_ROOT/usr/local/glide/src/texus/examples
install -d -m 755 $RPM_BUILD_ROOT/usr/doc/Glide2
install -d -m 755 $RPM_BUILD_ROOT/usr/doc/Glide3
if [ "$GLIDE_BUILD_COMPAT" = "TRUE" ]; then
install -d -m 755 $RPM_BUILD_ROOT/usr/i386-glibc20-linux/lib
fi

######################################################################
# Install the Glide2x libraries
######################################################################

# Install the native libraries normally
install -m 755 GlideV3/glide2x/h3/lib/libglide.so.2.60 \
  $RPM_BUILD_ROOT/usr/lib/libglide.so.2.60

# Create symlinks
rm -f $RPM_BUILD_ROOT/usr/lib/libglide.so.2
ln -s libglide.so.2.60 $RPM_BUILD_ROOT/usr/lib/libglide.so.2

rm -f $RPM_BUILD_ROOT/usr/lib/libglide.so
ln -s libglide.so.2 $RPM_BUILD_ROOT/usr/lib/libglide.so

# Create a compatibility link for the old name
rm -f $RPM_BUILD_ROOT/usr/lib/libglide2x.so
ln -s libglide.so.2.60 $RPM_BUILD_ROOT/usr/lib/libglide2x.so

rm -f $RPM_BUILD_ROOT/usr/lib/libglide2x.so.2
ln -s libglide2x.so $RPM_BUILD_ROOT/usr/lib/libglide2x.so.2

######################################################################
# Install the Compat Libraries in the compat directory
######################################################################
echo >  compat
if [ "$GLIDE_BUILD_COMPAT" = "TRUE" ]; then
# The compat libs just need the old name, so I don't need to use the new
# naming scheme.
install -m 755 GlideV3/glide2x/h3/lib/libglide2x.glibc20 \
  $RPM_BUILD_ROOT/usr/i386-glibc20-linux/lib/libglide2x_V3.so
rm -f $RPM_BUILD_ROOT/usr/i386-glibc20-linux/lib/libglide2x.so
ln -s libglide2x_V3.so \
  $RPM_BUILD_ROOT/usr/i386-glibc20-linux/lib/libglide2x.so
install -m 755 GlideV3/swlibs/lib/libtexus.glibc20 \
  $RPM_BUILD_ROOT/usr/i386-glibc20-linux/lib/libtexus.so

# This part is a bit of a pain.  The %files section of the spec isn't shell 
# script so I can't make it conditional on $GLIDE_BUILD_COMPAT.  I can 
# include a file, so I write the compat file names to a file.
echo /usr/i386-glibc20-linux/lib/libglide2x_V3.so >  compat
echo /usr/i386-glibc20-linux/lib/libglide2x.so    >> compat
echo /usr/i386-glibc20-linux/lib/libtexus.so      >> compat
fi

######################################################################
# Install the Glide3X libraries
######################################################################
install -m 755 GlideV3/glide3x/h3/lib/libglide3.so.3.10 \
  $RPM_BUILD_ROOT/usr/lib/libglide3.so.3.10
rm -f $RPM_BUILD_ROOT/usr/lib/libglide3x.so

# Create symlinks
rm -f $RPM_BUILD_ROOT/usr/lib/libglide3.so.3
ln -s libglide3.so.3.10 $RPM_BUILD_ROOT/usr/lib/libglide3.so.3

rm -f $RPM_BUILD_ROOT/usr/lib/libglide3.so
ln -s libglide3.so.3 $RPM_BUILD_ROOT/usr/lib/libglide3.so

# Create a compatibility link for the old name
rm -f $RPM_BUILD_ROOT/usr/lib/libglide3x.so
ln -s libglide3.so.3 $RPM_BUILD_ROOT/usr/lib/libglide3x.so

rm -f $RPM_BUILD_ROOT/usr/lib/libglide3x.so.3
ln -s libglide3x.so $RPM_BUILD_ROOT/usr/lib/libglide3x.so.3

######################################################################
# Install Texus
######################################################################
install -m 755 GlideV3/swlibs/lib/libtexus.so.1.1 $RPM_BUILD_ROOT/usr/lib

rm -f $RPM_BUILD_ROOT/usr/lib/libtexus.so.1
ln -s libtexus.so.1.1 $RPM_BUILD_ROOT/usr/lib/libtexus.so.1

rm -f $RPM_BUILD_ROOT/usr/lib/libtexus.so
ln -s libtexus.so.1 $RPM_BUILD_ROOT/usr/lib/libtexus.so

install -m 755 GlideV3/swlibs/bin/texus $RPM_BUILD_ROOT/usr/bin


######################################################################
# Install the Glide2x SDK material
######################################################################

# Install the headers
install -m 644 GlideV3/swlibs/include/3dfx.h $RPM_BUILD_ROOT/usr/include/glide
install -m 644 GlideV3/glide2x/h3/include/glide.h \
  $RPM_BUILD_ROOT/usr/include/glide
install -m 644 GlideV3/glide2x/h3/include/glidesys.h \
  $RPM_BUILD_ROOT/usr/include/glide
install -m 644 GlideV3/glide2x/h3/include/glideutl.h \
  $RPM_BUILD_ROOT/usr/include/glide
install -m 644 GlideV3/glide2x/h3/include/sst1vid.h \
  $RPM_BUILD_ROOT/usr/include/glide
install -m 644 GlideV3/glide2x/h3/include/gump.h \
  $RPM_BUILD_ROOT/usr/include/glide
install -m 644 GlideV3/swlibs/include/linutil.h \
  $RPM_BUILD_ROOT/usr/include/glide
install -m 644 GlideV3/swlibs/include/texus.h \
  $RPM_BUILD_ROOT/usr/include/glide

# Install the examples and their source
install -m 644 GlideV3/glide2x/h3/glide/tests/makefile.distrib \
  $RPM_BUILD_ROOT/usr/local/glide/src/tests/makefile
# Make two copies so that the old test3Dfx is still there and
# we now have a consisten testGlide2x, testGlide3x
install -m 755 GlideV3/glide2x/h3/glide/tests/test00 \
  $RPM_BUILD_ROOT/usr/local/glide/bin/test3Dfx
install -m 755 GlideV3/glide2x/h3/glide/tests/test00 \
  $RPM_BUILD_ROOT/usr/local/glide/bin/testGlide2x
install -m 644 GlideV3/glide2x/h3/glide/tests/*.3df \
  $RPM_BUILD_ROOT/usr/local/glide/src/tests
install -m 644 GlideV3/glide2x/h3/glide/tests/test??.c \
  $RPM_BUILD_ROOT/usr/local/glide/src/tests
install -m 644 GlideV3/glide2x/h3/glide/tests/tldata.inc \
  $RPM_BUILD_ROOT/usr/local/glide/src/tests
install -m 644 GlideV3/glide2x/h3/glide/tests/tlib.[ch] \
  $RPM_BUILD_ROOT/usr/local/glide/src/tests

# Install the Texus source
install -m 644 GlideV3/swlibs/texus/makefile.distrib \
  $RPM_BUILD_ROOT/usr/local/glide/src/texus/makefile
install -m 644 GlideV3/swlibs/texus/lib/makefile.distrib \
  $RPM_BUILD_ROOT/usr/local/glide/src/texus/lib/makefile
install -m 644 GlideV3/swlibs/texus/cmd/makefile.distrib \
  $RPM_BUILD_ROOT/usr/local/glide/src/texus/cmd/makefile
install -m 644 GlideV3/swlibs/texus/examples/makefile.distrib \
  $RPM_BUILD_ROOT/usr/local/glide/src/texus/examples/makefile
install -m 644 GlideV3/swlibs/texus/lib/*.c \
  $RPM_BUILD_ROOT/usr/local/glide/src/texus/lib
install -m 644 GlideV3/swlibs/texus/lib/texusint.h \
  $RPM_BUILD_ROOT/usr/local/glide/src/texus/lib
install -m 644 GlideV3/swlibs/texus/cmd/*.c \
  $RPM_BUILD_ROOT/usr/local/glide/src/texus/cmd
install -m 644 GlideV3/swlibs/texus/examples/*.c \
  $RPM_BUILD_ROOT/usr/local/glide/src/texus/examples

# Install the documentation
install -m 644 GlideV3/glide_license.txt $RPM_BUILD_ROOT/usr/doc/Glide2
install -m 644 GlideV3/docs2x/*.pdf $RPM_BUILD_ROOT/usr/doc/Glide2


######################################################################
# Install the Glide3x SDK material
######################################################################
# Install the headers
install -m 644 GlideV3/swlibs/include/3dfx.h \
  $RPM_BUILD_ROOT/usr/include/glide3
install -m 644 GlideV3/glide3x/h3/include/glide.h \
  $RPM_BUILD_ROOT/usr/include/glide3
install -m 644 GlideV3/glide3x/h3/include/glidesys.h \
  $RPM_BUILD_ROOT/usr/include/glide3
install -m 644 GlideV3/glide3x/h3/include/glideutl.h \
  $RPM_BUILD_ROOT/usr/include/glide3
install -m 644 GlideV3/glide3x/h3/include/sst1vid.h \
  $RPM_BUILD_ROOT/usr/include/glide3
install -m 644 GlideV3/swlibs/include/linutil.h \
  $RPM_BUILD_ROOT/usr/include/glide3
install -m 644 GlideV3/swlibs/include/texus.h \
  $RPM_BUILD_ROOT/usr/include/glide3

# Install the examples and their source
install -m 644 GlideV3/glide3x/h3/glide3/tests/makefile.distrib \
  $RPM_BUILD_ROOT/usr/local/glide/src/tests3x/makefile
install -m 755 GlideV3/glide3x/h3/glide3/tests/test00 \
  $RPM_BUILD_ROOT/usr/local/glide/bin/testGlide3x
install -m 644 GlideV3/glide3x/h3/glide3/tests/*.3df \
  $RPM_BUILD_ROOT/usr/local/glide/src/tests3x
install -m 644 GlideV3/glide3x/h3/glide3/tests/test??.c \
  $RPM_BUILD_ROOT/usr/local/glide/src/tests3x
install -m 644 GlideV3/glide3x/h3/glide3/tests/tldata.inc \
  $RPM_BUILD_ROOT/usr/local/glide/src/tests3x
install -m 644 GlideV3/glide3x/h3/glide3/tests/tlib.[ch] \
  $RPM_BUILD_ROOT/usr/local/glide/src/tests3x

# Install the documentation
install -m 644 GlideV3/glide_license.txt $RPM_BUILD_ROOT/usr/doc/Glide3
install -m 644 GlideV3/docs3x/*.pdf $RPM_BUILD_ROOT/usr/doc/Glide3

%clean
rm -rf $RPM_BUILD_ROOT


# This will remove the very old Glide SDK that installed things in 
%post
/sbin/ldconfig

if [ "$1" = 1 ]; then
        # Cleanup old GlideSDK
        rm -rf /usr/local/glide/lib
        grep -v '/usr/local/glide/lib' /etc/ld.so.conf > /etc/ld.so.conf.tmp
        mv /etc/ld.so.conf.tmp /etc/ld.so.conf
fi

%post -n Glide_SDK

if [ "$1" = 1 ]; then
        # Cleanup old GlideSDK
        rm -rf /usr/local/glide/include
        set nonomatch
        rm -f /usr/local/glide/src/tldata.inc
        rm -f /usr/local/glide/src/Makefile
        rm -f /usr/local/glide/src/*.3df
        rm -f /usr/local/glide/src/*.c
        rm -f /usr/local/glide/src/*.h
fi

%postun
/sbin/ldconfig

%files -f compat
%docdir /usr/doc/Glide2
%docdir /usr/doc/Glide3
%dir /usr/local/glide
%dir /usr/local/glide/bin
/usr/doc/Glide2/glide_license.txt
/usr/doc/Glide3/glide_license.txt
/usr/lib/libglide.so.2.60
/usr/lib/libglide.so.2
/usr/lib/libglide.so
/usr/lib/libglide2x.so
/usr/lib/libglide2x.so.2
/usr/lib/libglide3.so.3.10
/usr/lib/libglide3.so.3
/usr/lib/libglide3.so
/usr/lib/libglide3x.so
/usr/lib/libglide3x.so.3
/usr/lib/libtexus.so.1.1
/usr/lib/libtexus.so.1
/usr/lib/libtexus.so
/usr/bin/texus
/usr/local/glide/bin/test3Dfx
/usr/local/glide/bin/testGlide3x
/usr/local/glide/bin/testGlide2x


%files -n Glide_SDK
%docdir /usr/doc/Glide2
%docdir /usr/doc/Glide3
%dir /usr/local/glide
%dir /usr/local/glide/bin
/usr/doc/Glide2/glidepgm.pdf
/usr/doc/Glide2/glideref.pdf
/usr/doc/Glide3/glide3pgm.pdf
/usr/doc/Glide3/glide3ref.pdf
/usr/doc/Glide3/glide3relno.pdf
# FIXME: Do I need to fill these in?
%dir /usr/local/glide/src
/usr/local/glide/src/tests/*
/usr/local/glide/src/tests3x/*
/usr/local/glide/src/texus/*
%dir /usr/include/glide
/usr/include/glide/*
%dir /usr/include/glide3
/usr/include/glide3/*

%changelog
* Sat Apr 08 2000 Geoffrey Lee <[EMAIL PROTECTED]>
- exclusivearch and buildarch, it's for x86 only
- change buildroot in case glide v2 and v3 are built at the same time

* Wed Mar 23 2000 Yoann Vandoorselaere <[EMAIL PROTECTED]> 2.60.15-1mdk
- Mandrake package.
- Fix group.

* Wed Feb 23 2000 Joseph Kain <[EMAIL PROTECTED]>
- Revision 15
- Fix to minihwc to stop crashing on reinitialization

* Tue Feb 15 2000 Joseph Kain <[EMAIL PROTECTED]>
- Revision 14
- Fix to the pci library that unmaps boards correctly on shutdown
- Source now supports FreeBSD

* Fri Feb 04 2000 Joseph Kain <[EMAIL PROTECTED]>
- Fixed typo that messed up compatbility symlinks for glide3
- Added libglide3x.so.3 and libglide2x.so.2 that were missing from %files

* Mon Jan 31 2000 Joseph Kain <[EMAIL PROTECTED]>
- Finished making compat build completely optional

* Wed Jan 19 2000 Joseph Kain <[EMAIL PROTECTED]>
- Merged Glide2x and Glide3x kits into a single package.

* Thu Jan 13 2000 Joseph Kain <[EMAIL PROTECTED]>
- Made building compat libraries (for glibc2.0) optional

* Tue Nov 30 1999 Joseph Kain <[EMAIL PROTECTED]>
- Built against initial source release

Reply via email to