gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r10789: refactor package building co


From: rob
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10789: refactor package building code to share more code, use more variables and less cut and paste, and other general improvments. Builds xpis, debs, rpms, and snapshots.
Date: Tue, 14 Apr 2009 22:39:10 -0600
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 10789
committer: address@hidden
branch nick: trunk
timestamp: Tue 2009-04-14 22:39:10 -0600
message:
  refactor package building code to share more code, use more variables and 
less cut and paste, and other general improvments. Builds xpis, debs, rpms, and 
snapshots.
added:
  packaging/README
modified:
  Makefile.am
  configure.ac
  gui/gnash.cpp
  packaging/deb.am
  packaging/redhat/gnash.spec
  packaging/rpm.am
  packaging/snapshot.am
  packaging/xpi.am
    ------------------------------------------------------------
    revno: 10788.1.1
    committer: address@hidden
    branch nick: xpi
    timestamp: Tue 2009-04-14 10:25:27 -0600
    message:
      explain the process of building packages and the associated Makefile 
targets.
    added:
      packaging/README
    ------------------------------------------------------------
    revno: 10788.1.2
    committer: address@hidden
    branch nick: xpi
    timestamp: Tue 2009-04-14 12:24:56 -0600
    message:
      don't print the warnings about missing testing dependencies with 
--disable-testsuite.
    modified:
      configure.ac
    ------------------------------------------------------------
    revno: 10788.1.3
    committer: address@hidden
    branch nick: xpi
    timestamp: Tue 2009-04-14 12:43:12 -0600
    message:
      clean up hopw bzrversion.h gets generated.
    modified:
      Makefile.am
    ------------------------------------------------------------
    revno: 10788.1.4
    committer: address@hidden
    branch nick: xpi
    timestamp: Tue 2009-04-14 12:44:05 -0600
    message:
      improve how packages get built.
    modified:
      packaging/rpm.am
      packaging/snapshot.am
      packaging/xpi.am
    ------------------------------------------------------------
    revno: 10788.1.5
    committer: address@hidden
    branch nick: xpi
    timestamp: Tue 2009-04-14 12:44:33 -0600
    message:
      add the revno and branch name to --version.
    modified:
      gui/gnash.cpp
    ------------------------------------------------------------
    revno: 10788.1.6
    committer: address@hidden
    branch nick: xpi
    timestamp: Tue 2009-04-14 12:45:05 -0600
    message:
      drop rtmpget for now.
    modified:
      packaging/redhat/gnash.spec
    ------------------------------------------------------------
    revno: 10788.1.7
    committer: address@hidden
    branch nick: xpi
    timestamp: Tue 2009-04-14 13:15:30 -0600
    message:
      fix debian package building to use the new way.
    removed:
      packaging/redhat/klash.spec
    modified:
      packaging/README
      packaging/deb.am
      packaging/rpm.am
      packaging/snapshot.am
    ------------------------------------------------------------
    revno: 10788.1.8
    committer: address@hidden
    branch nick: xpi
    timestamp: Tue 2009-04-14 22:36:35 -0600
    message:
      tweak for Mandriva rpm packages, which name some of the BuildRequires 
differently.
    modified:
      packaging/redhat/gnash.spec
=== modified file 'Makefile.am'
--- a/Makefile.am       2009-02-28 04:34:39 +0000
+++ b/Makefile.am       2009-04-14 18:43:12 +0000
@@ -41,6 +41,7 @@
        --disable-testsuite
 #--enable-cygnal
 
+
 STD_DIRS = \
        libbase \
        libamf \
@@ -79,7 +80,8 @@
 
 DIST_SUBDIRS = $(LIBLTDLDIR) $(STD_DIRS) cygnal extensions testsuite
 
-EXTRA_DIST =  autogen.sh \
+EXTRA_DIST =  \
+       autogen.sh \
        config.rpath \
        macros/incllist macros/libslist \
        ChangeLog-0.8.0 ChangeLog-0.8.1 ChangeLog-0.8.2 ChangeLog-0.8.3 \
@@ -91,7 +93,9 @@
        packaging/bsd.am \
        packaging/rpm.am \
        packaging/gnash.xpm \
-       packaging/klash.xpm
+       packaging/klash.xpm \
+       bzrversion.h
+
 
 # dist-hook:
 #      @test -d "$(distdir)/packaging" || $(mkinstalldirs) 
"$(distdir)/packaging"
@@ -127,6 +131,41 @@
 include $(srcdir)/packaging/xpi.am
 
 #
+# Extract info from the repository to include in the build. If
+# bazar (bzr) isn't installed, just print stubs, as this is only
+# used for display purposes. It's primarily used by the testsuites
+# and when building binary packages from multiple branches.
+# Note that this is only rebuilt after "make clean", if the Makefile
+# has changed, or the source tree gets reconfigured. So unless you do
+# a make clean, or nuke the bzrversion.h file, this can get slightly
+# behind the current version. Currently Gnash doesn't have this info
+# so it'll be an improvement anyway. Bzr is amazing slow producing
+# the info, which is why we don't want to do it all the time.
+#
+CLEANFILES += bzrversion.h
+BUILT_SOURCES = bzrversion.h
+bzrversion.h: Makefile.in
+       @status=`cd $(srcdir) && bzr version-info --custom --template={revno}`; 
\
+       if test $${status} -gt 0; then \
+          echo "Generating bzrversion.h"; \
+          $(RM) -f bzrversion.h; \
+          (cd $(srcdir) && bzr version-info --custom --template='static const 
char *BRANCH_REVNO  = "{revno}";\nstatic const char *BRANCH_NICK = 
"{branch_nick}";\n') > bzrversion.h; \
+       else \
+         if test -e bzrversion.h; then \
+           echo "Using existing bzrversion.h"; \
+       else \
+           echo "Generating bzrversion.h"; \
+           echo "static const char *BRANCH_REVNO  = "none";\nstatic const char 
*BRANCH_NICK = "none";\n" > bzrversion.h; \
+         fi; \
+       fi
+
+BRANCH_REVNO  = `grep "REVNO" bzrversion.h | cut -d '"' -f 2`
+BRANCH_NICK   = `grep "NICK" bzrversion.h | cut -d '"' -f 2`
+
+test:
+       echo $(SNAPSHOT_NAME)
+
+#
 # Binary tarball packaging
 #
 include $(srcdir)/packaging/snapshot.am

=== modified file 'configure.ac'
--- a/configure.ac      2009-03-27 16:17:01 +0000
+++ b/configure.ac      2009-04-14 18:24:56 +0000
@@ -1969,19 +1969,6 @@
 
 
 GNASH_PATH_PTHREADS
-if test x"$pthreads" = x"yes"; then
-  if test x"$PTHREAD_CFLAGS" != x; then
-    CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
-  fi
-  if test "$CC" != "$PTHREAD_CC"; then
-    AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support 
pthreads.])
-    CC="$PTHREAD_CC"
-  fi
-  if test "$CXX" != "$PTHREAD_CXX"; then
-    AC_MSG_WARN([Replacing compiler $CXX with compiler $PTHREAD_CXX to support 
pthreads.])
-    CXX="$PTHREAD_CXX"
-  fi
-fi
 
 GNASH_PATH_BOOST
 dnl AX_GCC_ARCHFLAG(no)
@@ -2821,7 +2808,9 @@
   if test x"$PTHREAD_LIBS" != x; then
     echo "        POSIX Threads lib is: $PTHREAD_LIBS"
   else
-    echo "ERROR: No pthread development package installed!" >&3
+    if test x$cross_compiling = xno; then
+      echo "ERROR: No pthread development package installed!" >&3
+    fi
   fi
 fi
 
@@ -2966,90 +2955,93 @@
 fi
 
 dnl don't look for the flash compilers when cross compiling.
