]> git.pld-linux.org Git - packages/crossmingw32-lib3ds.git/blob - crossmingw32-lib3ds.spec
4cf7ce28afd816b8659c5af9fa924a3d1cd79f76
[packages/crossmingw32-lib3ds.git] / crossmingw32-lib3ds.spec
1 %define         realname        lib3ds
2 Summary:        The 3D Studio File Format Library - Mingw32 cross version
3 Summary(pl):    Biblioteka obs³uguj±ca format plików 3D Studio - wersja skro¶na dla Mingw32
4 Name:           crossmingw32-%{realname}
5 Version:        1.2.0
6 Release:        1
7 License:        LGPL
8 Group:          Libraries
9 Source0:        http://dl.sourceforge.net/lib3ds/%{realname}-%{version}.tar.gz
10 # Source0-md5:  3a7f891d18af0151876b98bc05d3b373
11 URL:            http://lib3ds.sourceforge.net/
12 BuildRequires:  autoconf
13 BuildRequires:  automake
14 BuildRequires:  crossmingw32-gcc
15 BuildRequires:  crossmingw32-w32api
16 BuildRequires:  libtool
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %define         no_install_post_strip   1
20
21 %define         target          i386-mingw32
22 %define         target_platform i386-pc-mingw32
23 %define         arch            %{_prefix}/%{target}
24 %define         gccarch         %{_prefix}/lib/gcc-lib/%{target}
25 %define         gcclib          %{_prefix}/lib/gcc-lib/%{target}/%{version}
26
27 %define         __cc            %{target}-gcc
28 %define         __cxx           %{target}-g++
29
30 %description
31 lib3ds is a free alternative to Autodesk's 3DS File Toolkit for
32 handling 3DS files. It's main goal is to simplify the creation of 3DS
33 import and export filters.
34
35 %description -l pl
36 lib3ds to wolnodostêpna alternatywa dla 3DS File Toolkit Autodeska do
37 obs³ugi plików 3DS. G³ównym celem biblioteki jest uproszczenie
38 tworzenia filtrów importuj±cych i eksportuj±cych 3DS.
39
40 %package dll
41 Summary:        %{realname} - DLL library for Windows
42 Summary(pl):    %{realname} - biblioteka DLL dla Windows
43 Group:          Applications/Emulators
44
45 %description dll
46 %{realname} - DLL library for Windows.
47
48 %description dll -l pl
49 %{realname} - biblioteka DLL dla Windows.
50
51 %prep
52 %setup -q -n %{realname}-%{version}
53
54 %build
55 CC=%{target}-gcc ; export CC
56 CXX=%{target}-g++ ; export CXX
57 LD=%{target}-ld ; export LD
58 AR=%{target}-ar ; export AR
59 AS=%{target}-as ; export AS
60 CROSS_COMPILE=1 ; export CROSS_COMPILE
61 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
62 RANLIB=%{target}-ranlib ; export RANLIB
63 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
64 TARGET="%{target}" ; export TARGET
65
66 tail -116 aclocal.m4 | head -102 > acinclude.m4
67 %{__libtoolize}
68 %{__aclocal}
69 %{__autoconf}
70 %{__autoheader}
71 %{__automake}
72 %configure \
73         --host=%{_host} \
74         --target=%{target}
75
76 %{__make}
77
78 cd lib3ds
79 %{__cc} --shared *.o -Wl,--enable-auto-image-base -o 3ds.dll -Wl,--out-implib,lib3ds.dll.a
80
81 %if 0%{!?debug:1}
82 %{target}-strip *.dll
83 %{target}-strip -g -R.comment -R.note *.a
84 %endif
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT%{arch}/{include/lib3ds,lib}
89 install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
90
91 cd lib3ds
92
93 install *.h $RPM_BUILD_ROOT%{arch}/include/lib3ds
94 rm $RPM_BUILD_ROOT%{arch}/include/lib3ds/chunktable.h
95 install lib3ds{,.dll}.a $RPM_BUILD_ROOT%{arch}/lib
96 install 3ds.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %files
102 %defattr(644,root,root,755)
103 %{arch}/include/*
104 %{arch}/lib/*
105
106 %files dll
107 %defattr(644,root,root,755)
108 %{_datadir}/wine/windows/system/*
This page took 0.279384 seconds and 2 git commands to generate.