Added x86_64 support.

This commit is contained in:
2005-06-16 16:18:15 +00:00
parent 1aac8d2a2b
commit 9835799623
12 changed files with 71 additions and 40 deletions

View File

@ -108,14 +108,14 @@ install-data-local:
@@LN_S@ rpm/rpmrc $(DESTDIR)$(libdir)/rpmrc
@rm -f $(DESTDIR)$(libdir)/rpmpopt
@@LN_S@ rpm/rpmpopt-$(VERSION) $(DESTDIR)$(libdir)/rpmpopt
@rm -f $(DESTDIR)$(libdir)/rpm/rpmt
@@LN_S@ rpmb $(DESTDIR)$(libdir)/rpm/rpmt
@rm -f $(DESTDIR)$(libdir)/rpm/rpme
@@LN_S@ rpmi $(DESTDIR)$(libdir)/rpm/rpme
@rm -f $(DESTDIR)$(libdir)/rpm/rpmu
@@LN_S@ rpmi $(DESTDIR)$(libdir)/rpm/rpmu
@rm -f $(DESTDIR)$(libdir)/rpm/rpmv
@@LN_S@ rpmq $(DESTDIR)$(libdir)/rpm/rpmv
@rm -f $(DESTDIR)$(prefix)/lib/rpm/rpmt
@@LN_S@ rpmb $(DESTDIR)$(prefix)/lib/rpm/rpmt
@rm -f $(DESTDIR)$(prefix)/lib/rpm/rpme
@@LN_S@ rpmi $(DESTDIR)$(prefix)/lib/rpm/rpme
@rm -f $(DESTDIR)$(prefix)/lib/rpm/rpmu
@@LN_S@ rpmi $(DESTDIR)$(prefix)/lib/rpm/rpmu
@rm -f $(DESTDIR)$(prefix)/lib/rpm/rpmv
@@LN_S@ rpmq $(DESTDIR)$(prefix)/lib/rpm/rpmv
rm -f $(DESTDIR)$(bindir)/rpmbuild
@LN_S@ ../lib/rpm/rpmb $(DESTDIR)$(bindir)/rpmbuild
rm -f $(DESTDIR)$(bindir)/rpmquery

View File

@ -1,6 +1,6 @@
#!/bin/sh -ef
#
# Copyright (C) 2000-2004 Dmitry V. Levin <ldv@altlinux.org>
# Copyright (C) 2000-2005 Dmitry V. Levin <ldv@altlinux.org>
# $Id$
#
# find-provides - generate list of linux-specific package provides.
@ -219,7 +219,7 @@ FindTclProvs()
$r"
}
DEF_RPM_FINDPROV_LIB_PATH='/lib:/usr/lib:/usr/X11R6/lib'
DEF_RPM_FINDPROV_LIB_PATH='/lib:/usr/lib:/usr/X11R6/lib:/lib64:/usr/lib64:/usr/X11R6/lib64'
: ${RPM_FINDPROV_LIB_PATH:=$DEF_RPM_FINDPROV_LIB_PATH}
lookup_path()
@ -240,7 +240,7 @@ FindLibProvs()
{
[ -n "$FIND_LIBS" ] || return 0
local f dir name dump
local f dir name dump braces= suffix=
f="$1"
dir="${fname%/*}"
[ -n "$dir" ] || return 0
@ -251,7 +251,9 @@ FindLibProvs()
if dump="$(objdump -p "$f")"; then
local soname
soname="$(printf %s\\n "$dump" |awk '/SONAME/ {print $2}')" || return 1
soname="$(printf %s\\n "$dump" |sed -ne 's/^[[:space:]]*SONAME[[:space:]]\+\([^[:space:]]\+\)[[:space:]]*$/\1/p')" || return 1
suffix="$(printf %s\\n "$dump" |sed -ne 's/^.*file format \(elf64\).*$/(64bit)/p')" || return 1
[ -z "$suffix" ] || braces='()'
if [ -n "$soname" ]; then
while :; do
# For libraries with soname, ignore all but files named as soname.
@ -274,17 +276,17 @@ FindLibProvs()
lookup_path "$dir" "$DEF_RPM_FINDPROV_LIB_PATH" || nondefdir="$dir"
# Output soname.
printf %s\\n "$soname"
[ -z "$nondefdir" ] || printf "$nondefdir/%s\\n" "$soname"
printf %s\\n "$soname$braces$suffix"
[ -z "$nondefdir" ] || printf "$nondefdir/%s\\n" "$soname$braces$suffix"
# Output version definitions.
printf %s\\n "$dump" | awk "-vsoname=$soname" "-vnondefdir=$nondefdir" '
printf %s\\n "$dump" | awk "-vsoname=$soname" "-vnondefdir=$nondefdir" "-vsuffix=$suffix" '
BEGIN {start=0;}
/^Version definitions:$/ {start=1;}
/^[0-9]/ && (start==1) && ($4!="") && ($4!=soname) {
printf("%s(%s)\n",soname,$4)
printf("%s(%s)%s\n",soname,$4,suffix)
if (nondefdir!="")
printf("%s/%s(%s)\n",nondefdir,soname,$4)
printf("%s/%s(%s)%s\n",nondefdir,soname,$4,suffix)
}
/^$/ {start=0;}
' || return 1
@ -293,7 +295,7 @@ FindLibProvs()
done
else
# Ignore symlinks for libraries without soname.
[ -L "$f" ] || printf %s\\n "${f##*/}"
[ -L "$f" ] || printf %s\\n "${f##*/}$braces$suffix"
fi
fi
}