-if test x$cross_compiling = xno; then
-  if test x"$MING_LIBS" != x; then
-    echo "        MING flags are $MING_CFLAGS"
-    echo "        MING libs are $MING_LIBS"
-  else
-    echo "        WARNING: You need to have the Ming development package" >&4
-    echo "                 installed to run most of the tests in Gnash 
testsuite." >&4
-    echo "                 Install it from http://www.libming.org/"; >&4
-    echo "                 or .deb users: apt-get install libming-dev" >&4
-  fi
-
-  if test x"$MAKESWF" != x; then
-    echo "        MING version code is $MING_VERSION_CODE"
-    echo "        MAKESWF is $MAKESWF"
-  else
-    echo "        WARNING: You need to have the Ming utilities package" >&4
-    echo "                 installed to run most of the tests in Gnash 
testsuite." >&4
-    echo "                 Install it from http://www.libming.org"; >&4
-    echo "                 or .deb users: apt-get install libming-util" >&4
-  fi
-
-  if test x"$MAKESWF" != x && test $MING_VERSION_CODE -lt 00040006; then
-    echo "        WARNING: You have an older version of Ming installed and 
will not" >&4
-    echo "                 be able to run all of the tests in Gnash 
testsuite." >&4
-    echo "                 Install the latest version from 
http://www.libming.org"; >&4
-  fi
-
-  if test x"$SWFDEC_TESTSUITE" != x; then
-    echo "        SWFDEC testsuite dir is $SWFDEC_TESTSUITE"
-  fi
-
-  if test x"$MTASC" != x; then
-    echo "        MTASC is $MTASC"
-    echo "        MTASC CLASSPATH is $MTASC_CLASSPATH"
-  else
-    echo "        WARNING: You need to have the MTASC compiler packages 
installed" >&4
-    echo "                 to run some of the tests in Gnash testsuite." >&4
-    echo "                 You can install it from http://mtasc.org"; >&4
-    echo "                 or .deb users: apt-get install mtasc" >&4
-  fi
-
-  if test x"$HAXE" != x; then
-    echo "        HAXE is $HAXE"
-    echo "        HAXE CLASSPATH is $HAXE_CLASSPATH"
-  else
-    echo "        WARNING: You need to have the HAXE compiler packages 
installed" >&4
-    echo "                 to run some of the tests in Gnash testsuite." >&4
-    echo "                 You can install it from http://haxe.org"; >&4
-    echo "                 or .deb users: apt-get install haxe" >&4
-  fi
-
-  if test x"$SWFMILL" != x; then
-    echo "        SWFMILL is $SWFMILL"
-  else
-    echo "        WARNING: You need to have the 'swfmill' tool installed" >&4
-    echo "                 to run some of the tests in Gnash testsuite." >&4
-    echo "                 You can install it from http://swfmill.org/"; >&4
-    echo "                 or .deb users: apt-get install swfmill" >&4
-  fi
-
-  if test x"$SWFC" != x; then
-    echo "        SWFC is $SWFC"
-  else
-    echo "        WARNING: You need to have 'swfc' from SWFTools installed" >&4
-    echo "                 to run some of the tests in Gnash testsuite." >&4
-    echo "                 You can install it from http://www.swftools.org/"; 
>&4
-    echo "                 or .deb users: apt-get install swftools" >&4
-  fi
-
-  if test x"$AS3COMPILE" != x; then
+if test x"$testsuite" = x"yes"; then
+  if test x$cross_compiling = xno; then
+    if test x"$MING_LIBS" != x; then
+      echo "        MING flags are $MING_CFLAGS"
+      echo "        MING libs are $MING_LIBS"
+    else
+      echo "        WARNING: You need to have the Ming development package" >&4
+      echo "                 installed to run most of the tests in Gnash 
testsuite." >&4
+      echo "                 Install it from http://www.libming.org/"; >&4
+      echo "                 or .deb users: apt-get install libming-dev" >&4
+    fi
+
+    if test x"$MAKESWF" != x; then
+      echo "        MING version code is $MING_VERSION_CODE"
+      echo "        MAKESWF is $MAKESWF"
+    else
+      echo "        WARNING: You need to have the Ming utilities package" >&4
+      echo "                 installed to run most of the tests in Gnash 
testsuite." >&4
+      echo "                 Install it from http://www.libming.org"; >&4
+      echo "                 or .deb users: apt-get install libming-util" >&4
+    fi
+
+    if test x"$MAKESWF" != x && test $MING_VERSION_CODE -lt 00040006; then
+      echo "        WARNING: You have an older version of Ming installed and 
will not" >&4
+      echo "                 be able to run all of the tests in Gnash 
testsuite." >&4
+      echo "                 Install the latest version from 
http://www.libming.org"; >&4
+    fi
+
+    if test x"$SWFDEC_TESTSUITE" != x; then
+      echo "        SWFDEC testsuite dir is $SWFDEC_TESTSUITE"
+    fi
+
+    if test x"$MTASC" != x; then
+      echo "        MTASC is $MTASC"
+      echo "        MTASC CLASSPATH is $MTASC_CLASSPATH"
+    else
+      echo "        WARNING: You need to have the MTASC compiler packages 
installed" >&4
+      echo "                 to run some of the tests in Gnash testsuite." >&4
+      echo "                 You can install it from http://mtasc.org"; >&4
+      echo "                 or .deb users: apt-get install mtasc" >&4
+    fi
+
+    if test x"$HAXE" != x; then
+      echo "        HAXE is $HAXE"
+      echo "        HAXE CLASSPATH is $HAXE_CLASSPATH"
+    else
+      echo "        WARNING: You need to have the HAXE compiler packages 
installed" >&4
+      echo "                 to run some of the tests in Gnash testsuite." >&4
+      echo "                 You can install it from http://haxe.org"; >&4
+      echo "                 or .deb users: apt-get install haxe" >&4
+    fi
+
+    if test x"$SWFMILL" != x; then
+      echo "        SWFMILL is $SWFMILL"
+    else
+      echo "        WARNING: You need to have the 'swfmill' tool installed" >&4
+      echo "                 to run some of the tests in Gnash testsuite." >&4
+      echo "                 You can install it from http://swfmill.org/"; >&4
+      echo "                 or .deb users: apt-get install swfmill" >&4
+    fi
+
+    if test x"$SWFC" != x; then
+      echo "        SWFC is $SWFC"
+    else
+      echo "        WARNING: You need to have 'swfc' from SWFTools installed" 
>&4
+      echo "                 to run some of the tests in Gnash testsuite." >&4
+      echo "                 You can install it from http://www.swftools.org/"; 
>&4
+      echo "                 or .deb users: apt-get install swftools" >&4
+    fi
+
+    if test x"$AS3COMPILE" != x; then
       echo "        AS3COMPILE is $AS3COMPILE"
-  else
-    echo "        WARNING: you need as3compile from SWFTools" >&4
-    echo "                 to run some of the tests in Gnash testsuite." >&4
-    echo "                 You can install it from http://www.swftools.org/"; 
>&4
-  fi
-
-  if test x"$HTTP_TESTSUITE" != x; then
-    echo "        HTTP testsuite dir is $HTTP_TESTSUITE"
-  fi
-
-  if test x"$RED5_HOST" != x; then
-    echo "        RED5 testing host is $RED5_HOST"
-  fi
+    else
+      echo "        WARNING: you need as3compile from SWFTools" >&4
+      echo "                 to run some of the tests in Gnash testsuite." >&4
+      echo "                 You can install it from http://www.swftools.org/"; 
>&4
+    fi
+
+    if test x"$HTTP_TESTSUITE" != x; then
+      echo "        HTTP testsuite dir is $HTTP_TESTSUITE"
+    fi
+
+    if test x"$RED5_HOST" != x; then
+      echo "        RED5 testing host is $RED5_HOST"
+    fi
+  fi
+fi
 
   if test x"$PYTHON" != x; then
     echo "        PYTHON is $PYTHON"
@@ -3065,6 +3057,7 @@
     echo "                 to run some of the tests in Gnash testsuite." >&4
   fi
 
+if test x"$testsuite" = x"yes"; then
   if test x"$CSOUND" != x; then
     echo "        CSOUND is $CSOUND"
   else
@@ -3074,7 +3067,6 @@
     echo "                 or .deb users: apt-get install csound" >&4
     echo "                 or .rpm users: yum install csound" >&4
   fi
-
 fi
 
 if test x"$Z_LIBS" != x; then

