[rtems-crossrpms commit] Remove local-/custom- rpmprefix.
Ralf Corsepius
ralf at rtems.org
Thu May 8 11:05:00 UTC 2014
Module: rtems-crossrpms
Branch: master
Commit: d5a708a4776f9f0f3a397627855071bc1fbd8eec
Changeset: http://git.rtems.org/rtems-crossrpms/commit/?id=d5a708a4776f9f0f3a397627855071bc1fbd8eec
Author: Ralf Corsépius <ralf.corsepius at rtems.org>
Date: Mon Feb 24 11:38:14 2014 +0100
Remove local-/custom- rpmprefix.
Rework logic to handle custom rpms.
---
configure | 28 ++++++++++++++--------------
configure.ac | 26 ++++++++++++--------------
2 files changed, 26 insertions(+), 28 deletions(-)
diff --git a/configure b/configure
index 16cbef4..1b08bc5 100755
--- a/configure
+++ b/configure
@@ -2445,33 +2445,33 @@ fi
case "$prefix" in
/usr)
- sysdirpattern="/%sysdir/d"
- rpmprefix=
+# Do not replace system-provided packages
host_subdirs=
- CUSTOM_RPMPREFIX=yes
;;
-/usr/local)
- sysdirpattern="/%sysdir/d"
- rpmprefix="local-"
+*)
host_subdirs=autotools
- CUSTOM_RPMPREFIX=yes
;;
-/opt/rtems)
- sysdirpattern="s/^%sysdir/%dir/g"
- rpmprefix="rtems-"
- host_subdirs=autotools
+esac
+
+case "$prefix" in
+/usr)
+ sysdirpattern="/%sysdir/d"
+ rpmprefix=
CUSTOM_RPMPREFIX=yes
;;
NONE|${ac_default_prefix}) # Default prefix
sysdirpattern="s/^%sysdir/%dir/g"
rpmprefix="rtems-4.11-"
- host_subdirs=autotools
CUSTOM_RPMPREFIX=no
;;
*)
sysdirpattern="s/^%sysdir/%dir/g"
- rpmprefix="custom-"
- host_subdirs=autotools
+ # Require rpmprefix, must not be rtems-RTEMS_API nor empty
+ if test -z "$rpmprefix"; then :
+
+ as_fn_error $? "--enable-rpmprefix required for building with non-default --prefix" "$LINENO" 5
+
+fi
CUSTOM_RPMPREFIX=yes
;;
esac
diff --git a/configure.ac b/configure.ac
index d404339..e5ad59c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,33 +52,31 @@ AC_SUBST(rpmprefix)
case "$prefix" in
/usr)
- sysdirpattern="/%sysdir/d"
- rpmprefix=
+# Do not replace system-provided packages
host_subdirs=
- CUSTOM_RPMPREFIX=yes
;;
-/usr/local)
- sysdirpattern="/%sysdir/d"
- rpmprefix="local-"
+*)
host_subdirs=autotools
- CUSTOM_RPMPREFIX=yes
;;
-/opt/rtems)
- sysdirpattern="s/^%sysdir/%dir/g"
- rpmprefix="rtems-"
- host_subdirs=autotools
+esac
+
+case "$prefix" in
+/usr)
+ sysdirpattern="/%sysdir/d"
+ rpmprefix=
CUSTOM_RPMPREFIX=yes
;;
NONE|${ac_default_prefix}) # Default prefix
sysdirpattern="s/^%sysdir/%dir/g"
rpmprefix="[rtems-]RTEMS_API[-]"
- host_subdirs=autotools
CUSTOM_RPMPREFIX=no
;;
*)
sysdirpattern="s/^%sysdir/%dir/g"
- rpmprefix="custom-"
- host_subdirs=autotools
+ # Require rpmprefix, must not be rtems-RTEMS_API nor empty
+ AS_IF([test -z "$rpmprefix"],[
+ AC_MSG_ERROR([--enable-rpmprefix required for building with non-default --prefix])
+ ])
CUSTOM_RPMPREFIX=yes
;;
esac
More information about the vc
mailing list