Ignore gnash-* (packages) plus couple more missing files
[gnash.git] / packaging / xpi.am
blob72c3d42826edc595f6e15a1ac6526e2fea6691ba
1
2 #   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
16
19 # Build a Firefox XPI package
22 # building an xpi is similar to building a binary snapshot, the main difference
23 # being how it gets configured, and how the bundle of the package gets made.
24 # for an xpi package, we have to configure with --enable-xpcom, which the plugin
25 # uses to find the directory where Gnash lives.
27 CONFIG_OPTS = \
28         -disable-dependency-tracking \
29         --disable-rpath \
30         --disable-cygnal \
31         --disable-testsuite \
32         --enable-xpcom \
33         --enable-media=ffmpeg \
34         --enable-gui=gtk \
35         --prefix=/usr \
36         --mandir=/usr/share/man \
37         --infodir=/usr/share/info \
38         --with-npapi-plugindir=/usr/lib/mozilla/plugins
40 # Do the entire process to build an xpi package
41 xpi: snapshot-src xpi-configure xpi-build xpi-install xpi-bundle
43 # just use the default snapshot build process
44 xpi-build: snapshot-build
45 # just use the default snapshot installation process
46 xpi-install: snapshot-install
48 # configure the xpi build. snapshot needs to have been run already. If you wish the
49 # automatic dependency checking, use the 'xpi' target instead, as this is meant only
50 # to be called directly when debugging package building. We statically link the
51 # executable so the executables don't have to find any of the gnash libraries at
52 # runtime. This way you can have multiple versions of Gnash installed, and they all
53 # use the appropriate libraries for each build.
54 xpi-configure: force
55         snapshot_build="$(SNAPSHOT_BUILD)"; \
56         if test ! -d $${snapshot_build}; then \
57           $(MKINSTALLDIRS) $${snapshot_build}; \
58         fi; \
59         (cd $${snapshot_build}; ../configure \
60           --enable-static \
61           --disable-shared \
62           $(CONFIG_OPTS));
63         -cp revno.h $(SNAPSHOT_BUILD)
65 # build the xpi package bundle. snapshot-build and snapshot-install need to
66 # have been run already. If you wish the automatic dependency checking, use
67 # the 'xpi' target instead, as this is meant only to be called directly when
68 # debugging package building.
69 # This gets a little messy as we build the executable statically linked so we
70 # don't have to do something uglier to find dynamically linked libraries, plus
71 # this way the xpi installed libs won't conflict with andy package installed libs.
72 # Anyway, so after installing the statically linked gnash into the bundle, we then
73 # have to reconfigure to enable shared libraries to be built, and then rebuild
74 # the plugins and the xpcom support as dynamically loadable modules.
75 xpi-bundle:  force
76         snapshot_dest="/tmp/$(SNAPSHOT_NAME)"; \
77         snapshot_dir="/tmp/$(SNAPSHOT_DIR)"; \
78         snapshot_xpi="/tmp/$(SNAPSHOT_NAME)-tmp"; \
79         mkdir -p $${snapshot_xpi}/plugins; \
80         for i in install.rdf; do \
81           cp -fr $(srcdir)/packaging/xpi/$$i $${snapshot_xpi}; \
82         done; \
83         strip  $${snapshot_dest}/usr/bin/gtk-gnash; \
84         cd $(SNAPSHOT_BUILD); ../configure --disable-static --enable-shared $(CONFIG_OPTS); \
85         $(MAKE) $(AM_MAKEFLAGS) -C plugin clean all install-plugin DESTDIR=$${snapshot_dest}; \
86         $(MAKE) $(AM_MAKEFLAGS) -C plugin/xpcom all install-pkglib DESTDIR=$${snapshot_dest}; \
87         cp -fr $${snapshot_dest}/usr/lib/mozilla/plugins/libgnashplugin.so $${snapshot_xpi}/plugins; \
88         cp -fr $${snapshot_dest}/usr/lib/mozilla/plugins/extensions/*.xpt $${snapshot_xpi}/plugins; \
89         cp -fr $${snapshot_dest}/usr/lib/mozilla/plugins/extensions/*.so $${snapshot_xpi}/plugins; \
90         cp -fr $${snapshot_dest}/usr/bin/gtk-gnash $${snapshot_xpi}; \
91         (cd $${snapshot_xpi}; $(ZIP) -r $${snapshot_dir}.xpi *);
93 # remove files left from package building
94 xpi-clean:  force
95         rm -fr xpi-* gnash-$(RELEASE)*.xpi
97 .PHONY : xpi xpi-bundle xpi-configure xpi-install xpi-build snapshot-src
99 force: