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