specfile: Use '%{buildroot}" macro
This commit is contained in:
parent
aaecf19272
commit
fdd44b835d
45
bash.spec
45
bash.spec
@ -127,7 +127,7 @@ perl -pi -e 's,bashref\.info,bash.info,' doc/bashref.info
|
|||||||
|
|
||||||
%make_install
|
%make_install
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc
|
mkdir -p %{buildroot}/etc
|
||||||
|
|
||||||
# make manpages for bash builtins as per suggestion in DOC/README
|
# make manpages for bash builtins as per suggestion in DOC/README
|
||||||
pushd doc
|
pushd doc
|
||||||
@ -146,33 +146,33 @@ for i in echo pwd test kill; do
|
|||||||
perl -pi -e "s, , ,g" man.pages
|
perl -pi -e "s, , ,g" man.pages
|
||||||
done
|
done
|
||||||
|
|
||||||
install -c -m 644 builtins.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/builtins.1
|
install -c -m 644 builtins.1 %{buildroot}%{_mandir}/man1/builtins.1
|
||||||
|
|
||||||
for i in `cat man.pages` ; do
|
for i in `cat man.pages` ; do
|
||||||
echo .so man1/builtins.1 > ${RPM_BUILD_ROOT}%{_mandir}/man1/$i.1
|
echo .so man1/builtins.1 > %{buildroot}%{_mandir}/man1/$i.1
|
||||||
chmod 0644 ${RPM_BUILD_ROOT}%{_mandir}/man1/$i.1
|
chmod 0644 %{buildroot}%{_mandir}/man1/$i.1
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Link bash man page to sh so that man sh works.
|
# Link bash man page to sh so that man sh works.
|
||||||
ln -s bash.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/sh.1
|
ln -s bash.1 %{buildroot}%{_mandir}/man1/sh.1
|
||||||
|
|
||||||
# Not for printf, true and false (conflict with coreutils)
|
# Not for printf, true and false (conflict with coreutils)
|
||||||
rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/printf.1
|
rm -f %{buildroot}/%{_mandir}/man1/printf.1
|
||||||
rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/true.1
|
rm -f %{buildroot}/%{_mandir}/man1/true.1
|
||||||
rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/false.1
|
rm -f %{buildroot}/%{_mandir}/man1/false.1
|
||||||
|
|
||||||
ln -sf bash $RPM_BUILD_ROOT%{_bindir}/sh
|
ln -sf bash %{buildroot}%{_bindir}/sh
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
rm -f %{buildroot}%{_infodir}/dir
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/skel
|
mkdir -p %{buildroot}/etc/skel
|
||||||
install -c -m644 %SOURCE1 $RPM_BUILD_ROOT/etc/skel/.bashrc
|
install -c -m644 %SOURCE1 %{buildroot}/etc/skel/.bashrc
|
||||||
install -c -m644 %SOURCE2 $RPM_BUILD_ROOT/etc/skel/.bash_profile
|
install -c -m644 %SOURCE2 %{buildroot}/etc/skel/.bash_profile
|
||||||
install -c -m644 %SOURCE3 $RPM_BUILD_ROOT/etc/skel/.bash_logout
|
install -c -m644 %SOURCE3 %{buildroot}/etc/skel/.bash_logout
|
||||||
LONG_BIT=$(getconf LONG_BIT)
|
LONG_BIT=$(getconf LONG_BIT)
|
||||||
mv $RPM_BUILD_ROOT%{_bindir}/bashbug \
|
mv %{buildroot}%{_bindir}/bashbug \
|
||||||
$RPM_BUILD_ROOT%{_bindir}/bashbug-"${LONG_BIT}"
|
%{buildroot}%{_bindir}/bashbug-"${LONG_BIT}"
|
||||||
ln -s bashbug-"${LONG_BIT}" $RPM_BUILD_ROOT%{_bindir}/bashbug
|
ln -s bashbug-"${LONG_BIT}" %{buildroot}%{_bindir}/bashbug
|
||||||
ln -s bashbug.1 $RPM_BUILD_ROOT/%{_mandir}/man1/bashbug-"$LONG_BIT".1
|
ln -s bashbug.1 %{buildroot}/%{_mandir}/man1/bashbug-"$LONG_BIT".1
|
||||||
|
|
||||||
# Fix missing sh-bangs in example scripts (bug #225609).
|
# Fix missing sh-bangs in example scripts (bug #225609).
|
||||||
for script in \
|
for script in \
|
||||||
@ -191,24 +191,23 @@ done
|
|||||||
# bug #820192, need to add execable alternatives for regular built-ins
|
# bug #820192, need to add execable alternatives for regular built-ins
|
||||||
for ea in alias bg cd command fc fg getopts hash jobs read type ulimit umask unalias wait
|
for ea in alias bg cd command fc fg getopts hash jobs read type ulimit umask unalias wait
|
||||||
do
|
do
|
||||||
cat <<EOF > "$RPM_BUILD_ROOT"/%{_bindir}/"$ea"
|
cat <<EOF > "%{buildroot}"/%{_bindir}/"$ea"
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
builtin $ea "\$@"
|
builtin $ea "\$@"
|
||||||
EOF
|
EOF
|
||||||
chmod +x "$RPM_BUILD_ROOT"/%{_bindir}/"$ea"
|
chmod +x "%{buildroot}"/%{_bindir}/"$ea"
|
||||||
done
|
done
|
||||||
|
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
|
|
||||||
# copy doc to /usr/share/doc
|
# copy doc to /usr/share/doc
|
||||||
cat /dev/null > %{name}-doc.files
|
cat /dev/null > %{name}-doc.files
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_pkgdocdir}/doc
|
mkdir -p %{buildroot}/%{_pkgdocdir}/doc
|
||||||
# cp -p COPYING $RPM_BUILD_ROOT/%{_pkgdocdir}
|
|
||||||
# loadables aren't buildable
|
# loadables aren't buildable
|
||||||
rm -rf examples/loadables
|
rm -rf examples/loadables
|
||||||
for file in CHANGES COMPAT NEWS NOTES POSIX RBASH README examples
|
for file in CHANGES COMPAT NEWS NOTES POSIX RBASH README examples
|
||||||
do
|
do
|
||||||
cp -rp "$file" $RPM_BUILD_ROOT/%{_pkgdocdir}/"$file"
|
cp -rp "$file" %{buildroot}/%{_pkgdocdir}/"$file"
|
||||||
echo "%%doc %{_pkgdocdir}/$file" >> %{name}-doc.files
|
echo "%%doc %{_pkgdocdir}/$file" >> %{name}-doc.files
|
||||||
done
|
done
|
||||||
echo "%%doc %{_pkgdocdir}/doc" >> %{name}-doc.files
|
echo "%%doc %{_pkgdocdir}/doc" >> %{name}-doc.files
|
||||||
|
Loading…
Reference in New Issue
Block a user