[autoconf/f17] Support the 'config.site' file in /usr/share

Pavel Raiskup praiskup at fedoraproject.org
Mon Jan 14 13:33:02 UTC 2013


commit f3702714bc3ed011d615ae88cd5bf89524744973
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
    
    Resolves: #772999

 autoconf.spec |    9 ++++++++-
 config.site   |   22 ++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/autoconf.spec b/autoconf.spec
index df90c00..8ffe20b 100644
--- a/autoconf.spec
+++ b/autoconf.spec
@@ -1,11 +1,12 @@
 Summary:    A GNU tool for automatically configuring source code
 Name:       autoconf
 Version:    2.68
-Release:    5%{?dist}
+Release:    6%{?dist}
 License:    GPLv2+ and GFDL
 Group:      Development/Tools
 Source:     http://ftpmirror.gnu.org/autoconf/autoconf-%{version}.tar.xz
 Patch0:     autoconf-2.68-selfcheckfailure.patch
+Source1:    config.site
 URL:        http://www.gnu.org/software/autoconf/
 BuildArch: noarch
 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -73,6 +74,8 @@ make check
 %install
 rm -rf ${RPM_BUILD_ROOT}
 make install DESTDIR=$RPM_BUILD_ROOT
+mkdir -p %{buildroot}/share
+install -m 0644 %{SOURCE1} %{buildroot}%{_datadir}
 
 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
 
@@ -94,6 +97,7 @@ fi
 # don't include standards.info, because it comes from binutils...
 %exclude %{_infodir}/standards*
 %{_datadir}/autoconf/
+%{_datadir}/config.site
 %exclude %{_datadir}/autoconf/INSTALL
 %dir %{_datadir}/emacs/
 %{_datadir}/emacs/site-lisp/
@@ -101,6 +105,9 @@ fi
 %doc AUTHORS COPYING* ChangeLog NEWS README THANKS TODO
 
 %changelog
+* Mon Jan 14 2013 Pavel Raiskup <praiskup at redhat.com> - 2.69-6
+- Support the 'config.site' file in /usr/share (#772999)
+
 * Wed Sep 26 2012 Pavel Raiskup <praiskup at redhat.com> - 2.68-5
 - do not install the "INSTALL" documentation file (#661623)
 
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