source: projects/specs/trunk/n/nspluginwrapper/nspluginwrapper-vl.spec @ 521

Revision 521, 16.2 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

Line 
1%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
2
3# Compile as a debug package
4%define make_debug_package      0
5
6# What gecko we use
7%define gecko_flavour           "mozilla"
8
9%define plugin_config_version 1.9
10%define plugin_config_name plugin-config-%{plugin_config_version}
11%define plugin_config_binary plugin-config
12
13# Excluded plugins (separated by ':')
14%define exclude_list            "libtotem*:libjavaplugin*:gecko-mediaplayer*:mplayerplug-in*:librhythmbox*"
15
16# Target defines
17%if "%{_target_cpu}" == "i386"
18%define target_bits     32
19%endif
20
21%if "%{_target_cpu}" == "i586"
22%define target_bits     32
23%endif
24
25%if "%{_target_cpu}" == "i686"
26%define target_bits     32
27%endif
28
29%if "%{_target_cpu}" == "ppc"
30%define target_bits     32
31%endif
32
33%if "%{_target_cpu}" == "x86_64"
34%define target_bits     64
35%endif
36
37%if "%{_target_cpu}" == "ppc64"
38%define target_bits     64
39%endif
40
41# Define libraries for 32/64 arches
42%define lib32                   lib
43%define lib64                   lib64
44%define libdir32                /usr/lib
45%define libdir64                /usr/lib64
46
47# define nspluginswrapper libdir (invariant, including libdir)
48%define pkgdir32                %{libdir32}/%{name}
49%define pkgdir64                %{libdir64}/%{name}
50
51# define mozilla plugin dir and back up dir for 32-bit browsers
52%define pluginsourcedir32       %{libdir32}/mozilla/plugins
53%define plugindir32             %{libdir32}/mozilla/plugins-wrapped
54
55# define mozilla plugin dir and back up dir for 64-bit browsers
56%define pluginsourcedir64       %{libdir64}/mozilla/plugins
57%define plugindir64             %{libdir64}/mozilla/plugins-wrapped
58
59%define build_dir               objs-%{target_bits}
60
61%if "%{target_bits}" == "32"
62%define lib             %{lib32}
63%define libdir          %{libdir32}
64%define pkgdir          %{pkgdir32}
65%define plugindir       %{plugindir32}
66%define pluginsourcedir %{pluginsourcedir32}
67%else
68%define lib             %{lib64}
69%define libdir          %{libdir64}
70%define pkgdir          %{pkgdir64}
71%define plugindir       %{plugindir64}
72%define pluginsourcedir %{pluginsourcedir64}
73%endif
74
75Summary:        A compatibility layer for Netscape 4 plugins
76Name:           nspluginwrapper
77Version:        1.3.0
78Release:        1%{?_dist_release}
79Source0:        %{name}-%{version}%{?svndate:-%{svndate}}.tar.bz2
80Source1:        %{plugin_config_name}.tar.gz
81Source2:        plugin-config.sh.in
82Source3:        %{name}.sh.in
83Patch1:         nspluginwrapper-1.3.0-make.patch
84Patch2:         nspluginwrapper-1.3.0-configure.patch
85Patch3:         nspluginwrapper-1.3.0-directory.patch
86Patch100:       plugin-config-setuid.patch
87Patch101:       plugin-config-umask.patch
88Patch102:       plugin-config-print.patch
89Patch103:       plugin-config-native.patch
90License:        GPLv2+
91Group:          Networking/WWW
92Url:            http://gwenole.beauchesne.info/projects/nspluginwrapper/
93BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
94Provides:       %{name} = %{version}-%{release}
95#Requires:      mozilla-filesystem
96%ifarch x86_64
97Requires:       compat32-%{name} = %{version}-%{release}
98%endif
99BuildRequires:  pkgconfig gtk2-devel glib2-devel nspr-devel
100BuildRequires:  libX11-devel libXt-devel cairo-devel pango-devel curl-devel
101BuildRequires:  gecko-devel
102ExclusiveArch:  %{ix86} x86_64 ppc
103
104%description
105nspluginwrapper makes it possible to use Netscape 4 compatible plugins
106compiled for %{_arch} into Mozilla for another architecture, e.g. x86_64.
107
108This package consists in:
109  * npviewer: the plugin viewer
110  * npwrapper.so: the browser-side plugin
111  * nspluginplayer: stand-alone NPAPI plugin player
112  * mozilla-plugin-config: a tool to manage plugins installation and update
113
114## to build compat32 for x86_64 architecture support
115%package -n compat32-%{name}
116Summary:        A compatibility layer for Netscape 4 plugins
117Group: System Environment/Libraries
118
119%description -n compat32-%{name}
120nspluginwrapper makes it possible to use Netscape 4 compatible plugins
121compiled for %{_arch} into Mozilla for another architecture, e.g. x86_64.
122
123This package consists in:
124  * npviewer: the plugin viewer
125  * npwrapper.so: the browser-side plugin
126  * nspluginplayer: stand-alone NPAPI plugin player
127  * mozilla-plugin-config: a tool to manage plugins installation and update
128
129
130%prep
131%setup  -q -a 1
132
133# Installation & build patches
134%patch1 -p1 -b .make
135%patch2 -p1 -b .conf
136%patch3 -p1 -b .dir
137
138# Plugin-config patches
139pushd %plugin_config_name
140%patch100 -p2
141%patch101 -p2 -b .umask
142%patch102 -p2 -b .print
143%patch103 -p2 -b .native
144popd
145
146%build
147# Build wrapper
148
149# set the propper built options
150%if %{make_debug_package}
151    %if "%{target_bits}" == "64"
152        export CFLAGS="-g -m64 -DDEBUG"
153    %else
154        export CFLAGS="-g -m32 -DDEBUG"
155    %endif
156%else
157    export CFLAGS="$RPM_OPT_FLAGS"
158%endif
159
160# set the propper built options
161%if "%{target_bits}" == "64"
162    export LDFLAGS="-m64 -L%{libdir64}"
163%else
164    export LDFLAGS="-m32 -L%{libdir32}"
165%endif
166
167mkdir %{build_dir}
168pushd %{build_dir}
169../configure                                    \
170            --prefix=%{_prefix}                 \
171            --target-cpu=%{_target_cpu}         \
172            --pkgdir=%{name}                    \
173            --pkglibdir=%{pkgdir}               \
174            --with-lib32=%{lib32}               \
175            --with-lib64=%{lib64}               \
176            --with-base-lib=%{lib}              \
177            --with-base-libdir=%{libdir}        \
178            --viewer-paths=%{pkgdir}            \
179            --with-x11-prefix=/usr              \
180            --with-gecko=%{gecko_flavour}       \
181            --enable-viewer                     \
182            --viewer-paths="%{pkgdir32}:%{pkgdir64}"\
183            --disable-biarch
184       
185make
186popd
187
188#Build plugin configuration utility
189pushd %{plugin_config_name}
190./configure --prefix=/usr CFLAGS="$RPM_OPT_FLAGS"
191make
192popd
193
194%install
195rm -rf $RPM_BUILD_ROOT
196
197mkdir -p $RPM_BUILD_ROOT%{_bindir}
198mkdir -p $RPM_BUILD_ROOT%{plugindir}
199mkdir -p $RPM_BUILD_ROOT%{pluginsourcedir}
200mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
201
202make -C %{build_dir} install DESTDIR=$RPM_BUILD_ROOT
203
204ln -s %{pkgdir}/npwrapper.so $RPM_BUILD_ROOT/%{plugindir}/npwrapper.so
205
206# Install plugin-config utility
207pushd %{plugin_config_name}
208DESTDIR=$RPM_BUILD_ROOT make install
209popd
210
211cd $RPM_BUILD_ROOT/usr/bin
212mv %{plugin_config_binary} $RPM_BUILD_ROOT/%{pkgdir}
213cd -
214
215rm -rf $RPM_BUILD_ROOT/usr/doc/plugin-config
216
217cat %{SOURCE2} > $RPM_BUILD_ROOT%{_bindir}/mozilla-plugin-config
218chmod 755 $RPM_BUILD_ROOT%{_bindir}/mozilla-plugin-config
219
220cat %{SOURCE3} | %{__sed} -e "s|EXCLUDE_LIST|%{exclude_list}|g" \
221    > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
222chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
223
224# set up nsplugin player starting script
225%{__cat} > $RPM_BUILD_ROOT%{pkgdir}/nspluginplayer << EOF
226export MOZ_PLUGIN_PATH=%{pluginsourcedir}
227%{pkgdir}/npplayer "$@"
228EOF
229chmod 755 $RPM_BUILD_ROOT%{pkgdir}/nspluginplayer
230
231# Remove conflicting files
232rm -rf $RPM_BUILD_ROOT%{_bindir}/nspluginplayer
233rm -rf $RPM_BUILD_ROOT%{_bindir}/nspluginwrapper
234
235## <mozilla-filesystem>
236mkdir -p $RPM_BUILD_ROOT/usr/{lib,%{_lib}}/mozilla/{plugins,extensions}
237mkdir -p $RPM_BUILD_ROOT/%{_datadir}/mozilla/extensions
238mkdir -p $RPM_BUILD_ROOT/etc/skel/.mozilla/{plugins,extensions}
239## </mozilla-filesystem>
240
241%clean
242rm -rf $RPM_BUILD_ROOT
243
244%post
245/usr/bin/mozilla-plugin-config -i -f > /dev/null 2>&1 || :
246
247%preun
248if [ "$1" == "0" ]; then
249    /usr/bin/mozilla-plugin-config -r > /dev/null 2>&1 || :
250fi;
251
252%files
253%defattr(-,root,root)
254%doc README COPYING NEWS
255%dir %{pkgdir}
256%dir %{plugindir}
257
258%{pkgdir}/%{plugin_config_binary}
259%{pkgdir}/npconfig
260%{pkgdir}/npwrapper.so
261%{pkgdir}/npviewer.bin
262%{pkgdir}/npviewer.sh
263%{pkgdir}/npviewer
264%{pkgdir}/npplayer
265%{pkgdir}/libxpcom.so
266%{pkgdir}/libnoxshm.so
267%{pkgdir}/nspluginplayer
268%{plugindir}/npwrapper.so
269%{_bindir}/mozilla-plugin-config
270%config %{_sysconfdir}/sysconfig/%{name}
271
272## <mozilla-filesystem>
273/usr/lib*/mozilla
274%{_datadir}/mozilla
275/etc/skel/.mozilla
276## </mozilla-filesystem>
277
278
279## to build compat32 for x86_64 architecture support
280%if %{build_compat32}
281%files -n compat32-%{name}
282%defattr(-,root,root)
283%dir %{pkgdir}
284%dir %{plugindir}
285
286%{pkgdir}/%{plugin_config_binary}
287%{pkgdir}/npconfig
288%{pkgdir}/npwrapper.so
289%{pkgdir}/npviewer.bin
290%{pkgdir}/npviewer.sh
291%{pkgdir}/npviewer
292%{pkgdir}/npplayer
293%{pkgdir}/libxpcom.so
294%{pkgdir}/libnoxshm.so
295%{pkgdir}/nspluginplayer
296%{plugindir}/npwrapper.so
297%endif
298
299
300%changelog
301* Sat Jun 20 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.3.0-1
302- initial release
303  - ported from Fedora development package
304
305* Tue Mar 03 2009 Warren Togami <wtogami@redhat.com> - 1.3.0-5
306- Really Fix x86 32bit build (#488308)
307
308* Sun Mar 01 2009 Warren Togami <wtogami@redhat.com> - 1.3.0-4
309- Fix x86 32bit build
310
311* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-3
312- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
313
314* Thu Jan 9 2009 Martin Stransky <stransky@redhat.com> 1.3.0-2
315- Fixed multilib conflicts
316
317* Thu Jan 8 2009 Martin Stransky <stransky@redhat.com> 1.3.0-1
318- Updated to 1.3.0 and removed some fedora build patches
319
320* Tue Dec 02 2008 Warren Togami <wtogami@redhat.com> 1.1.8-2
321- fix-invalid-RPC-after-NPP_Destroy fixes a crasher
322
323* Mon Dec 1 2008 Martin Stransky <stransky@redhat.com> 1.1.8-1
324- Updated to 1.1.8
325- Removed already upstreamed patches
326
327* Wed Nov 12 2008 Martin Stransky <stransky@redhat.com> 1.1.4-1
328- Updated to 1.1.4
329- Consolidated build patches
330
331* Wed Oct 22 2008 Martin Stransky <stransky@redhat.com> 1.1.2-4
332- Fixed #449338 - mozilla-plugin-config segfaults with -v argument
333
334* Tue Oct 21 2008 Martin Stransky <stransky@redhat.com> 1.1.2-3
335- Removed event patch, it blocks X events and breaks Adobe pdf plugin
336- Removed event limit in xt_event_polling_timer_callback
337
338* Fri Oct 17 2008 Martin Stransky <stransky@redhat.com> 1.1.2-2
339- added umask to plugin config (#463736)
340
341* Thu Oct 16 2008 Martin Stransky <stransky@redhat.com> 1.1.2-1
342- updated to 1.1.12
343- added librhythmbox* to ignored plugins (#467187)
344- removed debug prints (#467090)
345
346* Mon Oct 06 2008 Warren Togami <wtogami@redhat.com> 1.1.0-11
347- Unrevert patch from -7 because Warren was wrong
348- Concurrent rpc_method_invoke() patch
349
350* Fri Oct 03 2008 Warren Togami <wtogami@redhat.com> 1.1.0-10
351- Revert libcurl requires because it was done in an incorrect way
352- Revert patch from -7 because it made things worse
353
354* Tue Sep 30 2008 Martin Stransky <stransky@redhat.com> 1.1.0-7
355- Updated fix for #456432 -(Windowless Crash) Flash 10 w/ Firefox 3
356
357* Wed Sep 17 2008 Martin Stransky <stransky@redhat.com> 1.1.0-6
358- Added libcurl to requires (#460988)
359
360* Mon Aug 04 2008 Martin Stransky <stransky@redhat.com> 1.1.0-5
361- Added fix for #456432 -(Windowless Crash) Flash 10 w/ Firefox 3
362
363* Mon Jul 21 2008 Martin Stransky <stransky@redhat.com> 1.1.0-4
364- Removed gecko-libs from requieres (it's not needed now)
365
366* Tue Jul 18 2008 Martin Stransky <stransky@redhat.com> 1.1.0-3
367- Enabled experimental stand-alone plugin player
368
369* Tue Jul 15 2008 Martin Stransky <stransky@redhat.com> 1.1.0-2
370- Fixed build warnings in our patches
371
372* Tue Jul 8 2008 Martin Stransky <stransky@redhat.com> 1.1.0-1
373- update to latest upstream version (1.1.0)
374
375* Mon May 5 2008 Martin Stransky <stransky@redhat.com> 0.9.91.5-28
376- link pluginwrapper with stdc++ lib
377
378* Wed Apr 30 2008 Christopher Aillon <caillon@redhat.com> 0.9.91.5-27
379- mozilla-filesystem now owns the plugin source dir
380
381* Tue Mar 11 2008 Martin Stransky <stransky@redhat.com> 0.9.91.5-26
382- /etc/sysconfig/nspluginwrapper marked as config file
383- exclude some player plugins
384
385* Mon Mar 10 2008 Martin Stransky <stransky@redhat.com> 0.9.91.5-25
386- updated the sleep patch
387
388* Thu Mar 06 2008 Martin Stransky <stransky@redhat.com> 0.9.91.5-24
389- added experimental patch for #426968 - nspluginwrapper wakes up too much
390
391* Tue Feb 26 2008 Martin Stransky <stransky@redhat.com> 0.9.91.5-23
392- merged exclude patch with main tarball
393- fixed #431095 - Typo in mozilla-plugin-config verbose output
394
395* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.91.5-22
396- Autorebuild for GCC 4.3
397
398* Mon Jan 21 2008 Martin Stransky <stransky@redhat.com> 0.9.91.5-21
399- fixed #426618 - gcjwebplugin error: Failed to run
400  (added to ignored plugins)
401
402* Mon Jan 14 2008 Martin Stransky <stransky@redhat.com> 0.9.91.5-20
403- fixed #426176 - Orphaned npviewer.bin processes
404
405* Thu Jan 10 2008 Martin Stransky <stransky@redhat.com> 0.9.91.5-19
406- xulrunner rebuild
407- fixed build script, added gthread-2.0
408
409* Mon Dec 24 2007 Warren Togami <wtogami@redhat.com> 0.9.91.5-18
410- Make nsviewer.bin initialized for multithreading, fixes #360891
411
412* Tue Dec 20 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-17
413- disabled xpcom support - it causes more troubles than advantages
414
415* Tue Dec 13 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-16
416- spec fixes
417- fixed xulrunner support
418
419* Mon Dec 10 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-15
420- updated configure script - gecko selection
421
422* Thu Dec 06 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-14
423- enabled xpcom support
424- added fix for #393541 - scripts will never fail
425
426* Fri Nov 23 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-13
427- rebuilt against xulrunner
428
429* Tue Nov 6 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-12
430- more fixes from review by security standards team
431
432* Wed Oct 31 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-11
433- added fixes from review by security standards team
434
435* Fri Oct 26 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-10
436- mozilla-plugin-config can be run by normal user now
437
438* Wed Oct 24 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-9
439- Updated config utility - removes dangling symlinks and
440  wrapped plugins
441 
442* Tue Oct 23 2007 Jeremy Katz <katzj@redhat.com> 0.9.91.5-8
443- Rebuild against new firefox
444
445* Mon Oct 15 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-7
446- added a fix for #281061 - gnash fails when wrapped, works when native
447
448* Wed Oct 10 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-6
449- removed possibble deadlock during plugin restart
450
451* Tue Oct 9 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-5
452- fixed browser crashes (#290901)
453
454* Mon Oct 1 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-4
455- quit the plugin when browser crashes (#290901)
456
457* Fri Sep 21 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-3
458- added original plugin dir to the package
459
460* Mon Sep 10 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-2
461- added upstream patches - RPC error handling and plugin restart
462
463* Mon Aug 27 2007 Martin Stransky <stransky@redhat.com> 0.9.91.5-1
464- update to the latest upstream
465
466* Mon Aug 27 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-19
467- converted rpc error handling code to a thread-safe variant
468- added a time limit to plugin restart
469
470* Tue Aug 14 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-18
471- implemented plugin restart (#251530)
472
473* Tue Aug 14 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-17
474- fixed an installation script (#251698)
475
476* Mon Aug 13 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-16
477- fixed plugins check
478- minor spec fixes
479
480* Fri Aug 10 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-15
481- removed mozembeded dependency
482- excluded totem plugins from wrapping
483- xpcom support is optional now
484
485* Thu Aug 9 2007 Christopher Aillon <caillon@redhat.com> 0.9.91.4-14
486- Rebuild against newer gecko
487
488* Wed Aug 8 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-13
489- removed unsafe plugins probe
490- added agruments to mozilla-plugin-config
491
492* Tue Aug 7 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-12
493- removed fake libxpcom
494
495* Mon Aug 6 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-11
496- added gecko dependency
497- added plugin configuration utility
498
499* Fri Aug 3 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-10
500- fixed totem-complex plugin wrapping
501
502* Mon Jul 30 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-9
503- added plugin dirs
504
505* Fri Jul 27 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-8
506- added switch for creating debug packages
507
508* Thu Jul 19 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-7
509- integrated with firefox / seamonkey
510
511* Tue Jul 11 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-6
512- added new options to the configuration utility
513- modified along new plug-ins concept
514
515* Thu Jun 19 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-5
516- updated nspluginsetup script
517- added support for x86_64 plug-ins
518
519* Thu Jun 14 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-4
520- added ppc arch
521- silenced installation scripts
522- moved configuration to /etc/sysconfig
523
524* Thu Jun 12 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-3
525- updated nspluginsetup script and package install/uninstall scripts
526- added cross-compilation support
527- removed binaries stripping
528
529* Fri Jun 8 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-2
530- added BuildRequires - pkgconfig, gtk2-devel, glib, libXt-devel
531
532* Fri Jun 8 2007 Martin Stransky <stransky@redhat.com> 0.9.91.4-1
533- initial build
Note: See TracBrowser for help on using the repository browser.