- use browser plugins (no triggers as pkg wasn't on ftp), added seamonkey
[packages/freewrl.git] / freewrl.spec
1 # TODO:
2 # - install fonts system-wide (subpackage?)
3 # - CC not always honoured
4 # - ?? add more to optimize.patch
5 %include        /usr/lib/rpm/macros.perl
6 %define         pdir    VRML
7 %define         pnam    VRMLFunc
8 Summary:        FreeWRL - VRML browser
9 Summary(pl):    FreeWRL - przegl±darka VRML
10 Name:           freewrl
11 Version:        1.17.4
12 Release:        0.2
13 License:        LGPL
14 Group:          X11/Applications/Graphics
15 Source0:        http://dl.sourceforge.net/freewrl/%{name}-%{version}.tar.gz
16 # Source0-md5:  0c4e7d91b51c593d37ca190d112c869e
17 Patch0:         %{name}-config.patch
18 Patch1:         %{name}-make.patch
19 Patch2:         %{name}-system-js.patch
20 Patch3:         %{name}-optimize.patch
21 URL:            http://freewrl.sourceforge.net/
22 BuildRequires:  ImageMagick
23 BuildRequires:  OpenGL-devel
24 BuildRequires:  X11-devel
25 BuildRequires:  freetype-devel >= 2.0
26 BuildRequires:  jar
27 BuildRequires:  jdk
28 BuildRequires:  js-devel
29 BuildRequires:  lesstif-devel
30 BuildRequires:  libjpeg-devel
31 BuildRequires:  libpng-devel
32 BuildRequires:  mozilla-devel
33 BuildRequires:  mozilla-embedded(gtk2)
34 BuildRequires:  perl-devel >= 1:5.8.0
35 BuildRequires:  rpm-perlprov >= 4.1-13
36 BuildRequires:  rpmbuild(macros) >= 1.236
37 BuildRequires:  saxon
38 %ifarch %{x8664} ia64 ppc64 s390x sparc64
39 Provides:       libFreeWRLFunc.so()(64-bit)
40 %else
41 Provides:       libFreeWRLFunc.so
42 %endif
43 Requires:       perl(DynaLoader) = %(%{__perl} -MDynaLoader -e 'print DynaLoader->VERSION')
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %define         _plugindir      %{_libdir}/browser-plugins
47 %define         browsers mozilla, mozilla-firefox, konqueror, seamonkey
48
49 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
50 # false positives found by perlreq from rpm 4.1
51 %define         _noautoreq      'perl(VRML::Events)' 'perl(VRML::VRMLCU)' 'perl(VRML::VRMLFields)' 'perl(VRML::VRMLNodes)' 'perl(VRMLFields)' 'perl(VRMLNodes)' 'perl(VRMLRend)'
52
53 %description
54 FreeWRL - VRML browser.
55
56 %description -l pl
57 FreeWRL - przegl±darka VRML.
58
59 %package -n browser-plugin-%{name}
60 Summary:        VRML plugin for WWW browser
61 Summary(pl):    Wtyczka VRML dla przegl±darki WWW
62 Group:          Libraries
63 Requires:       %{name} = %{version}-%{release}
64 Requires:       browser-plugins(%{_target_base_arch})
65 Obsoletes:      konqueror-plugin-freewrl
66 Obsoletes:      mozilla-firefox-plugin-freewrl
67 Obsoletes:      mozilla-plugin-freewrl
68 Obsoletes:      netscape-plugin-freewrl
69
70 %description -n browser-plugin-%{name}
71 VRML plugin for Mozilla WWW browser.
72
73 Supported browsers: %{browsers}.
74
75 %description -n browser-plugin-%{name} -l pl
76 Wtyczka VRML dla przegl±darki WWW Mozilla.
77
78 Obs³ugiwane przegl±darki: %{browsers}.
79
80 %prep
81 %setup -q
82 %patch0 -p1
83 %patch1 -p1
84 %patch2 -p1
85 %patch3 -p1
86
87 # this file causes unnecessary/unwanted rebuilds of JS module
88 rm -f JS/Makefile.aqua.PL
89 %{__sed} -i -e 's#\(NETSCAPE_\(INST\|CLASSES\|PLUGINS\)\) =>.*#\1 => "%{_plugindir}",#' vrml.conf*
90
91 %build
92 %{__perl} Makefile.PL \
93         INSTALLDIRS=vendor
94 %{__make} -j1 \
95         CC="%{__cc}" \
96         OPTIMIZE="%{rpmcflags}" \
97         OPTIMIZER="%{rpmcflags}" \
98         DESTINSTALLPRIVLIB=%{perl_vendorlib}
99
100 %{__make} -C Plugin \
101         CC="%{__cc}" \
102         OPTIMIZER="%{rpmcflags}"
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106 install -d $RPM_BUILD_ROOT{%{_bindir},%{_plugindir},%{perl_vendorlib}/VRML}
107
108 %{__make} install \
109         DESTDIR=$RPM_BUILD_ROOT \
110         SITEARCHEXP=$RPM_BUILD_ROOT%{perl_vendorarch} \
111         DESTINSTALLPRIVLIB=$RPM_BUILD_ROOT%{perl_vendorlib} \
112         PLUGDIR=%{_plugindir}
113
114 # specified in java/classes/Makefile.PL, but finally not installed
115 install java/classes/vrml.jar $RPM_BUILD_ROOT%{perl_vendorlib}/VRML
116 install java/classes/java.policy $RPM_BUILD_ROOT%{perl_vendorlib}/VRML
117
118 # remove copy, make a symlink
119 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/VRML/VRMLFunc/libFreeWRLFunc.so
120 ln -sf %{perl_vendorarch}/auto/VRML/VRMLFunc/VRMLFunc.so $RPM_BUILD_ROOT%{_libdir}/libFreeWRLFunc.so
121
122 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/VRML/fonts/{COPYRIGHT,README,RELEASENOTES}.TXT
123
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %triggerun -- mozilla-firefox
128 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins %{name}.so %{name}.xpi
129
130 %triggerin -- mozilla
131 %nsplugin_install -d %{_libdir}/mozilla/plugins %{name}.so %{name}.xpi
132
133 %triggerun -- mozilla
134 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins %{name}.so %{name}.xpi
135
136 %triggerin -- konqueror
137 %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror %{name}.so %{name}.xpi
138
139 %triggerun -- konqueror
140 %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror %{name}.so %{name}.xpi
141
142 %triggerin -- seamonkey
143 %nsplugin_install -d %{_libdir}/seamonkey/plugins %{name}.so %{name}.xpi
144
145 %triggerun -- seamonkey
146 %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins %{name}.so %{name}.xpi
147
148 %files
149 %defattr(644,root,root,755)
150 %doc README.html
151 %attr(755,root,root) %{_bindir}/*
152 %attr(755,root,root) %{_libdir}/libFreeWRLFunc.so
153 %attr(755,root,root) %{_libdir}/libFreeWRLjs.so
154
155 %dir %{perl_vendorlib}/VRML
156 %attr(755,root,root) %{perl_vendorlib}/VRML/fw2init.pl
157 %{perl_vendorlib}/VRML/java.policy
158 %{perl_vendorlib}/VRML/vrml.jar
159 %dir %{perl_vendorlib}/VRML/fonts
160 # Bitstream Amerigo, BauerBodni, Futura fonts
161 %{perl_vendorlib}/VRML/fonts/*.ttf
162 %{perl_vendorarch}/VRML
163 %dir %{perl_vendorarch}/auto/VRML
164 %dir %{perl_vendorarch}/auto/VRML/*
165 %{perl_vendorarch}/auto/VRML/*/*.bs
166 %attr(755,root,root) %{perl_vendorarch}/auto/VRML/*/*.so
167 %{_mandir}/man1/*.1*
168 %{_mandir}/man3/*.3*
169
170 %files -n browser-plugin-%{name}
171 %defattr(644,root,root,755)
172 %attr(755,root,root) %{_plugindir}/*.so
This page took 0.04397 seconds and 3 git commands to generate.