[autoconf] Support the 'config.site' file in /usr/share
Pavel Raiskup
praiskup at fedoraproject.org
Tue Jan 8 14:58:32 UTC 2013
commit c047b39ee38e9be66500bfb37061ea51cf817803
Author: Pavel Raiskup <praiskup at redhat.com>
Date: Tue Jan 8 15:37:43 2013 +0100
Support the 'config.site' file in /usr/share
1. Generated configure scripts will now automatically set the correct
library directory ($libdir) on both 32/64 bit systems when
'./configure --prefix=/usr' is run.
2. The same way as ^^, config.site causes the installation under /usr prefix
to respect File System Hierarchy (FHS) defaults
autoconf.spec | 6 +++++-
config.site | 22 ++++++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/autoconf.spec b/autoconf.spec
index cf95b5c..2a37196 100644
--- a/autoconf.spec
+++ b/autoconf.spec
@@ -4,7 +4,8 @@ Version: 2.69
Release: 6%{?dist}
License: GPLv2+ and GFDL
Group: Development/Tools
-Source: http://ftpmirror.gnu.org/autoconf/autoconf-%{version}.tar.xz
+Source0: http://ftpmirror.gnu.org/autoconf/autoconf-%{version}.tar.xz
+Source1: config.site
URL: http://www.gnu.org/software/autoconf/
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -67,6 +68,8 @@ make check # TESTSUITEFLAGS='1-198 200-' # will disable nr. 199.
%install
make install DESTDIR=%{buildroot}
+mkdir -p %{buildroot}/share
+install -m 0644 %{SOURCE1} %{buildroot}%{_datadir}
%post
/sbin/install-info %{_infodir}/autoconf.info %{_infodir}/dir || :
@@ -84,6 +87,7 @@ fi
# don't include info's TOP directory
%exclude %{_infodir}/dir
%{_datadir}/autoconf/
+%{_datadir}/config.site
%exclude %{_datadir}/autoconf/INSTALL
%dir %{_datadir}/emacs/
%{_datadir}/emacs/site-lisp/
diff --git a/config.site b/config.site
new file mode 100644
index 0000000..0c5209f
--- /dev/null
+++ b/config.site
@@ -0,0 +1,22 @@
+# This is the config.site file to satisfy FHS defaults when installing below
+# /usr.
+#
+# You may override this file by your config.site using the CONFIG_SITE env
+# variable.
+#
+# Note: This file includes also RHEL/Fedora fix for installing libraries into
+# "/lib/lib64" on 64bit systems.
+
+if test "$prefix" = /usr; then
+ test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc
+ test "$sharedstatedir" = '${prefix}/com' && sharedstatedir=/var
+ test "$localstatedir" = '${prefix}/var' && localstatedir=/var
+
+ ARCH=`uname -m`
+ for i in x86_64 ppc64 s390x aarch64; do
+ if test $ARCH = $i; then
+ test "$libdir" = '${exec_prefix}/lib' && libdir='${exec_prefix}/lib64'
+ break
+ fi
+ done
+fi
More information about the scm-commits
mailing list