diff options
author | Pascal Terjan <pterjan@mageia.org> | 2011-05-05 22:00:00 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2011-05-05 22:00:00 +0000 |
commit | 48a3293179f8edb948617c99599e59ce9d814824 (patch) | |
tree | 79d0a4b735f9d15a242f79622b27559eec0a654b | |
parent | 5c79e081998f8ca329fd5154662b073b56e97f9b (diff) | |
download | rpm-setup-48a3293179f8edb948617c99599e59ce9d814824.tar rpm-setup-48a3293179f8edb948617c99599e59ce9d814824.tar.gz rpm-setup-48a3293179f8edb948617c99599e59ce9d814824.tar.bz2 rpm-setup-48a3293179f8edb948617c99599e59ce9d814824.tar.xz rpm-setup-48a3293179f8edb948617c99599e59ce9d814824.zip |
Allow setting distsuffix at build time
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | build.macros.in | 2 | ||||
-rw-r--r-- | 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 |