From e68510f9529b56945938295df76a00157a36294e Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Mon, 17 Apr 2006 15:55:24 +0000 Subject: [PATCH] Various build related tweaks: - Autogenerate spec file (now named e16.spec, was e.spec) - Minor changes to various version strings - Move timestamp.h to top dir. SVN revision: 22180 --- Makefile.am | 3 ++- configure.in | 16 ++++++++++++++-- e.spec => e16.spec.in | 18 +++++++----------- ecvs | 13 ++++++------- src/Makefile.am | 3 +-- src/actions.c | 3 +-- src/main.c | 12 +++--------- src/timestamp.h => timestamp.h | 0 8 files changed, 34 insertions(+), 34 deletions(-) rename e.spec => e16.spec.in (80%) rename src/timestamp.h => timestamp.h (100%) diff --git a/Makefile.am b/Makefile.am index 0856c7d1..44dd81c4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,11 +1,12 @@ SUBDIRS = intl dox eesh epp src config themes man scripts misc po EXTRA_DIST = \ +timestamp.h \ sample-scripts/bouncingball.pl \ sample-scripts/lcdmover.sh \ sample-scripts/testroller.pl \ sample-scripts/shade-pagers.pl \ -e.spec \ +e16.spec.in \ configure configure.in config.h.in \ ABOUT-NLS AUTHORS COMPLIANCE COPYING ChangeLog INSTALL NEWS README \ docs/README-0.16.8 diff --git a/configure.in b/configure.in index f9b43891..a7d7c06e 100644 --- a/configure.in +++ b/configure.in @@ -1,11 +1,19 @@ -AC_INIT(e.spec) +AC_INIT(configure.in) ENLIGHTENMENT_MAJOR=0 ENLIGHTENMENT_MINOR=16 ENLIGHTENMENT_MICRO=8.2 +ENLIGHTENMENT_REVISION=0.01 ENLIGHTENMENT_VERSION=$ENLIGHTENMENT_MAJOR.$ENLIGHTENMENT_MINOR.$ENLIGHTENMENT_MICRO +if test "x$ENLIGHTENMENT_REVISION" != "x"; then + ENLIGHTENMENT_REVNAME="$ENLIGHTENMENT_VERSION-$ENLIGHTENMENT_REVISION" + RPM_REVISION=$ENLIGHTENMENT_REVISION +else + ENLIGHTENMENT_REVNAME="$ENLIGHTENMENT_VERSION" + RPM_REVISION=1 +fi -AM_INIT_AUTOMAKE(e16, $ENLIGHTENMENT_VERSION-0.01) +AM_INIT_AUTOMAKE(e16, $ENLIGHTENMENT_REVNAME) AM_MAINTAINER_MODE dnl reasonable guesses for where stuff is installed @@ -26,9 +34,12 @@ AC_DEFINE_UNQUOTED(ENLIGHTENMENT_MINOR, "$ENLIGHTENMENT_MINOR", [Minor Version]) AC_SUBST(ENLIGHTENMENT_MINOR) AC_DEFINE_UNQUOTED(ENLIGHTENMENT_MICRO, "$ENLIGHTENMENT_MICRO", [Micro Version]) AC_SUBST(ENLIGHTENMENT_MICRO) +AC_DEFINE_UNQUOTED(ENLIGHTENMENT_REVISION, "$ENLIGHTENMENT_REVISION", [Revision]) +AC_SUBST(ENLIGHTENMENT_REVISION) if test "x$ENLIGHTENMENT_RELEASE" != "x"; then AC_DEFINE_UNQUOTED(ENLIGHTENMENT_RELEASE, "$ENLIGHTENMENT_RELEASE", [Release]) fi +AC_SUBST(RPM_REVISION) ALL_LINGUAS="bg bs da de en_US es fr hu ko nl no ru sv pt pl pt_BR tr ja" @@ -257,6 +268,7 @@ scripts/Makefile misc/Makefile po/Makefile.in intl/Makefile +e16.spec ]) if test "x$have_good_imlib2" != "xyes"; then diff --git a/e.spec b/e16.spec.in similarity index 80% rename from e.spec rename to e16.spec.in index 2a5187c7..380a0519 100644 --- a/e.spec +++ b/e16.spec.in @@ -1,14 +1,11 @@ -%define revision 0.01 -%define rev_name -%{revision} - Summary: The Enlightenment window manager. -Name: e16 -Version: 0.16.8.2 -Release: %{revision}%{?_vendorsuffix:.%{_vendorsuffix}} +Name: @PACKAGE@ +Version: @ENLIGHTENMENT_VERSION@ +Release: @RPM_REVISION@%{?_rpm_add_date:.%(date '+%y%m%d')}%{?_vendorsuffix:.%{_vendorsuffix}} License: BSD Group: User Interface/Desktops URL: http://www.enlightenment.org/ -Source0: http://prdownloads.sourceforge.net/enlightenment/%{name}-%{version}%{rev_name}.tar.gz +Source0: http://prdownloads.sourceforge.net/enlightenment/@PACKAGE@-@VERSION@.tar.gz #BuildSuggests: esound-devel BuildRequires: imlib2-devel freetype-devel xorg-x11-devel Packager: %{?_packager:%{_packager}}%{!?_packager:Michael Jennings } @@ -33,13 +30,12 @@ define their own policy, down to every last detail. This package will install the Enlightenment window manager. %prep -%setup -n %{name}-%{version}%{rev_name} +%setup -n @PACKAGE@-@VERSION@ %build CFLAGS="${RPM_OPT_FLAGS}" -ENLIGHTENMENT_RELEASE=%{release} -AC_FLAGS="--prefix=%{_prefix} --mandir=%{_mandir} --enable-fsstd" -export CFLAGS ENLIGHTENMENT_RELEASE AC_FLAGS +AC_FLAGS="--prefix=%{_prefix} --mandir=%{_mandir}" +export CFLAGS AC_FLAGS if [ ! -f configure ]; then ./autogen.sh $AC_FLAGS else diff --git a/ecvs b/ecvs index 83b80017..01fe9488 100644 --- a/ecvs +++ b/ecvs @@ -44,8 +44,8 @@ if(($ARGV[0] =~ /com/) || ($ARGV[0] =~ /ci/)) { @ARGV2 = @ARGV; $ARGV2[0] = "update"; - print "Force updating ChangeLog and removing src/timestamp.h\n"; - system("cvs update -C ChangeLog src/timestamp.h"); + print "Force updating ChangeLog and removing timestamp.h\n"; + system("cvs update -C ChangeLog timestamp.h"); print "Updating the files you are committing.\n"; system("cvs @ARGV2 2>&1 |tee errors"); @@ -62,9 +62,8 @@ if(($ARGV[0] =~ /com/) || ($ARGV[0] =~ /ci/)) { unlink "errors" if (-f "errors"); - - print "Creating new src/timestamp.h\n"; - open TS, ">src/timestamp.h"; + print "Creating new timestamp.h\n"; + open TS, ">timestamp.h"; print TS "#define E_CHECKOUT_DATE \"\$Date\$\"\n"; close TS; @@ -86,12 +85,12 @@ if(($ARGV[0] =~ /com/) || ($ARGV[0] =~ /ci/)) { $found = 0; foreach(@ARGV) { - if(/src\/timestamp\.h$/) { + if(/timestamp\.h$/) { $found = 1; } } - push @ARGV, "src/timestamp.h" if(!$found); + push @ARGV, "timestamp.h" if(!$found); } } diff --git a/src/Makefile.am b/src/Makefile.am index aa46b47a..61f1e0d2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -110,7 +110,6 @@ e16_SOURCES = \ theme.c \ timers.c \ timers.h \ - timestamp.h \ tooltips.c \ tooltips.h \ ttfont.c \ @@ -137,7 +136,7 @@ LDADD = \ $(E_X_LIBS) \ -lX11 -lm -INCLUDES = -I$(top_builddir) -I$(top_srcdir)/intl @ecore_cflags@ $(ESD_CFLAGS) $(IMLIB_CFLAGS) $(X_CFLAGS) +INCLUDES = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/intl @ecore_cflags@ $(ESD_CFLAGS) $(IMLIB_CFLAGS) $(X_CFLAGS) install-data-local: $(top_srcdir)/mkinstalldirs $(DESTDIR)$(ENLIGHTENMENT_ROOT)/themes diff --git a/src/actions.c b/src/actions.c index 6bfa761a..76c18e2a 100644 --- a/src/actions.c +++ b/src/actions.c @@ -289,8 +289,7 @@ About(void) } d = DialogCreate("ABOUT_ENLIGHTENMENT"); - Esnprintf(buf, sizeof(buf), - _("About Enlightenment %s"), ENLIGHTENMENT_VERSION); + Esnprintf(buf, sizeof(buf), _("About Enlightenment %s"), e_wm_version); DialogSetTitle(d, buf); table = DialogInitItem(d); diff --git a/src/main.c b/src/main.c index fba9f364..917b8638 100644 --- a/src/main.c +++ b/src/main.c @@ -34,12 +34,7 @@ #include const char e_wm_name[] = "Enlightenment"; -const char e_wm_version[] = -#ifdef ENLIGHTENMENT_RELEASE - "enlightenment-" ENLIGHTENMENT_VERSION "-" ENLIGHTENMENT_RELEASE; -#else - "enlightenment-" ENLIGHTENMENT_VERSION; -#endif +const char e_wm_version[] = ENLIGHTENMENT_VERSION; const char e_wm_date[] = E_CHECKOUT_DATE; Display *disp; @@ -191,8 +186,7 @@ main(int argc, char **argv) Mode.theme.path = Estrdup(eoptarg); break; case 'V': - printf("Enlightenment %s - %s\n", - ENLIGHTENMENT_VERSION, E_CHECKOUT_DATE); + printf("%s %s - %s\n", e_wm_name, e_wm_version, e_wm_date); exit(0); break; case 'v': @@ -237,7 +231,7 @@ main(int argc, char **argv) ThemePathFind(); /* Set the Environment variables */ - Esetenv("EVERSION", ENLIGHTENMENT_VERSION, 1); + Esetenv("EVERSION", e_wm_version, 1); Esetenv("EROOT", EDirRoot(), 1); Esetenv("EBIN", EDirBin(), 1); Esetenv("ECONFDIR", EDirUser(), 1); diff --git a/src/timestamp.h b/timestamp.h similarity index 100% rename from src/timestamp.h rename to timestamp.h