=== modified file 'gui/gnash.cpp'
--- a/gui/gnash.cpp     2009-04-01 12:26:49 +0000
+++ b/gui/gnash.cpp     2009-04-14 18:44:33 +0000
@@ -27,6 +27,7 @@
 #include "debugger.h"
 #include "arg_parser.h"
 #include "GnashNumeric.h" // for clamp
+#include "bzrversion.h"
 
 #ifdef HAVE_FFMPEG_AVCODEC_H
 extern "C" {
@@ -172,7 +173,8 @@
         << _(" - Media handler: ") << MEDIA_CONFIG << endl
         
         << _("   Configured with: ") << CONFIG_CONFIG << endl
-        << _("   CXXFLAGS: ") << CXXFLAGS << endl;
+        << _("   CXXFLAGS: ") << CXXFLAGS << endl
+        << "   Version: "  << BRANCH_NICK << ":" << BRANCH_REVNO << endl;
 
 #ifdef USE_FFMPEG
     cout << _("Built against ffmpeg version: ") << LIBAVCODEC_IDENT << endl;

=== added file 'packaging/README'
--- a/packaging/README  1970-01-01 00:00:00 +0000
+++ b/packaging/README  2009-04-14 19:15:30 +0000
@@ -0,0 +1,59 @@
+Packaging is relatively complex, especially when supporting multiple
+packaging systems. Each platform works the same, only the names are
+changed. Each packaging system has a single top level Makefile target
+that does the entire process, which can be time consuming. Each of the
+other targets break the entire process into stages which make it much
+easier to debug, or redo only one stage of the entire process.
+
+For these targets to work correct, your build must be able to survive
+"make distcheck".
+
+xpi      - Build a binary XPI package for Mozilla/Firefox
+snapshot - Build a binary tarball package for any distribution
+deb      - Build a binary Debian/Ubuntu package
+rpm      - Build a binary Redhat/Mandriva package
+ipkg     - Build a binary IKG package
+alp     - Build a binary package for the Access Linux Platform
+
+snapshot-src: is the primary target used to build the source directory
+             with the correct name. This target uses the internal
+             Automake target "distdir" to make the distribution
+             directory. This always names the sub directory created
+             to hold the distribution files "gnash-trunk". Snapshot-src
+             then renames the sub directory to be gnash-revno, and
+             modifies the configure.ac file in the subdirectory to
+             have the correct version number. All packaging targets
+             start by calling snapshot-src.
+
+
+-configure:  this target configures the package with the appropriate flags
+            in a _build subdirectory in the snapshot distribution sub
+            directory created by snapshot-src. Each package format
+            often requires a different set of configure options,
+            although some options are common, like setting --prefix=/usr.
+
+-build:             this target builds the package in the _build sub
+            directory.
+
+-install:    this target installs the fresh build and sets DESTDIR so
+            all the files get installed in temporary directory as we
+            don't want to stomp on any preinstalled Gnash on our
+            build machine.
+
+-bundle:     this target uses the files from the temporary
+            installation directory to make the actual package in the
+            correct format. This often involves copying files from
+            the source packaging directories, and other tweaks to
+            create the package correctly.
+
+RPM
+       All RPMs are built using rpmbuild. Although rpmbuild is
+       primarily used to build packages in one pass via "-ba", it is
+       possible to run the different phases seperately, which makes
+       debugging easier.
+
+       The version in the gnash.spec is editied to be consistant.
+
+DEB
+       All DEBs are built using dpkg-buildpackage. The version in the
+       changelog is editied to be consistant.

=== modified file 'packaging/deb.am'
--- a/packaging/deb.am  2009-02-25 22:33:03 +0000
+++ b/packaging/deb.am  2009-04-14 19:15:30 +0000
@@ -16,32 +16,21 @@
 # 
 
 # Build a Debian/Ubuntu .deb GNU/Linux package
-deb debian: dist $(srcdir)/packaging/debian/rules
-       now=`date "+%Y%m%d"`; \
-       snapshot_dir="gnash-$(RELEASE)$${now}"; \
-       rm -rf gnash-${VERSION}; \
-       tar jxf gnash-${VERSION}.tar.gz; \
-       cp -fr $(srcdir)/packaging/debian gnash-$(RELEASE}${VERSION}/; \
-       (cd gnash-$(RELEASE)${VERSION}; dpkg-buildpackage)
+
+deb: snapshot-src snapshot-deb
 
 # Build a .deb snapshot, which means we have to munge the date
 # into the proper files to build a package with the version in
 # all the right places. This involves editing the debian/changelog
 # file. Configure.ac is edited by the snapshot target.
-snapshot-deb: distdir snapshot
-       -now=`date "+%Y%m%d"`; \
-       pkgname="gnash-${RELEASE}$${now}"; \
-       snapshot_dir="gnash-${RELEASE}$${now}"; \
-       snapshot_tar="$${pkgname}.tar.gz"; \
-       if test -d "gnash-trunk"; then \
-         mv -f gnash-trunk $${snapshot_dir}; \
-       fi; \
+snapshot-deb: 
+       snapshot_dir=$(SNAPSHOT_DIR); \
        mkdir -p $${snapshot_dir}/debian; \
        cp -rfp $(srcdir)/packaging/debian/* $${snapshot_dir}/debian/; \
        if test -e $${snapshot_dir}/debian/changelog; then \
          mv -f $${snapshot_dir}/debian/changelog 
$${snapshot_dir}/debian/changelog.orig; \
-         sed -e "s:trunk:trunk$${now}:" $${snapshot_dir}/debian/changelog.orig 
> $${snapshot_dir}/debian/changelog; \
+         sed -e "s:trunk:$(BRANCH_REVNO)$(BRANCH_NICK):" 
$${snapshot_dir}/debian/changelog.orig > $${snapshot_dir}/debian/changelog; \
        fi; \
-       (cd $${snapshot_dir}; dpkg-buildpackage -rfakeroot -j6)
+       (cd $${snapshot_dir}; dpkg-buildpackage -rfakeroot)
 
 .PHONY : deb debian snapshot-deb

=== modified file 'packaging/redhat/gnash.spec'
--- a/packaging/redhat/gnash.spec       2009-02-17 03:18:15 +0000
+++ b/packaging/redhat/gnash.spec       2009-04-15 04:36:35 +0000
@@ -14,18 +14,31 @@
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-%{_target_cpu}
 
 BuildRequires:  libpng-devel libjpeg-devel libogg-devel
-BuildRequires:  gtk2-devel libX11-devel libXt-devel glib2-devel
+BuildRequires:  gtk2-devel glib2-devel
 BuildRequires:  atk-devel pango-devel
 BuildRequires:  agg-devel boost-devel curl-devel libXt-devel
-BuildRequires:  xorg-x11-proto-devel SDL-devel
+BuildRequires:  SDL-devel
+# YellowDog doesn't ship ffmpeg
 %if %{distribution} != "ydl6"
 BuildRequires:  ffmpeg-devel
 %endif
+# Mandriva uses differ names for the X11 library packages
+%if %{distribution} != "mnb"
+BuildRequires:  libx11_6-devel libxt_6-devel
+%else
+BuildRequires:  libX11-devel libXt-devel xorg-x11-proto-devel 
+%endif
 
 # Installation requirements
-Requires: libpng libjpeg libogg
-Requires: gtk2 libX11 libXt glib2 atk pango
-Requires: agg boost libcurl libXt SDL
+Requires: libpng libjpeg libogg gtk2 glib2 atk pango
+# Mandriva uses differ names for the X11 library packages
+%if %{distribution} != "mnb"
+Requires: libX11 libXt 
+%else
+Requires: libx11_6 libxt_6
+%endif
+Requires: agg boost libcurl SDL
+# YellowDog doesn't ship ffmpeg
 %if %{distribution} != "ydl6"
 Requires: ffmpeg
 %endif
@@ -139,7 +152,7 @@
        $SOUND $GUI \
        $RENDERER \
        --disable-dependency-tracking \
-       --disable-testsuites \
+       --disable-testsuite \
        --disable-rpath \
        --with-plugindir=%{_libdir}/mozilla/plugins
 
@@ -167,7 +180,7 @@
 
 %install
 strip gui/.libs/*-gnash
-strip utilities/.libs/dumpshm  utilities/.libs/g*  utilities/.libs/soldumper 
utilities/.libs/flvdumper  utilities/.libs/rtmpget cygnal/.libs/cygnal
+strip utilities/.libs/dumpshm  utilities/.libs/g*  utilities/.libs/soldumper 
utilities/.libs/flvdumper cygnal/.libs/cygnal
 rm -rf $RPM_BUILD_ROOT
 make install install-plugins DESTDIR=$RPM_BUILD_ROOT
 rm $RPM_BUILD_ROOT%{_libdir}/gnash/*.*a
@@ -208,7 +221,6 @@
 %{_bindir}/soldumper
 %{_bindir}/flvdumper
 %{_bindir}/dumpshm
-%{_bindir}/rtmpget
 %{_bindir}/cygnal
 %{_libdir}/gnash/*.so*
 %{_libdir}/mozilla/plugins/*.so

=== modified file 'packaging/rpm.am'
--- a/packaging/rpm.am  2009-02-25 22:33:03 +0000
+++ b/packaging/rpm.am  2009-04-14 19:15:30 +0000
@@ -22,37 +22,48 @@
 #      rpmbuild -rcfile=$(srcdir)/packaging/redhat/rpmrc:/usr/lib/rpm/rpmrc \
 #               -ba --target=geode-olpc /usr/src/redhat/SPECS/gnash.spec
 
-RPMBUILD_FLAGS = --clean --rmsource --rmspec
+RPMBUILD_FLAGS = # --clean --rmsource --rmspec
 
-spec: $(srcdir)/packaging/redhat/gnash.spec 
$(srcdir)/packaging/redhat/klash.spec
+gnash.spec spec: $(srcdir)/packaging/redhat/gnash.spec
        @echo "Editing the version in the spec file ..."
-       address@hidden "+%Y%m%d"`; \
-       pkgname="gnash-trunk_$${now}"; \
-       snapshot_tar="$${pkgname}.tar.gz"; \
-       sed -e "s/Version.*/Version:    $(RELEASE)$${now}/" 
$(srcdir)/packaging/redhat/gnash.spec > gnash.spec; \
-       sed -e "s/Version.*/Version:    $(RELEASE)$${now}/" 
$(srcdir)/packaging/redhat/klash.spec > klash.spec;
+       sed -e "s/Version.*/Version:    $(BRANCH_REVNO)_$(BRANCH_NICK)/" 
$(srcdir)/packaging/redhat/gnash.spec > gnash.spec;
 
 # Build an Redhat/Fedora .rpm package
 # We do this by using the source snapshot that we know is 'distclean'.
 # After copying the source tarball to where rpmbuild expects it,
 # we can then build the binary package.
 # older versions of Fedora used /usr/src/redhat/{SOURCES, BUILD} for
-# everything, but the newer version appears to use one's hone directory
+# everything, but the newer version appears to use one's home directory
 # instead, so now you don't have to be root to build rpm packages.
-rpm redhat rpm-gnash: snapshot spec
-       address@hidden "+%Y%m%d"`; \
-       pkgname="gnash-trunk_$${now}"; \
-       snapshot_tar="$${pkgname}.tar.gz"; \
-       cp $${snapshot_tar} $${HOME}/rpmbuild/SOURCES/
+
+# Do the entire process to build an RPM package
+rpm: spec snapshot-src rpm-setup rpm-gnash
+
+# build everything in one pass using rpmbuild
+rpm-gnash: 
        rpmbuild -ba $(RPMBUILD_FLAGS) gnash.spec
 
+# configure the build directory, which we do by executing only the %prep stage,
+# which doesn't actually run configure
+rpm-configure: 
+       rpmbuild -bp $(RPMBUILD_FLAGS) gnash.spec
+
+# compile the build, which we do by executing only the %build stage, which
+# runs configure as the first step.
+rpm-build:
+       rpmbuild -bc --short-circuit $(RPMBUILD_FLAGS) gnash.spec
+
+# install the build, which we do by executing only the %install stage, which
+# also builds the actual rpms
+rpm-install: 
+       rpmbuild -bi --short-circuit $(RPMBUILD_FLAGS) gnash.spec
+
+rpm-setup: 
+       cp $(SNAPSHOT_TAR) $${HOME}/rpmbuild/SOURCES/
+
 # build klash and the konqueror plugin as a sepaate step.
-rpm-klash: snapshot spec
-       address@hidden "+%Y%m%d"`; \
-       pkgname="gnash-trunk_$${now}"; \
-       snapshot_tar="$${pkgname}.tar.gz"; \
-       cp $${snapshot_tar} $${HOME}/rpmbuild/SOURCES/
-       rpmbuild -ba $(RPMBUILD_FLAGS) klash.spec
+rpm-klash:
+       rpmbuild -ba $(RPMBUILD_FLAGS) glash.spec
 
 .PHONY : rpm redhat rpm-klash
 

=== modified file 'packaging/snapshot.am'
--- a/packaging/snapshot.am     2009-02-25 22:33:03 +0000
+++ b/packaging/snapshot.am     2009-04-14 19:15:30 +0000
@@ -16,59 +16,66 @@
 # 
 
 NOW = `date "+%Y%m%d"`
+
 # for snapshots, this should always be something like trunk or head
 # for an official release, it should be unset
-RELEASE = trunk_
+
+#bzr version-info --custom --template='#define BRANCH_REVNO {revno}\n#define 
BRANCH_NICK {branch_nick}\n'
 
 # these is the directories where the snapshot gets built. Sources are
 # in the top level, the build goes in a _build subdirectory
-SNAPSHOT_DIR = gnash-${RELEASE}${NOW}
-SNAPSHOT_BUILD = gnash-${RELEASE}${NOW}/_build
-SNAPSHOT_TMP = /tmp/gnash-${RELEASE}$(NOW)
+SNAPSHOT_DIR = gnash-${BRANCH_REVNO}_$(BRANCH_NICK)
+SNAPSHOT_BUILD = gnash-${BRANCH_REVNO}_$(BRANCH_NICK)/_build
+SNAPSHOT_NAME = $(SNAPSHOT_DIR)
+# this is the name of the actual tarball
+SNAPSHOT_TAR = gnash-$(BRANCH_REVNO)_$(BRANCH_NICK).tar.gz
+# this is the temporary directory used for DESTDIR
+SNAPSHOT_TMP = /tmp/$(SNAPSHOT_DIR)_$(BRANCH_NICK)
+
+# extract info from bazar
 
 #
 # build a binary snapshot from of Gnash for systems we don't have
 # packaging support for.
 #
 
+# Do the entire process to build a binary tarball
+snapshot: snapshot-src snapshot-configure snapshot-build snapshot-install 
snapshot-bundle
+
 # start by creating the initial tarball using the dist-bzip2 target.
 # This uses the default version for Gnash. which is 'trunk'. So we
 # rename it to the dir we want to stay clear. Then we change the default
-# version from 'trunk' to a date stamped version of trunk, like
-# '20080202trunk'
-snapshot: distdir
-       address@hidden "+%Y%m%d"`; \
-       pkgname="gnash-${RELEASE}$${now}"; \
-       snapshot_dir="gnash-${RELEASE}$${now}"; \
-       snapshot_tar="$${pkgname}.tar.gz"; \
-       if test -d $${snapshot_dir}; then \
-         rm -fr $${snapshot_dir}; \
-       fi; \
-       mv -f gnash-trunk $${snapshot_dir}; \
-       if test ! -f $${snapshot_dir}/configure.ac.orig; then \
-         mv -f $${snapshot_dir}/configure.ac 
$${snapshot_dir}/configure.ac.orig; \
-         sed -e "s/AC_INIT(gnash, trunk)/AC_INIT(gnash, trunk-$${now})/" \
-           $${snapshot_dir}/configure.ac.orig > $${snapshot_dir}/configure.ac; 
\
-         cd $${snapshot_dir} ; ./autogen.sh; cd .. ;\
-       fi; \
-       tar zcvf $${snapshot_tar} --exclude=$${snapshot_dir}/autom4te.cache \
-         --exclude=$${snapshot_dir}/configure.ac.orig $${snapshot_dir}
-#      $(RM) -fr $${snapshot_dir}
+# version from 'trunk' to a date stamped version of trunk.
+snapshot-src: distdir
+       snapshot_tar="$(SNAPSHOT_NAME).tar.gz"; \
+       if test -d $(SNAPSHOT_DIR); then \
+         rm -fr $(SNAPSHOT_DIR); \
+       fi; \
+       mv -f gnash-trunk $(SNAPSHOT_DIR); \
+       if test ! -f $(SNAPSHOT_DIR)/configure.ac.orig; then \
+         mv -f $(SNAPSHOT_DIR)/configure.ac $(SNAPSHOT_DIR)/configure.ac.orig; 
\
+         sed -e "s/AC_INIT(gnash, trunk)/AC_INIT(gnash, 
$(BRANCH_REVNO)-$(BRANCH_NICK))/" \
+           $(SNAPSHOT_DIR)/configure.ac.orig > $(SNAPSHOT_DIR)/configure.ac; \
+         cd $(SNAPSHOT_DIR) ; ./autogen.sh; cd .. ;\
+       fi; \
+       tar zcvf $${snapshot_tar} --exclude=$(SNAPSHOT_DIR)/autom4te.cache \
+         --exclude=$(SNAPSHOT_DIR)/configure.ac.orig $(SNAPSHOT_DIR)
+#      $(RM) -fr $(SNAPSHOT_DIR)
 
-snapshot-configure: snapshot
+snapshot-configure: 
        address@hidden "+%Y%m%d"`; \
-       pkgname="gnash-${RELEASE}$${now}"; \
-       snapshot_dir="$${pkgname}"; \
-       snapshot_build="$${snapshot_dir}/_build"; \
-       if test ! -d $${snapshot_build}; then \
-         $(MKINSTALLDIRS) $${snapshot_build}; \
+       pkgname="gnash-${BRANCH_REVNO}-$(BRANCH_NICK)"; \
+       snapshot_dir=$(SNAPSHOT_DIR); \
+       snapshot_build="$(SNAPSHOT_DIR)/_build"; \
+       if test ! -d $(SNAPSHOT_BUILD); then \
+         $(MKINSTALLDIRS) $(SNAPSHOT_BUILD); \
        fi; \
        if test -d /usr/local/mozilla-firefox/plugins; then \
           plugindir=/usr/local/mozilla-firefox/plugins; \
        else \
          plugindir=/usr/lib/mozilla/plugins; \
         fi; \
-       cd $${snapshot_build}; ../configure \
+       cd $(SNAPSHOT_BUILD); ../configure \
        $(SNAPSHOT_CONFIGURE_FLAGS) \
          --disable-dependency-tracking\
          --disable-rpath \
@@ -81,31 +88,19 @@
 #        --with-extensions=all 
 #        --enable-gui=all 
 
-snapshot-build: # snapshot-configure
-       address@hidden "+%Y%m%d"`; \
-       pkgname="gnash-${RELEASE}$${now}"; \
-       snapshot_dir="$${pkgname}"; \
-       snapshot_build="$${snapshot_dir}/_build"; \
-       $(MAKE) $(AM_MAKEFLAGS) -C $${snapshot_build}; \
-       $(MAKE) $(AM_MAKEFLAGS) -C $${snapshot_build}/doc/C info man html
+snapshot-build:
+       $(MAKE) $(AM_MAKEFLAGS) -C $(SNAPSHOT_BUILD)
+       $(MAKE) $(AM_MAKEFLAGS) -C $(SNAPSHOT_BUILD)/doc/C info man html
 
 # Install a package. Afterwards we link to the prebuilt man pages incase
 # DocBook and DocBook2X aren't installed on this machine.
-snapshot-install: #snapshot-build
-       now=`date "+%Y%m%d"`; \
-       snapshot_dir="gnash-${RELEASE}$${now}"; \
-       snapshot_build="$${snapshot_dir}/_build"; \
-       snapshot_dest="/tmp/gnash_${RELEASE}$${now}-tmp"; \
-       $(MAKE) $(AM_MAKEFLAGS) -C $${snapshot_build} install 
DESTDIR=$${snapshot_dest}
+snapshot-install:
+       $(MAKE) $(AM_MAKEFLAGS) -C $(SNAPSHOT_BUILD) install 
DESTDIR=$(SNAPSHOT_TMP)
 
 # We only want to bundle an installed gnash, so all the linker paths are
 # correct
-snapshot-bundle: snapshot snapshot-build snapshot-install
-       address@hidden "+%Y%m%d"`; \
-       pkgname="gnash-trunk_$${now}"; \
-       snapshot_dest="/tmp/$${pkgname}"; \
-       snapshot_tmp="/tmp/$${pkgname}-tmp"; \
-       snapshot_tar="$${snapshot_tmp}-$(host_cpu)-$(host_os).tar.gz"; \
+snapshot-bundle: 
+       snapshot_tar="$(SNAPSHOT_TMP)-$(host_cpu)-$(host_os).tar.gz"; \
        if test ! -d $${snapshot_tmp}; then \
          $(mkinstalldirs) $${snapshot_tmp}; \
        fi; \
@@ -123,7 +118,7 @@
        strip $${snapshot_tmp}/bin/dumpshm; \
        strip $${snapshot_tmp}/bin/flvdumper; \
        strip $${snapshot_tmp}/bin/rtmpget; \
-       tar zcvCf /tmp $${snapshot_tar} $${pkgname}
+       tar zcvCf /tmp $${snapshot_tar} $(SNAPSHOT_NAME)
 
 
 snapshot-clean:

=== modified file 'packaging/xpi.am'
--- a/packaging/xpi.am  2009-02-25 22:33:03 +0000
+++ b/packaging/xpi.am  2009-04-14 18:44:05 +0000
@@ -31,7 +31,6 @@
        --disable-testsuite \
        --enable-xpcom \
        --enable-media=ffmpeg \
-       --enable-jemalloc \
        --enable-gui=gtk \
        --prefix=/usr \
        --mandir=/usr/share/man \
@@ -39,7 +38,28 @@
        --with-npapi-plugindir=/usr/lib/mozilla/plugins
 
 # Do the entire process to build an xpi package
-xpi: snapshot xpi-configure snapshot-build snapshot-install
+xpi: snapshot-src xpi-configure xpi-build xpi-install xpi-bundle
+
+# just use the default snapshot build process
+xpi-build: snapshot-build
+# just use the default snapshot installation process
+xpi-install: snapshot-install
+
+# configure the xpi build. snapshot needs to have been run already. If you 
wish the
+# automatic dependency checking, use the 'xpi' target instead, as this is 
meant only
+# to be called directly when debugging package building. We statically link the
+# executable so the executables don't have to find any of the gnash libraries 
at
+# runtime. This way you can have multiple versions of Gnash installed, and 
they all
+# use the appropriate libraries for each build.
+xpi-configure:
+       if test ! -d $(SNAPSHOT_BUILD); then \
+         $(MKINSTALLDIRS) $(SNAPSHOT_BUILD); \
+       fi; \
+       (cd $(SNAPSHOT_BUILD); ../configure \
+         --enable-static \
+         --disable-shared \
+         $(CONFIG_OPTS))
+       cp bzrversion.h $(SNAPSHOT_BUILD)
 
 # build the xpi package bundle. snapshot-build and snapshot-install need to
 # have been run already. If you wish the automatic dependency checking, use
@@ -52,41 +72,21 @@
 # have to reconfigure to enable shared libraries to be built, and then rebuild
 # the plugins and the xpcom support as dynamically loadable modules.
 xpi-bundle:
-       address@hidden "+%Y%m%d"`; \
-       pkgname="gnash-${RELEASE}$${now}"; \
-       snapshot_dir="gnash-${RELEASE}$${now}"; \
-       snapshot_build="$${snapshot_dir}/_build"; \
-       snapshot_dest="/tmp/gnash_${RELEASE}$${now}-tmp"; \
-       snapshot_xpi="/tmp/gnash_${RELEASE}$${now}-pkg"; \
+       snapshot_dest="/tmp/$(SNAPSHOT_NAME)-tmp"; \
+       snapshot_xpi="/tmp/$(SNAPSHOT_NAME)-tmp"; \
        mkdir -p $${snapshot_xpi}/plugins; \
        for i in install.rdf; do \
          cp -fr $(srcdir)/packaging/xpi/$$i $${snapshot_xpi}; \
        done; \
        strip  $${snapshot_dest}/$(bindir)/gtk-gnash; \
-       cd $${snapshot_build}; ../configure --enable-shared $(CONFIG_OPTS); \
+       cd $(SNAPSHOT_BUILD); ../configure --enable-shared $(CONFIG_OPTS); \
        $(MAKE) $(AM_MAKEFLAGS) -C plugin clean install-plugin 
DESTDIR=$${snapshot_dest}; \
        $(MAKE) $(AM_MAKEFLAGS) -C plugin/xpcom all install-pkglib 
DESTDIR=$${snapshot_dest}; \
        cp -fr $${snapshot_dest}/usr/lib/mozilla/plugins/libgnashplugin.so 
$${snapshot_xpi}/plugins; \
        cp -fr $${snapshot_dest}/usr/lib/mozilla/plugins/extensions/*.xpt 
$${snapshot_xpi}/plugins; \
        cp -fr $${snapshot_dest}/usr/lib/mozilla/plugins/extensions/*.so 
$${snapshot_xpi}/plugins; \
        cp -fr $${snapshot_dest}/usr/bin/gtk-gnash $${snapshot_xpi}; \
-       (cd $${snapshot_xpi}; $(ZIP) -r /tmp/$${snapshot_dir}.xpi *);
-
-# configure the xpi build. snapshot needs to have been run already. If you 
wish the
-# automatic dependency checking, use the 'xpi' target instead, as this is 
meant only
-# to be called directly when debugging package building.
-xpi-configure:
-       address@hidden "+%Y%m%d"`; \
-       pkgname="gnash-${RELEASE}$${now}"; \
-       snapshot_dir="$${pkgname}"; \
-       snapshot_build="$${snapshot_dir}/_build"; \
-       if test ! -d $${snapshot_build}; then \
-         $(MKINSTALLDIRS) $${snapshot_build}; \
-       fi; \
-       cd $${snapshot_build}; ../configure \
-         --enable-static \
-         --disable-shared \
-         $(CONFIG_OPTS)
+       (cd $${snapshot_xpi}; $(ZIP) -r /tmp/$(SNAPSHOT_DIR).xpi *);
 
 # remove files left from package building
 xpi-clean:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]