aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2005-05-01 00:41:33 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2005-05-01 00:41:33 +0000
commita56aeeec184a7570eeeaa6a85b3760eddeb04397 (patch)
treed636e51d2801e19b75f8b45cb175026e41ca27ab
parentc1e98e63ced7c7cf0a96eb7344dce8c70a2374a3 (diff)
- add rpmpopt
- fix optflags in macros
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac5
-rw-r--r--macros-perarch.in3
-rw-r--r--macros.in4
-rw-r--r--make_macrosfiles.sh.in6
-rw-r--r--rpmrc.in2
6 files changed, 16 insertions, 10 deletions
diff --git a/Makefile.am b/Makefile.am
index 0e82414..554cd02 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,10 +2,13 @@
macrosfiles = $(RPMALLARCH:=.macros)
-pkg_data =
+pkg_data = \
+ rpmpopt
+
pkg_gdata = \
rpmrc \
macros
+
pkg_data_in = $(pkg_gdata:=.in)
pkg_scripts = \
@@ -50,6 +53,7 @@ EXTRA_DIST = \
edit = sed \
-e 's,@RPMVENDOR\@,$(RPMVENDOR),g' \
-e 's,@RPMVENDORDIR\@,$(RPMVENDORDIR),g' \
+ -e 's,@RPMCANONVENDOR\@,$(RPMCANONVENDOR),g' \
-e 's,@RPMLIBDIR\@,$(RPMLIBDIR),g' \
-e 's,@RPMSYSCONFDIR\@,$(RPMSYSCONFDIR),g'\
-e 's,@RPMOS\@,$(RPMOS),g'
diff --git a/configure.ac b/configure.ac
index a79e08b..ef82013 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,6 +66,9 @@ if test $with_vendor; then
fi
AC_SUBST(RPMVENDOR)
+RPMCANONVENDOR=`echo "${RPMVENDOR}" | tr [A-Z] [a-z]`
+AC_SUBST(RPMCANONVENDOR)
+
if test X"$prefix" = XNONE ; then
usrprefix="$ac_default_prefix"
else
@@ -86,7 +89,7 @@ if test $with_rpmconfdir; then
fi
AC_SUBST(RPMCONFDIR)
-RPMVENDORDIR=`echo "${RPMCONFDIR}/${RPMVENDOR}" | tr [A-Z] [a-z]`
+RPMVENDORDIR="${RPMCONFDIR}/${RPMCANONVENDOR}"
AC_SUBST(RPMVENDORDIR)
RPMSYSCONFDIR="/etc/rpm"
diff --git a/macros-perarch.in b/macros-perarch.in
index ccde046..371a55d 100644
--- a/macros-perarch.in
+++ b/macros-perarch.in
@@ -5,10 +5,9 @@
# ---- per-platform macros.
#
%_arch @RPMARCH@
-%_vendor @RPMVENDOR@
%_os @RPMOS@
%_gnu -gnu
-%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}
+%_target_platform %{_target_cpu}-%{_real_vendor}-%{_target_os}%{?_gnu}
%optflags @RPMOPTFLAGS@
#==============================================================================
diff --git a/macros.in b/macros.in
index ad53a0e..d973599 100644
--- a/macros.in
+++ b/macros.in
@@ -9,8 +9,8 @@
# should be added to /etc/rpm/macros, while per-user configuration should
# be added to ~/.rpmmacros.
-%_host_vendor @RPMVENDOR@
-%_real_vendor @RPMVENDOR@
+%_host_vendor @RPMCANONVENDOR@
+%_real_vendor @RPMCANONVENDOR@
%_vendor @RPMVENDOR@
diff --git a/make_macrosfiles.sh.in b/make_macrosfiles.sh.in
index cb8978e..12bf942 100644
--- a/make_macrosfiles.sh.in
+++ b/make_macrosfiles.sh.in
@@ -54,11 +54,11 @@ esac
if [ -n "$MULTILIBNO" ]; then
MULTILIBSED='-e /^@MULTILIB/d -e s,@MULTILIBNO@,'$MULTILIBNO,
else
- MULTILIBSED='-e /^@MULTILIBSTART@/,/^@MULTILIBEND@/d'
+ MULTILIBSED='/^@MULTILIBSTART@/,/^@MULTILIBEND@/d'
fi
if [ -n "$OPTFLAGS" ]; then
- OPTFLAGSSED='-e s,@RPMOPTFLAGS@,$OPTFLAGS,g'
+ OPTFLAGSSED="s/@RPMOPTFLAGS@/${OPTFLAGS}/g"
else
OPTFLAGSSED='-e s,^%optflags.*,,'
fi
@@ -66,5 +66,5 @@ fi
cat "$MINPUT" | sed \
-e "s,@RPMARCH@,$CANONARCH,g" \
-e "s,@LIB@,$LIB,g" \
- $OPTFLAGSSED \
+ -e "$OPTFLAGSSED" \
$MULTILIBSED
diff --git a/rpmrc.in b/rpmrc.in
index 7d37ca2..258049d 100644
--- a/rpmrc.in
+++ b/rpmrc.in
@@ -94,4 +94,4 @@ arch_compat: osfmach3_i386: i486
buildarch_compat: k6: i486
-macrofiles: @RPMLIBDIR@/macros:@RPMLIBDIR@/%{_target}/macros:@RPMVENDORDIR@/macros:@RPMVENDORDIR@/%{_target}/macros:@RPMSYSCONFDIR@/macros:@RPMSYSCONFDIR@/%{_target}/macros:@RPMSYSCONFDIR@/macros.d/*.macros:~/.rpmmacros
+macrofiles: @RPMLIBDIR@/macros:@RPMLIBDIR@/%{_target}/macros:@RPMVENDORDIR@/macros:@RPMVENDORDIR@/%{_target}/macros:@RPMSYSCONFDIR@/macros:@RPMSYSCONFDIR@/%{_target}/macros:@RPMSYSCONFDIR@/macros.cdb:@RPMSYSCONFDIR@/macros.d/*.macros:~/.rpmmacros