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