View File

@ -1,7 +1,7 @@
#!/bin/sh -ef
#
# $Id$
# Copyright (C) 2000-2004 Dmitry V. Levin <ldv@altlinux.org>
# Copyright (C) 2000-2005 Dmitry V. Levin <ldv@altlinux.org>
#
# find-requires - generate list of linux-specific package requires.
# Inspired by tool with same name from RPM distribution.
@ -255,24 +255,26 @@ FindLibReqs()
{
[ -n "$FIND_LIBS" ] || return 0
local f d
local f d braces= suffix=
f="$1"
if d="$(objdump -p "$f")"; then
# Shared library dependencies, glibc version references.
printf %s\\n "$d" |awk '
suffix="$(printf %s\\n "$d" |sed -ne 's/^.*file format \(elf64\).*$/(64bit)/p')" || return 1
[ -z "$suffix" ] || braces='()'
printf %s\\n "$d" |awk "-vsuffix=$suffix" "-vbraces=$braces" '
BEGIN {start_shared=0; start_version=0; lib_name="";}
/^($)/ {start_shared=0; start_version=0; lib_name=""; next;}
/^private/ {start_shared=0; start_version=0; lib_name=""; next;}
/^Dynamic Section:$/ {start_shared=1; next;}
/^Version References:$/ {start_version=1; next;}
(start_version==1) && /^ *required from/ {sub(/:/, "", $3); lib_name=$3; next;}
(start_shared==1) && /^ *NEEDED/ {print $2; next;}
(start_version==1) && (lib_name!="") && ($4!="") {print lib_name "(" $4 ")";}
(start_shared==1) && /^ *NEEDED/ {print $2 braces suffix; next;}
(start_version==1) && (lib_name!="") && ($4!="") {print lib_name "(" $4 ")" suffix;}
'
if [ -n "$FIND_LIBPERL" -a -z "$libperl_so" -a -z "${f##*/usr/lib/perl?/*/auto/*.so}" ]; then
libperl_so=`perl -MConfig -e 'print "$Config{libperl}\n"'`
printf %s\\n "$libperl_so"
printf %s\\n "$libperl_so$braces$suffix"
fi
fi
}

View File

@ -41,7 +41,7 @@ case "$arch" in
powerpc*|ppc*) SUBSTS='s_ppc64_ppc_ s_ppc\([^6]\|$\)_ppc64\1_' ;;
*) SUBSTS=y___ ;;
esac
base_arch=`echo $arch | sed -e 's_i?86_i386_;s_sparc.*_sparc_;s_alpha.*_alpha_;s_\(powerpc\|ppc\).*_ppc_'`
base_arch=`echo $arch | sed -e 's_i?86_i386_;s_sparc.*_sparc_;s_alpha.*_alpha_;s_\(powerpc\|ppc\).*_ppc_;s,amd64,x86_64,'`
for SUBST in $SUBSTS ; do
ARCH=`echo $arch | sed -e $SUBST`
@ -62,6 +62,7 @@ for SUBST in $SUBSTS ; do
sparc-linux) MULTILIBNO=1 ;;
sparcv9-linux) MULTILIBNO=1 ;;
sparc64-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-sparc64-linux; LIB=lib64; MULTILIBNO=2 ;;
x86_64-linux) LIB=lib64; MULTILIBNO=2 ;;
esac
if [ -n "$MULTILIBNO" ]; then

View File

