Installing the Mozilla-Tiff-Plugin under openSUSE 11.0
vinay — Thu, 12/04/2008 - 15:39
Again, Charles Fuller gives install instructions for openSUSE 11.0
Here are the instruction on how to install the Mozilla-Tiff-Plugin under openSUSE 11.0 version x86_64 and using the 64-bit version of Firefox (see below for other versions).
1. openSUSE required packages
* gtk2-devel (This is the openSUSE name for "libgtk2.0-dev")
* mozilla-xulrunner190-devel (This is the openSUSE name for "mozilla-dev")
* pkg-config
2. openSUSE version of the Makefile
Please also read the next section "Notes" to make sure that you set the correct values.
CC=gcc
LIB=`pkg-config --libs gtk+-2.0`
INCLUDE=`pkg-config --cflags gtk+-2.0`
PLUGIN_INCLUDE=-I/usr/include/xulrunner-1.9.0.3/stable -I/usr/include/nspr4 -I/usr/include/glib-2.0
#CFLAGS=-g
CFLAGS=-O
#Do not change the lines below
BIN=./mozilla-tiff-viewer
viewer: mozilla-tiff-viewer.c
$(CC) -o $(BIN) mozilla-tiff-viewer.c $(LIB) ${INCLUDE}
plugin: npunix.o mozilla-tiff-plugin.o
$(CC) -o mozilla-tiff-plugin.so -shared npunix.o mozilla-tiff-plugin.o
npunix.o: npunix.c
$(CC) -fPIC -c npunix.c ${PLUGIN_INCLUDE}
mozilla-tiff-plugin.o: mozilla-tiff-plugin.c
$(CC) -fPIC -c mozilla-tiff-plugin.c ${PLUGIN_INCLUDE}
install: mozilla-tiff-viewer mozilla-tiff-plugin.so
cp $(BIN) /usr/bin/
if [ ! -d /usr/lib64/mozilla-tiff-plugin ]; then mkdir /usr/lib64/mozilla-tiff-plugin ; fi
cp mozilla-tiff-plugin.so /usr/lib64/mozilla-tiff-plugin
if [ -h /usr/lib64/browser-plugins/mozilla-tiff-plugin.so ]; then
rm usr/lib64/browser-plugins/mozilla-tiff-plugin.so;
fi
if [ -h /usr/lib64/mozilla-firefox/plugins/mozilla-tiff-plugin.so ]; then
rm /usr/lib64/mozilla-firefox/plugins/mozilla-tiff-plugin.so;
fi
if [ -h /usr/lib64/firefox/plugins/mozilla-tiff-plugin.so ]; then
rm /usr/lib64/firefox/plugins/mozilla-tiff-plugin.so;
fi
cd /usr/lib64/browser-plugins
ln -s /usr/lib64/mozilla-tiff-plugin/mozilla-tiff-plugin.so
if [ -d /usr/lib64/mozilla-firefox/plugins ]; then
cd /usr/lib64/mozilla-firefox/plugins
ln -s ../../mozilla-tiff-plugin/mozilla-tiff-plugin.so;
fi
if [ -d /usr/lib64/firefox/plugins ]; then
cd /usr/lib64/firefox/plugins
ln -s ../../mozilla-tiff-plugin/mozilla-tiff-plugin.so;
fi
clean:
if [ -f $(BIN) ]; then rm $(BIN); fi
if [ -f npunix.o ]; then rm npunix.o; fi
if [ -f mozilla-tiff-plugin.o ]; then rm mozilla-tiff-plugin.o ; fi
if [ -f mozilla-tiff-plugin.so ]; then rm mozilla-tiff-plugin.so; fi
3. Notes
1. You must adjust the Makefile depending on the exact version of XULRunner which is installed when you run the Makefile. The line to check/adjust is the fourth one which begins with "PLUGIN_INCLUDE" - look for the name of the directory "xulrunner-1.9xxx" within the directory "/usr/include".
2. The Makefile above works fine on openSUSE 11.0 64-bit running the 64-bit version of Firefox. If you use the 32-bit version of openSUSE, or the 32-bit version of Firefox on the 64-bit version of openSUSE, then it should work if you replace all occurrences of "lib64" with "lib".
4. Installation Instructions
- Extract all of the files in the "tar.gz" archive.
- Change the "Makefile" to the version shown above.
- Open a command prompt and navigate to the directory where the unpacked set of files exists.
- Type in "Make clean" and press enter.
- Type in "Make" and press enter.You will probably receive two warnings which can be ignored.
- Type in "Make plugin" and press enter.
- Type in "su -c checkinstall", and enter the password for "root".
(This creates an RPM package so that the software shows up in YAST.) - Make sure that the directory written to by step 7 is defined as a "Software Repository". On a 64-bit system this should be "/usr/src/packages/RPMS/x86_64/".
- Install the package using YaST. Set the "Filter" to "Repositories" and choose the repository set up in step 8.
Thanks and regards,
Charles Fuller.