9c44c3bea583140df422ad3d7341dac92fa73dc5
[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:        4
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 # jdk only these platforms
40 ExclusiveArch:  i586 i686 pentium3 pentium4 athlon %{x8664}
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
44 # false positives found by perlreq from rpm 4.1
45 %define         _noautoreq      'perl(VRML::Events)' 'perl(VRML::VRMLCU)' 'perl(VRML::VRMLFields)' 'perl(VRML::VRMLNodes)' 'perl(VRMLFields)' 'perl(VRMLNodes)' 'perl(VRMLRend)'
46
47 %define         _specflags_x86_64        -fPIC
48
49 %description
50 FreeWRL - VRML/X3D browser.
51
52 %description -l pl.UTF-8
53 FreeWRL - przeglądarka VRM/X3D.
54
55 %package -n browser-plugin-%{name}
56 Summary:        VRML/X3D plugin for WWW browser
57 Summary(pl.UTF-8):      Wtyczka VRML/X3D dla przeglądarki WWW
58 Group:          Libraries
59 Requires:       %{name} = %{version}-%{release}
60 Requires:       browser-plugins >= 2.0
61 Obsoletes:      konqueror-plugin-freewrl
62 Obsoletes:      mozilla-firefox-plugin-freewrl
63 Obsoletes:      mozilla-plugin-freewrl
64 Obsoletes:      netscape-plugin-freewrl
65
66 %description -n browser-plugin-%{name}
67 VRML and X3D plugin for WWW browser.
68
69 %description -n browser-plugin-%{name} -l pl.UTF-8
70 Wtyczka VRML i X3D dla przeglądarki WW.
71
72 %prep
73 %setup -q
74 %patch0 -p1
75 %patch1 -p1
76 %patch2 -p1
77 %patch3 -p1
78
79 # avoid using included js
80 rm -rf JS
81
82 %{__sed} -i -e 's#\(NETSCAPE_\(INST\|CLASSES\|PLUGINS\)\) =>.*#\1 => "%{_browserpluginsdir}",#' vrml.conf*
83
84 %build
85 %{__perl} Makefile.PL \
86         INSTALLDIRS=vendor
87
88 %{__make} -j1 \
89         CC="%{__cc}" \
90         OPTIMIZE="%{rpmcflags}" \
91         DESTINSTALLPRIVLIB=%{perl_vendorlib}
92
93 %{__make} -C Plugin \
94         CC="%{__cc}" \
95         OPTIMIZER="%{rpmcflags}"
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99 install -d $RPM_BUILD_ROOT{%{_bindir},%{_browserpluginsdir},%{perl_vendorlib}/VRML}
100
101 %{__make} install \
102         DESTDIR=$RPM_BUILD_ROOT \
103         SITEARCHEXP=$RPM_BUILD_ROOT%{perl_vendorarch} \
104         DESTINSTALLPRIVLIB=$RPM_BUILD_ROOT%{perl_vendorlib} \
105         PLUGDIR=%{_browserpluginsdir} \
106         CHCON=true
107
108 # specified in java/classes/Makefile.PL, but finally not installed
109 install java/classes/vrml.jar $RPM_BUILD_ROOT%{perl_vendorlib}/VRML
110 install java/classes/java.policy $RPM_BUILD_ROOT%{perl_vendorlib}/VRML
111
112 rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/fonts/{COPYRIGHT,README,RELEASENOTES}.TXT
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %post   -p /sbin/ldconfig
118 %postun -p /sbin/ldconfig
119
120 %post -n browser-plugin-%{name}
121 %update_browser_plugins
122
123 %postun -n browser-plugin-%{name}
124 if [ "$1" = 0 ]; then
125         %update_browser_plugins
126 fi
127
128 %files
129 %defattr(644,root,root,755)
130 %doc CHANGELOG README.html
131 %attr(755,root,root) %{_bindir}/FreeWRL_Message
132 %attr(755,root,root) %{_bindir}/FreeWRL_SoundServer
133 %attr(755,root,root) %{_bindir}/freewrl
134 %attr(755,root,root) %{_libdir}/libFreeWRLFunc.so
135 %dir %{perl_vendorlib}/VRML
136 %{perl_vendorlib}/VRML/java.policy
137 %{perl_vendorlib}/VRML/vrml.jar
138 %dir %{_datadir}/%{name}
139 %dir %{_datadir}/%{name}/fonts
140 %{_datadir}/%{name}/fonts/*.ttf
141 %{_datadir}/%{name}/fonts/*.conf
142 %{_pixmapsdir}/%{name}.png
143 %{_desktopdir}/%{name}.desktop
144
145 %files -n browser-plugin-%{name}
146 %defattr(644,root,root,755)
147 %attr(755,root,root) %{_browserpluginsdir}/npfreewrl.so
148 %{_browserpluginsdir}/vrml.jar
This page took 0.080184 seconds and 2 git commands to generate.