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