@ -350,7 +350,7 @@
@alt@%_man9dir %_mandir/man9
@alt@
@alt@# Menu directories.
@alt@%_menudir %_libdir/menu
@alt@%_menudir %_prefix/lib/menu
@alt@%_iconsdir %_datadir/icons
@alt@%_miconsdir %_iconsdir/mini
@alt@%_liconsdir %_iconsdir/large
@ -427,7 +427,7 @@
@alt@%_python_req_skip ""
@alt@%_python_compile_method ALL
@alt@%_python_compile_exclude /usr/share/doc
@alt@%_python_compile_include /usr/lib
@alt@%_python_compile_include /usr/%_lib
@alt@%_python_compile_deep 20
@alt@%_python_compile_skip_x 1
@alt@%_python_compile_clean 1
@ -455,7 +455,7 @@
@alt@%_findreq_skiplist %_docdir/*
@alt@%_findprov_skiplist %_docdir/*
@alt@
@alt@%_findprov_lib_path /lib:/usr/lib:/usr/X11R6/lib
@alt@%_findprov_lib_path /lib:/usr/lib:/usr/X11R6/lib:/lib64:/usr/lib64:/usr/X11R6/lib64
@alt@
@alt@%set_cleanup_method() %global _cleanup_method %*
@alt@%set_compress_method() %global _compress_method %*

View File

@ -18,7 +18,7 @@ mylibs= \
LDADD =
pythondir = $(prefix)/lib/python${PYVER}/site-packages
pythondir = $(prefix)/$(lib)/python${PYVER}/site-packages
python_PROGRAMS = rpmmodule.so
noinst_PROGRAMS = poptmodule.so

View File

@ -18,7 +18,9 @@ optflags: i686 %optflags_default -march=i686
optflags: k6 %optflags_default -march=k6
optflags: athlon %optflags_default -march=athlon
optflags: pentium4 %optflags_default -march=pentium4
optflags: amd64 %optflags_default
optflags: ia64 %optflags_default
optflags: x86_64 %optflags_default
# XXX Please note that -mieee has been added in rpm-3.0.5.
optflags: alpha -O2 -mieee -mcpu=ev4
@ -75,6 +77,9 @@ arch_canon: k6: k6 1
arch_canon: i586: i586 1
arch_canon: i486: i486 1
arch_canon: i386: i386 1
arch_canon: amd64: amd64 1
arch_canon: x86_64: x86_64 1
arch_canon: ia32e: ia32e 1
arch_canon: alpha: alpha 2
arch_canon: alphaev5: alphaev5 2
@ -166,6 +171,10 @@ buildarchtranslate: osfmach3_i386: i386
buildarchtranslate: ia64: ia64
buildarchtranslate: x86_64: x86_64
buildarchtranslate: amd64: x86_64
buildarchtranslate: ia32e: x86_64
buildarchtranslate: pentium4: pentium4
buildarchtranslate: athlon: athlon
buildarchtranslate: i686: i686
@ -270,7 +279,11 @@ arch_compat: i370: noarch
arch_compat: s390: noarch
arch_compat: s390x: s390 noarch
arch_compat: ia64: i686 noarch
arch_compat: ia64: noarch
arch_compat: x86_64: amd64 athlon noarch
arch_compat: amd64: x86_64 athlon noarch
arch_compat: ia32e: x86_64 athlon noarch
os_compat: IRIX64: IRIX
os_compat: solaris2.7: solaris2.3 solaris2.4 solaris2.5 solaris2.6
@ -301,6 +314,10 @@ os_compat: bsdi4.0: bsdi
buildarch_compat: ia64: noarch
buildarch_compat: x86_64: noarch
buildarch_compat: amd64: x86_64
buildarch_compat: ia32e: x86_64
buildarch_compat: pentium4: i686
buildarch_compat: athlon: i686 k6
buildarch_compat: i686: i586

View File

@ -3,7 +3,7 @@
# brp-adjust_libraries - update symbolic links to shared libraries.
#
# $Id$
# Copyright (C) 2000,2003 Dmitry V. Levin <ldv@altlinux.org>
# Copyright (C) 2000,2003,2005 Dmitry V. Levin <ldv@altlinux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -25,7 +25,7 @@ ValidateBuildRoot
cd "$RPM_BUILD_ROOT"
libs=`find -type d -name lib`
libs=`find -type d -name lib -o -name lib64`
if [ -n "$libs" ]; then
echo "Adjusting library links in $RPM_BUILD_ROOT"

View File

@ -3,7 +3,7 @@
# brp-cleanup - cleanup buildroot.
#
# $Id$
# Copyright (C) 2000-2004 Dmitry V. Levin <ldv@altlinux.org>
# Copyright (C) 2000-2005 Dmitry V. Levin <ldv@altlinux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -64,7 +64,7 @@ find .$RPM_CLEANUP_TOPDIR -type d -name CVS -print0 |
xargs -r0 rm -vrf --
if [ -z "$RPM_KEEP_LIBTOOL_FILES" ]; then
for d in ./lib ./usr/lib ./usr/X11R6/lib; do
for d in ./lib ./usr/lib ./usr/X11R6/lib ./lib64 ./usr/lib64 ./usr/X11R6/lib64; do
[ -d "$d" ] || continue
find "$d" -mindepth 1 -maxdepth 1 -type f -name 'lib*.la' -print0 |
xargs -r0 rm -fv --
@ -78,7 +78,7 @@ s,^\(#\?\)auth[[:space:]]\+,\1auth ,g
s,^\(#\?\)account[[:space:]]\+,\1account ,g
s,^\(#\?\)password[[:space:]]\+,\1password ,g
s,^\(#\?\)session[[:space:]]\+,\1session ,g
s,\([[:space:]]\)/lib/security/\(pam_\),\1\2,g
s,\([[:space:]]\)/lib\(64\)\?/security/\(pam_\),\1\3,g
s,\([[:space:]]\)required[[:space:]]\+pam_stack.so[[:space:]]\+service=,\1include ,g
' --
fi

View File

@ -3,7 +3,7 @@
# brp-fixup - Misc fixups.
#
# $Id$
# Copyright (C) 2002,2003,2004 Dmitry V. Levin <ldv@altlinux.org>
# Copyright (C) 2002-2005 Dmitry V. Levin <ldv@altlinux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -81,6 +81,11 @@ if [ -n "$FIXUP_PKGCONFIG" -a -d ./usr/lib/pkgconfig ]; then
xargs -r0 @RPMCONFIGDIR@/fixup-pkgconfig
fi
if [ -n "$FIXUP_PKGCONFIG" -a -d ./usr/lib64/pkgconfig ]; then
find ./usr/lib64/pkgconfig -maxdepth 1 -type f -name \*.pc -print0 |
xargs -r0 @RPMCONFIGDIR@/fixup-pkgconfig
fi
if [ -n "$FIXUP_LIBTOOL" ]; then
find .$RPM_FIXUP_TOPDIR -type f -name \*.la -print0 |
xargs -r0 @RPMCONFIGDIR@/fixup-libtool

View File

@ -3,7 +3,7 @@
# fixup-shared - fix permissions of libraries.
#
# $Id$
# Copyright (C) 2003, 2004 Dmitry V. Levin <ldv@altlinux.org>
# Copyright (C) 2003-2005 Dmitry V. Levin <ldv@altlinux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -41,6 +41,8 @@ for file in "$@"; do
continue
fi
[ -n "${file##*/lib64/ld-*.so}" ] || continue
chmod -v u+w,a-x,ug-s "$file"
;;
esac

