Plug more leaks (in the test, not the core)
[gnash.git] / packaging / snapshot.am
blob81c5cbfef14442280542c970e4bb69097adea60b
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
18 NOW := $(shell date "+%Y%m%d")
20 # The branch nickname and revision number must be set before including
21 # the other Makefile fragments used for package building, as they use
22 # these values.
23 BRANCH_REVNO  = "`if test -f revno.h; then grep "REVNO" revno.h | cut -d '"' -f 2; fi`"
24 BRANCH_NICK   = "`if test -f revno.h; then grep "NICK" revno.h | cut -d '"' -f 2; fi`"
26 # this is used for Debian style naming conventions
27 NEXT_RELEASE = 0.8.9
28 #SNAPSHOT_VERSION := 0.8.8
29 SNAPSHOT_VERSION = $(NEXT_RELEASE)~git.$(BRANCH_NICK)$(BRANCH_REVNO)
31 # these is the directories where the snapshot gets built. Sources are
32 # in the top level, the build goes in a _build subdirectory
33 SNAPSHOT_DIR = gnash-$(SNAPSHOT_VERSION)
34 SNAPSHOT_BUILD = $(SNAPSHOT_DIR)/_build
35 SNAPSHOT_NAME = $(SNAPSHOT_DIR)
37 # this is the name of the actual tarball
38 SNAPSHOT_TAR = gnash-$(SNAPSHOT_VERSION).tar.gz
39 # this is the temporary directory used for DESTDIR
40 SNAPSHOT_TMP = /tmp/$(SNAPSHOT_DIR)
43 # build a binary snapshot from of Gnash for systems we don't have
44 # packaging support for.
47 # Do the entire process to build a binary tarball
48 snapshot: snapshot-src snapshot-configure snapshot-build snapshot-install snapshot-bundle
50 # start by creating the source tree using the distdir target,
51 # which builds a source tree only using what's in the DIST variables
52 # from Automake. This uses the default version for Gnash. which is
53 # 'master'. Then it gets renamed from the default version from 'master'
54 # to a branch-revno stamped version instead of master.
55 snapshot-src: revno.h distdir
57 snapshot-configure:
58         -@now=`date "+%Y%m%d"`; \
59         pkgname="gnash-$(BRANCH_NICK)-${BRANCH_REVNO}"; \
60         snapshot_dir=$(SNAPSHOT_DIR); \
61         snapshot_build="$(SNAPSHOT_BUILD)"; \
62         if test ! -d $(snapshot_build); then \
63           $(MKINSTALLDIRS) $${snapshot_build}; \
64         fi; \
65         if test -d /usr/local/mozilla-firefox/plugins; then \
66           plugindir=/usr/local/mozilla-firefox/plugins; \
67         else \
68           plugindir=/usr/lib/mozilla/plugins; \
69         fi; \
70         cd $${snapshot_build}; ../configure \
71         $(SNAPSHOT_CONFIGURE_FLAGS) \
72           --disable-dependency-tracking\
73           --disable-rpath \
74           --prefix=/usr \
75           --mandir=/usr/share/man \
76           --infodir=/usr/share/info \
77           --with-plugindir=$${plugindir} \
78           --disable-static \
79           --enable-shared
80 #         --with-extensions=all 
81 #         --enable-gui=all 
83 snapshot-build: force
84         $(MAKE) $(AM_MAKEFLAGS) -C $(SNAPSHOT_BUILD)
85         $(MAKE) $(AM_MAKEFLAGS) -C $(SNAPSHOT_BUILD)/doc/C info man html
87 # Install a package. Afterwards we link to the prebuilt man pages incase
88 # DocBook and DocBook2X aren't installed on this machine.
89 snapshot-install: force
90         $(MAKE) $(AM_MAKEFLAGS) -C $(SNAPSHOT_BUILD) install DESTDIR=$(SNAPSHOT_TMP)
92 # We only want to bundle an installed gnash, so all the linker paths are
93 # correct
94 snapshot-bundle: 
95         snapshot_tar="$(SNAPSHOT_TMP)-$(host_cpu)-$(host_os).tar.gz"; \
96         if test ! -d $${snapshot_tmp}; then \
97           $(mkinstalldirs) $${snapshot_tmp}; \
98         fi; \
99         rm -f $${snapshot_dest}/usr/lib/*.la; \
100         cp @srcdir@/COPYING $${snapshot_tmp}; \
101         cp @srcdir@/config.guess $${snapshot_tmp}; \
102         cp @srcdir@/packaging/install-gnash.sh $${snapshot_tmp}; \
103         cp -rp $${snapshot_dest}/usr/bin $${snapshot_tmp}; \
104         cp -rp $${snapshot_dest}/usr/lib $${snapshot_tmp}; \
105         cp -rp $${snapshot_dest}/usr/share $${snapshot_tmp}; \
106         cp -rp $${snapshot_dest}/usr/lib/mozilla/plugins $${snapshot_tmp}; \
107         cp -rp $${snapshot_dest}/usr/lib/kde3 $${snapshot_tmp}; \
108         strip $${snapshot_tmp}/bin/*-gnash; \
109         strip $${snapshot_tmp}/bin/gprocessor; \
110         strip $${snapshot_tmp}/bin/dumpshm; \
111         strip $${snapshot_tmp}/bin/flvdumper; \
112         strip $${snapshot_tmp}/bin/rtmpget; \
113         tar zcvCf /tmp $${snapshot_tar} $(SNAPSHOT_NAME)
115 snapshot-clean:
116         -@rm -fr snapshot-* $(SNAPSHOT_BUILD) $(SNAPSHOT_TMP) gnash*$(VERSION)*.ipk
118 .PHONY : snapshot snapshot-build snapshot-install snapshot-clean snapshot-src snapshot-configure