- Fix build with new coreutils

- Hardcode paths in unicode_start to avoid a few file lookups (#178329)
- Drop unnecessary Prereq: sed mktemp
This commit is contained in:
Miloslav Trmac 2006-01-20 17:58:10 +00:00
parent f003445ecf
commit dc8a15bb9f

View File

@ -1,15 +1,14 @@
Summary: Tools for configuring the console (keyboard, virtual terminals, etc.) Summary: Tools for configuring the console (keyboard, virtual terminals, etc.)
Name: kbd Name: kbd
Version: 1.12 Version: 1.12
Release: 12.1 Release: 13
License: GPL License: GPL
Group: System Environment/Base Group: System Environment/Base
Source0: ftp://ftp.kernel.org/pub/linux/utils/kbd/kbd-%{version}.tar.bz2 Source0: ftp://ftp.kernel.org/pub/linux/utils/kbd/kbd-%{version}.tar.bz2
Source1: ftp://ftp.kernel.org/pub/linux/utils/kbd/kbd-%{version}.tar.bz2.sign Source1: ftp://ftp.kernel.org/pub/linux/utils/kbd/kbd-%{version}.tar.bz2.sign
Source2: kbdrate.apps Source2: kbdrate.apps
Source3: kbdrate.pam Source3: kbdrate.pam
Source4: keytable.init Source4: kbd-latsun-fonts.tar.bz2
Source5: kbd-latsun-fonts.tar.bz2
Requires: pam >= 0.66-4, /etc/pam.d/system-auth, usermode Requires: pam >= 0.66-4, /etc/pam.d/system-auth, usermode
BuildRoot: %{_tmppath}/%{name}-root BuildRoot: %{_tmppath}/%{name}-root
Patch0: kbd-1.08-sparc.patch Patch0: kbd-1.08-sparc.patch
@ -25,7 +24,7 @@ Patch9: kbd-1.12-no-user-map.patch
Obsoletes: console-tools Obsoletes: console-tools
Provides: console-tools Provides: console-tools
Conflicts: util-linux < 2.11r-9 Conflicts: util-linux < 2.11r-9
Prereq: sed mktemp initscripts >= 5.86-1 Prereq: initscripts >= 5.86-1
ExcludeArch: s390 s390x ExcludeArch: s390 s390x
%description %description
@ -35,7 +34,7 @@ fonts, the virtual terminals and font files.
%prep %prep
%setup -q -a 5 %setup -q -a 4
%patch0 -p1 -b .sparc %patch0 -p1 -b .sparc
%patch1 -p1 %patch1 -p1
%patch2 -p1 -b .terminal %patch2 -p1 -b .terminal
@ -69,7 +68,7 @@ export OLD_PO_FILE_INPUT=yes
# We don't use % {configure} because the ./configure included here does not # We don't use % {configure} because the ./configure included here does not
# understand most of the options. # understand most of the options.
CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
./configure --prefix=/ --datadir=/lib/kbd --mandir=%{_mandir} ./configure --prefix=%{_prefix} --datadir=/lib/kbd --mandir=%{_mandir}
# Override CFLAGS because this configure ignores them anyway, and LDFLAGS # Override CFLAGS because this configure ignores them anyway, and LDFLAGS
# because it defaults to -s, but that's a build policy decision. # because it defaults to -s, but that's a build policy decision.
@ -79,29 +78,27 @@ make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
# Basic install. # Basic install.
make install \ make install DESTDIR=$RPM_BUILD_ROOT
BINDIR=$RPM_BUILD_ROOT/%{_bindir} \
LOADKEYS_BINDIR=$RPM_BUILD_ROOT/bin \
MANDIR=$RPM_BUILD_ROOT/%{_mandir} \
datadir=$RPM_BUILD_ROOT/lib/kbd \
DATADIR=$RPM_BUILD_ROOT/lib/kbd \
gnulocaledir=$RPM_BUILD_ROOT/%{_datadir}/locale \
localedir=$RPM_BUILD_ROOT/%{_datadir}/locale
# Move binaries which we use before /usr is mounted from %{_bindir} to /bin. # Move binaries which we use before /usr is mounted from %{_bindir} to /bin.
for binary in setfont dumpkeys kbd_mode unicode_start unicode_stop ; do for binary in setfont dumpkeys kbd_mode unicode_start unicode_stop ; do
mv $RPM_BUILD_ROOT%{_bindir}/$binary $RPM_BUILD_ROOT/bin mv $RPM_BUILD_ROOT%{_bindir}/$binary $RPM_BUILD_ROOT/bin
done done
# Some microoptimization
sed -i -e 's,\<kbd_mode\>,/bin/kbd_mode,g;s,\<setfont\>,/bin/setfont,g' \
$RPM_BUILD_ROOT/bin/unicode_start
# Set up kbdrate to be userhelpered. # Set up kbdrate to be userhelpered.
mkdir -p $RPM_BUILD_ROOT%{_sbindir} mkdir -p $RPM_BUILD_ROOT%{_sbindir}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
mv $RPM_BUILD_ROOT%{_bindir}/kbdrate $RPM_BUILD_ROOT%{_sbindir} mv $RPM_BUILD_ROOT%{_bindir}/kbdrate $RPM_BUILD_ROOT%{_sbindir}
ln -s consolehelper $RPM_BUILD_ROOT%{_bindir}/kbdrate ln -s consolehelper $RPM_BUILD_ROOT%{_bindir}/kbdrate
install -c -m644 $RPM_SOURCE_DIR/kbdrate.apps \ install -c -m644 %{SOURCE2} \
$RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/kbdrate $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/kbdrate
install -c -m644 $RPM_SOURCE_DIR/kbdrate.pam \ install -c -m644 %{SOURCE3} \
$RPM_BUILD_ROOT%{_sysconfdir}/pam.d/kbdrate $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/kbdrate
%find_lang %{name} %find_lang %{name}
@ -124,6 +121,11 @@ install -c -m644 $RPM_SOURCE_DIR/kbdrate.pam \
%config %{_sysconfdir}/pam.d/* %config %{_sysconfdir}/pam.d/*
%changelog %changelog
* Fri Jan 20 2006 Miloslav Trmac <mitr@redhat.com> - 1.12-13
- Fix build with new coreutils
- Hardcode paths in unicode_start to avoid a few file lookups (#178329)
- Drop unnecessary Prereq: sed mktemp
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com> * Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt - rebuilt