View File

@ -1,7 +1,7 @@
#!/bin/sh -e
#
# $Id$
# Copyright (C) 2001,2003 Dmitry V. Levin <ldv@altlinux.org>
# Copyright (C) 2001,2003,2005 Dmitry V. Levin <ldv@altlinux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -36,11 +36,13 @@ fi
# hack for "buildreq -bi".
[ -f "$RPM_LIBDIR/libpam.so" ] ||:
[ "$RPM_LIB" != 'lib64' ] || LIB64='()(64bit)'
# pam_module.so
sed -ne 's#^\(account\|auth\|password\|session\)[[:space:]]\+\(requisite\|required\|sufficient\|optional\)[[:space:]]\+\(/lib[0-9]*/security/\)\?\([^.[:space:]]\+\.so\)\($\|[[:space:]].*\)#\4'$PAM_SO_SUFFIX'#pg' <"$file" |sort -u
sed -ne 's#^\(account\|auth\|password\|session\)[[:space:]]\+\(requisite\|required\|sufficient\|optional\)[[:space:]]\+\(/lib[0-9]*/security/\)\?\([^.[:space:]]\+\.so\)\($\|[[:space:]].*\)#\4'$PAM_SO_SUFFIX$LIB64'#pg' <"$file" |sort -u
# pam_module.so*
sed -ne 's#^\(account\|auth\|password\|session\)[[:space:]]\+\(requisite\|required\|sufficient\|optional\)[[:space:]]\+\(/lib[0-9]*/security/\)\?\([^.[:space:]]\+\.so[^[:space:]]\+\).*#\4#pg' <"$file" |sort -u
sed -ne 's#^\(account\|auth\|password\|session\)[[:space:]]\+\(requisite\|required\|sufficient\|optional\)[[:space:]]\+\(/lib[0-9]*/security/\)\?\([^.[:space:]]\+\.so[^[:space:]]\+\).*#\4'$LIB64'#pg' <"$file" |sort -u
# libpam(include)
sed -ne 's#^\(account\|auth\|password\|session\)[[:space:]]\+include[[:space:]].*#libpam(include)#pg' <"$file" |sort -u