aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am3
-rw-r--r--build.macros.in2
-rw-r--r--configure.ac7
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