]>
Commit | Line | Data |
---|---|---|
ac1d23c1 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with glide2_sdk # build Glide2x_SDK here (normally built from Glide_V3.spec) | |
4 | # | |
4c49c243 | 5 | Summary: Glide runtime for 3Dfx Voodoo Graphics boards |
61beb790 | 6 | Summary(pl.UTF-8): Środowisko Glide dla kart 3Dfx Voodoo Graphics |
cf05b513 | 7 | Name: Glide_VG |
8 | Version: 2.46 | |
0c0bac19 | 9 | Release: 11 |
4c49c243 | 10 | License: 3DFX GLIDE Source Code General Public License |
edf0eec0 | 11 | Group: Libraries |
07dc9c23 | 12 | Source0: Glide%{version}.tar.gz |
0a60b64a | 13 | # Source0-md5: be7762636b46cb04b238a16f45cfcfa8 |
07dc9c23 | 14 | Patch0: %{name}-asm.patch |
63739d9f | 15 | Patch1: %{name}-opt.patch |
d98d2b0c | 16 | Patch2: %{name}-morearchs.patch |
4dc461ef | 17 | Patch3: %{name}-ioctl.patch |
fe94377d | 18 | Patch4: %{name}-soname.patch |
26652483 | 19 | Patch5: %{name}-C_brainos.patch |
0c0bac19 JB |
20 | Patch6: %{name}-format.patch |
21 | Patch7: %{name}-include.patch | |
ca5929e7 | 22 | URL: http://glide.sourceforge.net/ |
4df864eb | 23 | %ifarch %{ix86} |
d5e33c76 | 24 | BuildRequires: /usr/bin/gasp |
4df864eb | 25 | %endif |
ca5929e7 JB |
26 | BuildRequires: xorg-lib-libX11-devel |
27 | BuildRequires: xorg-lib-libXxf86dga-devel | |
28 | BuildRequires: xorg-lib-libXxf86vm-devel | |
e5c076fb | 29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
53af08fa | 30 | |
31 | %description | |
4c49c243 | 32 | This library allows the user to use a 3Dfx Interactive Voodoo Graphics |
edf0eec0 | 33 | card under Linux. |
3d6c707d | 34 | |
a216d7c4 JR |
35 | %description -l pl.UTF-8 |
36 | Ten pakiet pozwala na używanie kart 3Dfx Interactive Voodoo Graphics | |
4c49c243 JB |
37 | pod Linuksem. |
38 | ||
ac1d23c1 JB |
39 | %package devel |
40 | Summary: Development package for Glide 2.x built for Voodoo Graphics | |
41 | Summary(pl.UTF-8): Pakiet programistyczny dla Glide 2.x zbudowanego dla Voodoo Graphics | |
42 | Group: Development/Libraries | |
43 | Requires: %{name} = %{version}-%{release} | |
44 | Requires: Glide2x_SDK >= %{version} | |
3b38075b | 45 | Provides: Glide2x-devel = %{version} |
ac1d23c1 JB |
46 | |
47 | %description devel | |
48 | Development package for Glide 2.x built for 3Dfx Interactive Voodoo | |
49 | Graphics adapters. | |
50 | ||
51 | %description devel -l pl.UTF-8 | |
52 | Pakiet programistyczny dla Glide 2.x zbudowanego dla kart 3Dfx | |
53 | Interactive Voodoo Graphics. | |
54 | ||
53af08fa | 55 | %package -n Glide2x_SDK |
ac1d23c1 | 56 | Summary: Development files for Glide 2.x |
61beb790 | 57 | Summary(pl.UTF-8): Część Glide 2.x przeznaczona dla programistów |
cf05b513 | 58 | Group: Development/Libraries |
d20f55c8 | 59 | Conflicts: Glide_SDK |
53af08fa | 60 | |
61 | %description -n Glide2x_SDK | |
62 | This package includes the headers files, documentation, and test files | |
63 | necessary for developing applications that use the 3Dfx Interactive | |
64 | Voodoo Graphics, Voodoo Rush, or Voodoo2 card. | |
65 | ||
a216d7c4 JR |
66 | %description -n Glide2x_SDK -l pl.UTF-8 |
67 | Ten pakiet zawiera pliki nagłówkowe, dokumentację i pliki testowe | |
68 | potrzebne do tworzenia aplikacji używających kart 3Dfx Interactive | |
4c49c243 JB |
69 | Voodoo Graphics, Voodoo Rush lub Voodoo2. |
70 | ||
53af08fa | 71 | %prep |
cf05b513 | 72 | %setup -q -c |
63739d9f JB |
73 | %patch0 -p1 |
74 | %patch1 -p1 | |
d98d2b0c | 75 | %patch2 -p1 |
4dc461ef | 76 | %patch3 -p1 |
fe94377d | 77 | %patch4 -p1 |
26652483 | 78 | %patch5 -p1 |
0c0bac19 JB |
79 | %patch6 -p1 |
80 | %patch7 -p1 | |
53af08fa | 81 | chmod +x swlibs/include/make/ostype |
82 | ||
83 | %build | |
753c8420 | 84 | %{__make} -j1 -f makefile.unix \ |
7441da6e | 85 | AR="ar rcs" \ |
c38e5d24 | 86 | CC="%{__cc}" \ |
7441da6e | 87 | CNODEBUG="%{rpmcflags} -fPIC -Wno-missing-braces %{!?debug:-fomit-frame-pointer} \ |
ca5929e7 | 88 | %{!?debug:-funroll-loops -fexpensive-optimizations -ffast-math}" \ |
d98d2b0c JB |
89 | %ifnarch %{ix86} |
90 | FX_GLIDE_CTRISETUP=1 | |
91 | %endif | |
53af08fa | 92 | |
93 | %install | |
94 | rm -rf $RPM_BUILD_ROOT | |
46c6bc1f | 95 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_bindir}} |
53af08fa | 96 | |
97 | # Install the glibc 2.1 libraries normally | |
d8c27465 JB |
98 | install sst1/lib/libglide.so.2.46 $RPM_BUILD_ROOT%{_libdir} |
99 | ln -sf libglide.so.2.46 $RPM_BUILD_ROOT%{_libdir}/libglide.so.2 | |
100 | ln -sf libglide.so.2 $RPM_BUILD_ROOT%{_libdir}/libglide2x.so | |
403fc473 | 101 | ln -sf libglide.so.2 $RPM_BUILD_ROOT%{_libdir}/libglide.so |
d8c27465 JB |
102 | install swlibs/lib/libtexus.so.1.1 $RPM_BUILD_ROOT%{_libdir} |
103 | ln -sf libtexus.so.1.1 $RPM_BUILD_ROOT%{_libdir}/libtexus.so.1 | |
104 | ln -sf libtexus.so.1 $RPM_BUILD_ROOT%{_libdir}/libtexus.so | |
53af08fa | 105 | |
106 | # Install the executables | |
07dc9c23 JB |
107 | install swlibs/bin/texus $RPM_BUILD_ROOT%{_bindir} |
108 | install sst1/glide/tests/test00 $RPM_BUILD_ROOT%{_bindir}/test3Dfx | |
53af08fa | 109 | |
ac1d23c1 | 110 | %if %{with glide2_sdk} |
46c6bc1f JB |
111 | ### SDK |
112 | install -d $RPM_BUILD_ROOT%{_includedir}/glide \ | |
113 | $RPM_BUILD_ROOT%{_examplesdir}/glide2x-%{version}/{tests,texus/examples} | |
114 | ||
53af08fa | 115 | # Install the headers |
cf05b513 | 116 | install swlibs/include/3dfx.h $RPM_BUILD_ROOT%{_includedir}/glide |
117 | install sst1/include/glide.h $RPM_BUILD_ROOT%{_includedir}/glide | |
118 | install sst1/include/glidesys.h $RPM_BUILD_ROOT%{_includedir}/glide | |
119 | install sst1/include/glideutl.h $RPM_BUILD_ROOT%{_includedir}/glide | |
120 | install sst1/include/sst1vid.h $RPM_BUILD_ROOT%{_includedir}/glide | |
121 | install sst1/include/gump.h $RPM_BUILD_ROOT%{_includedir}/glide | |
122 | install swlibs/include/linutil.h $RPM_BUILD_ROOT%{_includedir}/glide | |
123 | install swlibs/include/texus.h $RPM_BUILD_ROOT%{_includedir}/glide | |
53af08fa | 124 | |
125 | # Install the examples and their source | |
bb15827d JB |
126 | install sst1/glide/tests/makefile.distrib $RPM_BUILD_ROOT%{_examplesdir}/glide2x-%{version}/tests/makefile |
127 | install sst1/glide/tests/*.3df $RPM_BUILD_ROOT%{_examplesdir}/glide2x-%{version}/tests | |
128 | install sst1/glide/tests/test??.c $RPM_BUILD_ROOT%{_examplesdir}/glide2x-%{version}/tests | |
129 | install sst1/glide/tests/tldata.inc $RPM_BUILD_ROOT%{_examplesdir}/glide2x-%{version}/tests | |
130 | install sst1/glide/tests/tlib.[ch] $RPM_BUILD_ROOT%{_examplesdir}/glide2x-%{version}/tests | |
131 | gzip -9nf $RPM_BUILD_ROOT%{_examplesdir}/glide2x-%{version}/tests/*.3df | |
53af08fa | 132 | |
133 | # Install the texture tools source | |
bb15827d | 134 | install swlibs/texus/examples/makefile.distrib $RPM_BUILD_ROOT%{_examplesdir}/glide2x-%{version}/texus/examples/makefile |
bb15827d | 135 | install swlibs/texus/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/glide2x-%{version}/texus/examples |
ac1d23c1 | 136 | %endif |
edf0eec0 | 137 | |
53af08fa | 138 | %clean |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
4c49c243 JB |
141 | %post -p /sbin/ldconfig |
142 | %postun -p /sbin/ldconfig | |
53af08fa | 143 | |
144 | %files | |
cf05b513 | 145 | %defattr(644,root,root,755) |
ca5929e7 | 146 | %doc glide_license.txt readme.txt |
cf05b513 | 147 | %attr(755,root,root) %{_bindir}/texus |
edf0eec0 | 148 | %attr(755,root,root) %{_bindir}/test3Dfx |
d8c27465 JB |
149 | %attr(755,root,root) %{_libdir}/libglide.so.2.46 |
150 | %attr(755,root,root) %ghost %{_libdir}/libglide.so.2 | |
edf0eec0 | 151 | %attr(755,root,root) %{_libdir}/libglide2x.so |
d8c27465 JB |
152 | %attr(755,root,root) %{_libdir}/libtexus.so.1.1 |
153 | %attr(755,root,root) %ghost %{_libdir}/libtexus.so.1 | |
edf0eec0 | 154 | %attr(755,root,root) %{_libdir}/libtexus.so |
53af08fa | 155 | |
ac1d23c1 JB |
156 | %files devel |
157 | %defattr(644,root,root,755) | |
158 | %attr(755,root,root) %{_libdir}/libglide.so | |
159 | ||
160 | %if %{with glide2_sdk} | |
53af08fa | 161 | %files -n Glide2x_SDK |
cf05b513 | 162 | %defattr(644,root,root,755) |
edf0eec0 | 163 | %doc docs/*.pdf |
cf05b513 | 164 | %{_includedir}/glide |
ac1d23c1 JB |
165 | %{_examplesdir}/glide2x-%{version} |
166 | %endif |