From 48a3293179f8edb948617c99599e59ce9d814824 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Thu, 5 May 2011 22:00:00 +0000 Subject: Allow setting distsuffix at build time --- Makefile.am | 3 ++- build.macros.in | 2 +- configure.ac | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 1673421..2da8498 100644 --- a/Makefile.am +++ b/Makefile.am @@ -102,7 +102,8 @@ edit = sed \ -e 's,@RPMOS\@,$(RPMOS),g' \ -e 's,@CANONTARGETCPU\@,$(CANONTARGETCPU),g' \ -e 's,@CANONTARGETGNU\@,$(CANONTARGETGNU),g' \ - -e 's,@RPMALLARCH\@,$(RPMALLARCH),g' + -e 's,@RPMALLARCH\@,$(RPMALLARCH),g' \ + -e 's,@DISTSUFFIX\@,$(DISTSUFFIX),g' %: %.in Makefile $(edit) $< > $@ diff --git a/build.macros.in b/build.macros.in index c9790a0..daeb1f6 100644 --- a/build.macros.in +++ b/build.macros.in @@ -150,7 +150,7 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` %{_gconftool_bin} - # (user may copy the following line in specfile) %mgaversion %distro_release -%distsuffix .mga +%distsuffix @DISTSUFFIX@ %mkrel(c:) %{-c: 0.%{-c*}.}%{1}%{?subrel:.%subrel}%{?distsuffix:%distsuffix}%{?!distsuffix:.mga}%{?distro_release:%distro_release} diff --git a/configure.ac b/configure.ac index 9f4c74b..0177f10 100644 --- a/configure.ac +++ b/configure.ac @@ -128,6 +128,13 @@ AC_SUBST(RPMVENDOR) RPMCANONVENDOR=`echo "${RPMVENDOR}" | tr [A-Z] [a-z]` AC_SUBST(RPMCANONVENDOR) +DISTSUFFIX="mga" +AC_ARG_WITH(distsuffix, [ --with-distsuffix the distsuffix to use when building packages ]) +if test $with_distsuffix; then + DISTSUFFIX=$with_distsuffix +fi +AC_SUBST(DISTSUFFIX) + if test X"$prefix" = XNONE ; then usrprefix="$ac_default_prefix" else -- cgit v1.2.1