- jdk is n/a on ppc
[packages/freewrl.git] / freewrl.spec
1 # TODO:
2 # - install fonts system-wide (subpackage?)
3 # - install one copy of vrml.jar
4 %include        /usr/lib/rpm/macros.perl
5 %define         pdir    VRML
6 %define         pnam    VRMLFunc
7 Summary:        FreeWRL - VRML/X3D browser
8 Summary(pl.UTF-8):      FreeWRL - przeglądarka VRM/X3D
9 Name:           freewrl
10 Version:        1.19.8
11 Release:        2
12 License:        LGPL v2
13 Group:          X11/Applications/Graphics
14 Source0:        http://dl.sourceforge.net/freewrl/%{name}-%{version}.tar.gz
15 # Source0-md5:  c193a1eb6e88c4253b6aec02098a9d3c
16 Patch0:         %{name}-config.patch
17 Patch1:         %{name}-makefile.patch
18 Patch2:         %{name}-system-js.patch
19 Patch3:         %{name}-optimize.patch
20 URL:            http://freewrl.sourceforge.net/
21 BuildRequires:  ImageMagick-devel
22 BuildRequires:  OpenGL-devel
23 BuildRequires:  freetype-devel >= 2.0
24 BuildRequires:  jdk
25 BuildRequires:  js-devel
26 BuildRequires:  libjpeg-devel
27 BuildRequires:  libpng-devel
28 BuildRequires:  motif-devel
29 BuildRequires:  perl-devel >= 1:5.8.0
30 BuildRequires:  rpm-perlprov >= 4.1-13
31 BuildRequires:  rpmbuild(macros) >= 1.357
32 BuildRequires:  saxon
33 BuildRequires:  xorg-lib-libXaw-devel
34 %ifarch %{x8664} ia64 ppc64 s390x sparc64
35 Provides:       libFreeWRLFunc.so()(64-bit)
36 %else
37 Provides:       libFreeWRLFunc.so
38 %endif
39 Requires:       perl(DynaLoader) = %(%{__perl} -MDynaLoader -e 'print DynaLoader->VERSION')
40 # jdk only these platforms
41 ExclusiveArch:  i586 i686 pentium3 pentium4 athlon %{x8664}
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
45 # false positives found by perlreq from rpm 4.1
46 %define         _noautoreq      'perl(VRML::Events)' 'perl(VRML::VRMLCU)' 'perl(VRML::VRMLFields)' 'perl(VRML::VRMLNodes)' 'perl(VRMLFields)' 'perl(VRMLNodes)' 'perl(VRMLRend)'
47
48 %description
49 FreeWRL - VRML/X3D browser.
50
51 %description -l pl.UTF-8
52 FreeWRL - przeglądarka VRM/X3D.
53
54 %package -n browser-plugin-%{name}
55 Summary:        VRML/X3D plugin for WWW browser
56 Summary(pl.UTF-8):      Wtyczka VRML/X3D dla przeglądarki WWW
57 Group:          Libraries
58 Requires:       %{name} = %{version}-%{release}
59 Requires:       browser-plugins >= 2.0
60 Obsoletes:      konqueror-plugin-freewrl
61 Obsoletes:      mozilla-firefox-plugin-freewrl
62 Obsoletes:      mozilla-plugin-freewrl
63 Obsoletes:      netscape-plugin-freewrl
64
65 %description -n browser-plugin-%{name}
66 VRML and X3D plugin for WWW browser.
67
68 %description -n browser-plugin-%{name} -l pl.UTF-8
69 Wtyczka VRML i X3D dla przeglądarki WW.
70
71 %prep
72 %setup -q
73 %patch0 -p1
74 %patch1 -p1
75 %patch2 -p1
76 %patch3 -p1
77
78 # avoid using included js
79 rm -rf JS
80
81 %{__sed} -i -e 's#\(NETSCAPE_\(INST\|CLASSES\|PLUGINS\)\) =>.*#\1 => "%{_browserpluginsdir}",#' vrml.conf*
82
83 %build
84 %{__perl} Makefile.PL \
85         INSTALLDIRS=vendor
86
87 %{__make} -j1 \
88         CC="%{__cc}" \
89         OPTIMIZE="%{rpmcflags}" \
90         DESTINSTALLPRIVLIB=%{perl_vendorlib}
91
92 %{__make} -C Plugin \
93         CC="%{__cc}" \
94         OPTIMIZER="%{rpmcflags}"
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT{%{_bindir},%{_browserpluginsdir},%{perl_vendorlib}/VRML}
99
100 %{__make} install \
101         DESTDIR=$RPM_BUILD_ROOT \
102         SITEARCHEXP=$RPM_BUILD_ROOT%{perl_vendorarch} \
103         DESTINSTALLPRIVLIB=$RPM_BUILD_ROOT%{perl_vendorlib} \
104         PLUGDIR=%{_browserpluginsdir} \
105         CHCON=true
106
107 # specified in java/classes/Makefile.PL, but finally not installed
108 install java/classes/vrml.jar $RPM_BUILD_ROOT%{perl_vendorlib}/VRML
109 install java/classes/java.policy $RPM_BUILD_ROOT%{perl_vendorlib}/VRML
110
111 rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/fonts/{COPYRIGHT,README,RELEASENOTES}.TXT
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT
115
116 %post   -p /sbin/ldconfig
117 %postun -p /sbin/ldconfig
118
119 %post -n browser-plugin-%{name}
120 %update_browser_plugins
121
122 %postun -n browser-plugin-%{name}
123 if [ "$1" = 0 ]; then
124         %update_browser_plugins
125 fi
126
127 %files
128 %defattr(644,root,root,755)
129 %doc CHANGELOG README.html
130 %attr(755,root,root) %{_bindir}/FreeWRL_Message
131 %attr(755,root,root) %{_bindir}/FreeWRL_SoundServer
132 %attr(755,root,root) %{_bindir}/freewrl
133 %attr(755,root,root) %{_libdir}/libFreeWRLFunc.so
134 %dir %{perl_vendorlib}/VRML
135 %{perl_vendorlib}/VRML/java.policy
136 %{perl_vendorlib}/VRML/vrml.jar
137 %dir %{_datadir}/%{name}
138 %dir %{_datadir}/%{name}/fonts
139 %{_datadir}/%{name}/fonts/*.ttf
140 %{_datadir}/%{name}/fonts/*.conf
141 %{_pixmapsdir}/%{name}.png
142 %{_desktopdir}/%{name}.desktop
143
144 %files -n browser-plugin-%{name}
145 %defattr(644,root,root,755)
146 %attr(755,root,root) %{_browserpluginsdir}/npfreewrl.so
147 %{_browserpluginsdir}/vrml.jar
This page took 0.044909 seconds and 3 git commands to generate.