Enable firefox/mozilla plugin

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
epel9
Mauro Carvalho Chehab 12 years ago
parent 16e94d76ea
commit 157b3dba2b

@ -13,6 +13,7 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.
Patch0: zbar_update_to_hg.patch
Patch1: zbar_use_libv4l.patch
Patch2: zbar_choose_supported_format_first.patch
Patch3: zbar_fix_npapi.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf automake libtool python-devel gettext-devel
@ -81,15 +82,23 @@ This package contains header files and additional libraries used for
developing GUI applications based on Qt4 that include a bar code
scanning widget.
%package plugin
Group: Applications/Internet
Summary: Mozilla plugin for zbar
%description plugin
This package contains zbar plugin for mozilla Firefox
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
autoreconf -vfi
%configure --with-graphicsmagick --docdir=%{_docdir}/%{name}-%{version}
%configure --with-graphicsmagick --with-npapi --docdir=%{_docdir}/%{name}-%{version}
# rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
@ -100,6 +109,9 @@ make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/
mv $RPM_BUILD_ROOT%{_libdir}/libzbarplugin.so $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/
rm $RPM_BUILD_ROOT%{_libdir}/libzbarplugin.so.*
#Remove .la and .a files
find ${RPM_BUILD_ROOT} -name '*.la' -or -name '*.a' | xargs rm -f
@ -175,8 +187,14 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/pkgconfig/zbar-qt.pc
%{_includedir}/zbar/QZBar*.h
%files plugin
%{_libdir}/mozilla/plugins/libzbarplugin.so
%changelog
* Fri Feb 22 2013 Mauro Carvalho Chehab <mchehab@redhat.com> - 0.10-16
- Enable firefox/mozilla plugin
* Fri Feb 22 2013 Mauro Carvalho Chehab <mchehab@redhat.com>
- Change zbar to use GraphicsMagick instead of ImageMagick
* Fri Feb 22 2013 Mauro Carvalho Chehab <mchehab@redhat.com> - 0.10-15

@ -0,0 +1,27 @@
diff -r cd6dc43fd063 configure.ac
--- a/configure.ac Fri Feb 22 13:36:53 2013 -0300
+++ b/configure.ac Fri Feb 22 20:41:40 2013 -0300
@@ -400,9 +400,9 @@
[with_npapi="no"])
AS_IF([test "x$with_npapi" != "xno"],
- [PKG_CHECK_MODULES([NPAPI], [firefox-plugin])
- NPAPI_VERSION=`$PKG_CONFIG firefox-plugin --modversion`
- AC_MSG_NOTICE([using firefox-plugin version $NPAPI_VERSION])])
+ [PKG_CHECK_MODULES([NPAPI], [mozilla-plugin])
+ NPAPI_VERSION=`$PKG_CONFIG mozilla-plugin --modversion`
+ AC_MSG_NOTICE([using mozilla-plugin version $NPAPI_VERSION])])
AM_CONDITIONAL([HAVE_NPAPI], [test "x$with_npapi" = "xyes"])
diff -r cd6dc43fd063 plugin/Makefile.am.inc
--- a/plugin/Makefile.am.inc Fri Feb 22 13:36:53 2013 -0300
+++ b/plugin/Makefile.am.inc Fri Feb 22 20:41:40 2013 -0300
@@ -1,5 +1,5 @@
lib_LTLIBRARIES += plugin/libzbarplugin.la
plugin_libzbarplugin_la_SOURCES = \
plugin/plugin.c
-plugin_libzbarplugin_la_CPPFLAGS = $(MOZILLA_CFLAGS) $(AM_CPPFLAGS)
-plugin_libzbarplugin_la_LDFLAGS = $(MOZILLA_LIBS) $(AM_LDFLAGS)
+plugin_libzbarplugin_la_CPPFLAGS = $(NPAPI_CFLAGS) $(AM_CPPFLAGS)
+plugin_libzbarplugin_la_LDFLAGS = $(NPAPI_LIBS) $(AM_LDFLAGS)
Loading…
Cancel
Save