]> git.pld-linux.org Git - packages/blender.git/blob - blender.spec
- bcond python23 for optional python 2.3/2.4 build
[packages/blender.git] / blender.spec
1 # TODO:
2 # - enable internalization support (BR libftgl)
3 # - enable OpenAL support
4 # - libsolid/libqhull/libode BR ?
5 # - package python scripts
6 #
7 # Conditional build:
8 %bcond_with     python23        # build for Python 2.3
9 Summary:        3D modeling, rendering, animation and game creation package
10 Summary(pl):    Pakiet do tworzenia animacji 3D oraz gier
11 Name:           blender
12 Version:        2.35
13 Release:        2
14 License:        GPL
15 Group:          X11/Applications/Graphics
16 Source0:        http://download.blender.org/source/%{name}-%{version}.tar.bz2
17 # Source0-md5:  d451bb3047a9c2fe785c0b91f9769717
18 Source1:        %{name}.desktop
19 Source2:        %{name}.png
20 Source3:        %{name}-config.opts
21 Patch0:         %{name}-po_and_locale_names.patch
22 URL:            http://www.blender.org/
23 #BuildRequires: OpenAL-devel
24 BuildRequires:  OpenGL-devel
25 BuildRequires:  SDL-devel
26 #BuildRequires: autoconf
27 #BuildRequires: automake
28 #BuildRequires: esound-devel
29 BuildRequires:  libjpeg-devel
30 BuildRequires:  libpng-devel
31 BuildRequires:  libstdc++-devel
32 BuildRequires:  libtool
33 BuildRequires:  libvorbis-devel
34 BuildRequires:  openssl-devel >= 0.9.7d
35 %if %{with python23}
36 BuildRequires:  python-devel >= 1:2.3
37 BuildRequires:  python-devel < 1:2.4
38 %else
39 BuildRequires:  python-devel >= 1:2.3
40 %endif
41 BuildRequires:  scons
42 #BuildRequires: smpeg-devel
43 BuildRequires:  zlib-devel
44 Requires:       OpenGL
45 Requires:       python-modules
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
49
50 %description
51 Blender is a free and fully functional 3D modeling, rendering,
52 animation and game creation package for Unix, Windows and BeOS
53 systems.
54
55 %description -l pl
56 Blender to darmowy i w pe³ni funkcjonalny pakiet do tworzenia animacji
57 3D oraz gier, dostêpny dla systemów Unix, Windows i BeOS.
58
59 %prep
60 %setup -q
61 %patch0 -p1
62
63 mv -f po/pt_{br,BR}.po
64 rm -rf bin/.blender/locale
65 install %{SOURCE3} config.opts
66
67 %build
68 rm -f missing
69
70 RPMCFLAGS="\"`echo %{rpmcflags}|sed 's/ /\",\"/g'`\""
71 RPMLDFLAGS="\"`echo %{rpmldflags}|sed 's/ /\",\"/g'`\""
72
73 sed -i -e "s|^CCFLAGS =.*|CCFLAGS = [$RPMCFLAGS]|" \
74         -e "s|^CXXFLAGS =.*|CXXFLAGS = [$RPMCFLAGS]|" \
75         -e "s|^LDFLAGS =.*|LDFLAGS = [$RPMLDFLAGS]|" \
76         config.opts
77 sed -i -e "s|TARGET_CC =.*|TARGET_CC = '%{__cc}'|" \
78         -e "s|TARGET_CXX =.*|TARGET_CXX = '%{__cxx}'|" \
79         config.opts
80 %if %{without python23}
81 sed -i 's/python2\.3/python2.4/' config.opts
82 %endif
83
84 scons
85 %{__make} -C po OCGDIR=..
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT{%{_datadir},%{_desktopdir},%{_pixmapsdir},%{_bindir}}
90
91 install -m755 blender $RPM_BUILD_ROOT%{_bindir}
92 install -m755 blenderplayer $RPM_BUILD_ROOT%{_bindir}
93 install -c %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
94 install -c %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
95 cp -a bin/.blender/locale $RPM_BUILD_ROOT%{_datadir}
96
97 %find_lang %{name} --all-name
98
99 %clean
100 rm -rf $RPM_BUILD_ROOT
101
102 %files -f %{name}.lang
103 %defattr(644,root,root,755)
104 %doc README doc/bf-members.txt doc/python-dev-guide.txt doc/oldbugs.txt doc/interface_API.txt 
105 %doc release/text/{blender.html,release*.txt}
106 %attr(755,root,root) %{_bindir}/*
107 %{_desktopdir}/*.desktop
108 %{_pixmapsdir}/*.png
This page took 0.236083 seconds and 4 git commands to generate.