Heyhey,
I got time to make this thing compatible with make dist.
The new patch version is attached.
Changes:
- if svn info call is not possible, rely on an autogen generated svn info file
dump.
- make dist packages that file dump
- as an ultimate fallback, set version to "Non versioned"
- extract branch/trunk/tag info
--
Edouard Gomez
Index: configure.in
===================================================================
--- configure.in (revision 3617)
+++ configure.in (working copy)
@@ -103,6 +103,60 @@
AM_CONDITIONAL(CAN_COMPILE_SSE4_1, test "$_CAN_COMPILE_SSE4_1" = yes)
AM_CONDITIONAL(CAN_COMPILE_SSE2, test "$_CAN_COMPILE_SSE2" = yes)
+[
+branchname()
+{
+ awk '
+/^Repository Root:/ {
+ root=$3;
+}
+
+/^URL:/ {
+ url=$2;
+}
+
+END{
+ sub(root, "", url);
+ if (index(url, "/branches/") == 1) {
+ branch = substr(url, 11);
+ printf(" (branch %s)", branch);
+ } else if (index(url, "/tags/") == 1) {
+ tag = substr(url, 7);
+ printf(" (tag %s)", tag);
+ } else {
+ printf(" (trunk)");
+ }
+}
+'
+}
+
+if test -f .version ; then
+ RAWSTUDIO_VERSION=$(cat .version)
+else
+ RAWSTUDIO_VERSION="Non versionned"
+fi
+if test -d .svn && svn --version>/dev/null 2>&1 ; then
+ RAWSTUDIO_SVNREV=$(LC_ALL=C svn info | awk '/^Revision:/ {printf("-svn%s",$2); }')
+ RAWSTUDIO_BRANCH=$(LC_ALL=C svn info |branchname)
+elif test -f .svninfo ; then
+ RAWSTUDIO_SVNREV=$(awk '/^Revision:/ {printf("-snapshot%s",$2); }' .svninfo)
+ RAWSTUDIO_BRANCH=$(cat .svninfo|branchname)
+else
+ RAWSTUDIO_SVNREV=""
+ RAWSTUDIO_BRANCH=""
+fi
+]
+RAWSTUDIO_VERSION="${RAWSTUDIO_VERSION}${RAWSTUDIO_SVNREV}${RAWSTUDIO_BRANCH}"
+
+AC_DEFINE_UNQUOTED([RAWSTUDIO_VERSION], ["$RAWSTUDIO_VERSION"], ["Public revision"])
+
+if test -f .svninfo; then
+ SVNINFO=".svninfo"
+else
+ SVNINFO=""
+fi
+AC_SUBST([SVNINFO])
+
AC_OUTPUT([
Makefile
librawstudio/Makefile
Index: src/rs-actions.c
===================================================================
--- src/rs-actions.c (revision 3617)
+++ src/rs-actions.c (working copy)
@@ -1146,7 +1146,7 @@
"artists", artists,
"translator-credits", "Simone Contini\nPaweÅ GoÅaszewski\nAlexandre Prokoudine\nJakub Friedl\nCarsten Mathaes\nEdouard Gomez\nMartin Egger\nKrzysztof KoÅciuszkiewicz\nEinar Ryeng\nOlli Hänninen\nCarlos Dávila\nPatrik Jarl\nOlav Lavell\nRafael Sachetto Oliveira\nPaco Rivière",
"comments", _("A raw image converter for GTK+/GNOME"),
- "version", VERSION,
+ "version", RAWSTUDIO_VERSION,
"website", "http://rawstudio.org/",
"name", "Rawstudio",
NULL
@@ -1386,4 +1386,4 @@
g_static_mutex_unlock(&rs_actions_spinlock);
return action;
-}
\ No newline at end of file
+}
Index: .version
===================================================================
--- .version (revision 0)
+++ .version (revision 0)
@@ -0,0 +1 @@
+1.3
Index: Makefile.am
===================================================================
--- Makefile.am (revision 3617)
+++ Makefile.am (working copy)
@@ -9,7 +9,8 @@
autogen.sh \
ChangeLog \
rawstudio.desktop \
- gettext.h
+ gettext.h \
+ .version $(SVNINFO)
ChangeLog:
svn2cl -i
Index: autogen.sh
===================================================================
--- autogen.sh (revision 3617)
+++ autogen.sh (working copy)
@@ -148,6 +148,10 @@
fi
done
+if [ -d .svn ] && svn --version >/dev/null 2>&1 ; then
+ LC_ALL=C svn info > .svninfo
+fi
+
conf_flags="--enable-maintainer-mode"
if test x$NOCONFIGURE = x; then
_______________________________________________
Rawstudio-dev mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev