Update with current status
[gnash.git] / packaging / snapshot.am
blob460186da520ed71002200aa466dabfbad3ef91c0
1
2 # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010,
3 #               2011 Free Software Foundation, Inc.
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
19 NOW := $(shell date "+%Y%m%d")
21 # The branch nickname and revision number must be set before including
22 # the other Makefile fragments used for package building, as they use
23 # these values.
24 BRANCH_REVNO  = "`if test -f revno.h; then grep "REVNO" revno.h | cut -d '"' -f 2; fi`"
25 BRANCH_NICK   = "`if test -f revno.h; then grep "NICK" revno.h | cut -d '"' -f 2; fi`"
27 # this is used for Debian style naming conventions
28 NEXT_RELEASE = 0.8.11
29 #SNAPSHOT_VERSION := 0.8.11
30 SNAPSHOT_VERSION = $(NEXT_RELEASE)~git.$(BRANCH_NICK)$(BRANCH_REVNO)
32 # these is the directories where the snapshot gets built. Sources are
33 # in the top level, the build goes in a _build subdirectory
34 SNAPSHOT_DIR = gnash-$(SNAPSHOT_VERSION)
35 SNAPSHOT_BUILD = $(SNAPSHOT_DIR)/_build
36 SNAPSHOT_NAME = $(SNAPSHOT_DIR)
38 # this is the name of the actual tarball
39 SNAPSHOT_TAR = gnash-$(SNAPSHOT_VERSION).tar.gz
40 # this is the temporary directory used for DESTDIR
41 SNAPSHOT_TMP = /tmp/$(SNAPSHOT_DIR)
44 # build a binary snapshot from of Gnash for systems we don't have
45 # packaging support for.
48 # Do the entire process to build a binary tarball
49 snapshot: snapshot-src snapshot-configure snapshot-build snapshot-install snapshot-bundle
51 # start by creating the source tree using the distdir target,
52 # which builds a source tree only using what's in the DIST variables
53 # from Automake. This uses the default version for Gnash. which is
54 # 'master'. Then it gets renamed from the default version from 'master'
55 # to a branch-revno stamped version instead of master.
56 snapshot-src: revno.h distdir
58 snapshot-configure:
59         -@now=`date "+%Y%m%d"`; \
60         pkgname="gnash-$(BRANCH_NICK)-${BRANCH_REVNO}"; \
61         snapshot_dir=$(SNAPSHOT_DIR); \
62         snapshot_build="$(SNAPSHOT_BUILD)"; \
63         if test ! -d $(snapshot_build); then \
64           $(MKINSTALLDIRS) $${snapshot_build}; \
65         fi; \
66         if test -d /usr/local/mozilla-firefox/plugins; then \
67           plugindir=/usr/local/mozilla-firefox/plugins; \
68         else \
69           plugindir=/usr/lib/mozilla/plugins; \
70         fi; \
71         cd $${snapshot_build}; ../configure \
72         $(SNAPSHOT_CONFIGURE_FLAGS) \
73           --disable-dependency-tracking\
74           --disable-rpath \
75           --prefix=/usr \
76           --mandir=/usr/share/man \
77           --infodir=/usr/share/info \
78           --with-plugindir=$${plugindir} \
79           --disable-static \
80           --enable-shared
81 #         --with-extensions=all 
82 #         --enable-gui=all 
84 snapshot-build: force
85         $(MAKE) $(AM_MAKEFLAGS) -C $(SNAPSHOT_BUILD)
86         $(MAKE) $(AM_MAKEFLAGS) -C $(SNAPSHOT_BUILD)/doc/C info man html
88 # Install a package. Afterwards we link to the prebuilt man pages incase
89 # DocBook and DocBook2X aren't installed on this machine.
90 snapshot-install: force
91         $(MAKE) $(AM_MAKEFLAGS) -C $(SNAPSHOT_BUILD) install DESTDIR=$(SNAPSHOT_TMP)
93 # We only want to bundle an installed gnash, so all the linker paths are
94 # correct
95 snapshot-bundle: 
96         snapshot_tar="$(SNAPSHOT_TMP)-$(host_cpu)-$(host_os).tar.gz"; \
97         if test ! -d $${snapshot_tmp}; then \
98           $(mkinstalldirs) $${snapshot_tmp}; \
99         fi; \
100         rm -f $${snapshot_dest}/usr/lib/*.la; \
101         cp @srcdir@/COPYING $${snapshot_tmp}; \
102         cp @srcdir@/config.guess $${snapshot_tmp}; \
103         cp @srcdir@/packaging/install-gnash.sh $${snapshot_tmp}; \
104         cp -rp $${snapshot_dest}/usr/bin $${snapshot_tmp}; \
105         cp -rp $${snapshot_dest}/usr/lib $${snapshot_tmp}; \
106         cp -rp $${snapshot_dest}/usr/share $${snapshot_tmp}; \
107         cp -rp $${snapshot_dest}/usr/lib/mozilla/plugins $${snapshot_tmp}; \
108         cp -rp $${snapshot_dest}/usr/lib/kde3 $${snapshot_tmp}; \
109         strip $${snapshot_tmp}/bin/*-gnash; \
110         strip $${snapshot_tmp}/bin/gprocessor; \
111         strip $${snapshot_tmp}/bin/dumpshm; \
112         strip $${snapshot_tmp}/bin/flvdumper; \
113         strip $${snapshot_tmp}/bin/rtmpget; \
114         tar zcvCf /tmp $${snapshot_tar} $(SNAPSHOT_NAME)
116 snapshot-clean:
117         -@rm -fr snapshot-* $(SNAPSHOT_BUILD) $(SNAPSHOT_TMP) gnash*$(VERSION)*.ipk
119 .PHONY : snapshot snapshot-build snapshot-install snapshot-clean snapshot-src snapshot-configure