1 %define realname lib3ds
2 Summary: The 3D Studio File Format Library - Mingw32 cross version
3 Summary(pl.UTF-8): Biblioteka obsługująca format plików 3D Studio - wersja skrośna dla Mingw32
4 Name: crossmingw32-%{realname}
9 Source0: http://dl.sourceforge.net/lib3ds/%{realname}-%{version}.tar.gz
10 # Source0-md5: 3a7f891d18af0151876b98bc05d3b373
11 URL: http://lib3ds.sourceforge.net/
12 Requires: crossmingw32-runtime
13 BuildRequires: autoconf
14 BuildRequires: automake
15 BuildRequires: crossmingw32-gcc
16 BuildRequires: crossmingw32-w32api
17 BuildRequires: libtool
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define no_install_post_strip 1
22 %define target i386-mingw32
23 %define target_platform i386-pc-mingw32
24 %define arch %{_prefix}/%{target}
25 %define gccarch %{_prefix}/lib/gcc-lib/%{target}
26 %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
28 %define __cc %{target}-gcc
29 %define __cxx %{target}-g++
31 %ifarch alpha sparc sparc64 sparcv9
36 lib3ds is a free alternative to Autodesk's 3DS File Toolkit for
37 handling 3DS files. It's main goal is to simplify the creation of 3DS
38 import and export filters.
40 %description -l pl.UTF-8
41 lib3ds to wolnodostępna alternatywa dla 3DS File Toolkit Autodeska do
42 obsługi plików 3DS. Głównym celem biblioteki jest uproszczenie
43 tworzenia filtrów importujących i eksportujących 3DS.
46 Summary: %{realname} - DLL library for Windows
47 Summary(pl.UTF-8): %{realname} - biblioteka DLL dla Windows
48 Group: Applications/Emulators
51 %{realname} - DLL library for Windows.
53 %description dll -l pl.UTF-8
54 %{realname} - biblioteka DLL dla Windows.
57 %setup -q -n %{realname}-%{version}
60 CC=%{target}-gcc ; export CC
61 CXX=%{target}-g++ ; export CXX
62 LD=%{target}-ld ; export LD
63 AR=%{target}-ar ; export AR
64 AS=%{target}-as ; export AS
65 CROSS_COMPILE=1 ; export CROSS_COMPILE
66 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
67 RANLIB=%{target}-ranlib ; export RANLIB
68 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
69 TARGET="%{target}" ; export TARGET
71 tail -n 116 aclocal.m4 | head -n 102 > acinclude.m4
82 echo "int main(){}" > examples/player.c
87 %{__cc} --shared *.o -Wl,--enable-auto-image-base -o 3ds.dll -Wl,--out-implib,lib3ds.dll.a
91 %{target}-strip -g -R.comment -R.note *.a
95 rm -rf $RPM_BUILD_ROOT
96 install -d $RPM_BUILD_ROOT%{arch}/{include/lib3ds,lib}
97 install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
101 install *.h $RPM_BUILD_ROOT%{arch}/include/lib3ds
102 rm $RPM_BUILD_ROOT%{arch}/include/lib3ds/chunktable.h
103 install lib3ds{,.dll}.a $RPM_BUILD_ROOT%{arch}/lib
104 install 3ds.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
107 rm -rf $RPM_BUILD_ROOT
110 %defattr(644,root,root,755)
115 %defattr(644,root,root,755)
116 %{_datadir}/wine/windows/system/*