mirror of
https://github.com/terrapkg/packages.git
synced 2026-05-31 09:01:55 +00:00
Fix (uutils-coreutils-replace): Symlinks and cleanup (#3297)
* Delete anda/system/uutils-coreutils-replace/coreutils-colorls.csh Signed-off-by: Gilver <rockgrub@disroot.org> * Delete anda/system/uutils-coreutils-replace/coreutils-colorls.sh Signed-off-by: Gilver <rockgrub@disroot.org> * AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Signed-off-by: Gilver <rockgrub@disroot.org> * Always the rel bump. ALWAYS THE Signed-off-by: Gilver <rockgrub@disroot.org> * Why not Signed-off-by: Gilver <rockgrub@disroot.org> * /usr/bin path Signed-off-by: Gilver <rockgrub@disroot.org> * Back to BUILDDIR Signed-off-by: Gilver <rockgrub@disroot.org> * More sums Signed-off-by: Gilver <rockgrub@disroot.org> * I don't want to overcomplicate this I guess Signed-off-by: Gilver <rockgrub@disroot.org> * Update uutils-coreutils-replace.spec Signed-off-by: Gilver <rockgrub@disroot.org> * Fix Signed-off-by: Gilver <rockgrub@disroot.org> --------- Signed-off-by: Gilver <rockgrub@disroot.org>
This commit is contained in:
@@ -1,63 +0,0 @@
|
||||
# skip everything for non-interactive shells
|
||||
if (! $?prompt) exit
|
||||
|
||||
# color-ls initialization
|
||||
if ( $?USER_LS_COLORS ) then
|
||||
if ( "$USER_LS_COLORS" != "" ) then
|
||||
#when USER_LS_COLORS defined do not override user
|
||||
#specified LS_COLORS and use them
|
||||
goto finish
|
||||
endif
|
||||
endif
|
||||
|
||||
alias ll 'ls -l'
|
||||
alias l. 'ls -d .*'
|
||||
set COLORS=/etc/DIR_COLORS
|
||||
|
||||
if ($?TERM) then
|
||||
if ( -e "/etc/DIR_COLORS.$TERM" ) then
|
||||
set COLORS="/etc/DIR_COLORS.$TERM"
|
||||
endif
|
||||
endif
|
||||
if ( -f ~/.dircolors ) set COLORS=~/.dircolors
|
||||
if ( -f ~/.dir_colors ) set COLORS=~/.dir_colors
|
||||
if ($?TERM) then
|
||||
if ( -f ~/.dircolors."$TERM" ) set COLORS=~/.dircolors."$TERM"
|
||||
if ( -f ~/.dir_colors."$TERM" ) set COLORS=~/.dir_colors."$TERM"
|
||||
endif
|
||||
set INCLUDE="`/usr/bin/cat "$COLORS" | /usr/bin/grep '^INCLUDE' | /usr/bin/cut -d ' ' -f2-`"
|
||||
|
||||
if ( ! -e "$COLORS" ) exit
|
||||
|
||||
set _tmp="`/usr/bin/mktemp .colorlsXXX -q --tmpdir=/tmp`"
|
||||
#if mktemp fails, exit when include was active, otherwise use $COLORS file
|
||||
if ( "$_tmp" == '' ) then
|
||||
if ( "$INCLUDE" == '' ) then
|
||||
eval "`/usr/bin/dircolors -c $COLORS`"
|
||||
endif
|
||||
goto cleanup
|
||||
endif
|
||||
|
||||
if ( "$INCLUDE" != '' ) /usr/bin/cat "$INCLUDE" >> $_tmp
|
||||
/usr/bin/grep -v '^INCLUDE' "$COLORS" >> $_tmp
|
||||
|
||||
eval "`/usr/bin/dircolors -c $_tmp`"
|
||||
|
||||
/usr/bin/rm -f $_tmp
|
||||
|
||||
if ( "$LS_COLORS" == '' ) exit
|
||||
cleanup:
|
||||
set color_none=`/usr/bin/sed -n '/^COLOR.*none/Ip' < $COLORS`
|
||||
if ( "$color_none" != '' ) then
|
||||
unset color_none
|
||||
exit
|
||||
endif
|
||||
unset color_none
|
||||
unset _tmp
|
||||
unset INCLUDE
|
||||
unset COLORS
|
||||
|
||||
finish:
|
||||
alias ll 'ls -l --color=auto'
|
||||
alias l. 'ls -d .* --color=auto'
|
||||
alias ls 'ls --color=auto'
|
||||
@@ -1,53 +0,0 @@
|
||||
# color-ls initialization
|
||||
|
||||
# Skip all for noninteractive shells.
|
||||
[ ! -t 0 ] && return
|
||||
|
||||
#when USER_LS_COLORS defined do not override user LS_COLORS, but use them.
|
||||
if [ -z "$USER_LS_COLORS" ]; then
|
||||
|
||||
alias ll='ls -l' 2>/dev/null
|
||||
alias l.='ls -d .*' 2>/dev/null
|
||||
|
||||
INCLUDE=
|
||||
COLORS=
|
||||
|
||||
for colors in "$HOME/.dir_colors.$TERM" "$HOME/.dircolors.$TERM" \
|
||||
"$HOME/.dir_colors" "$HOME/.dircolors"; do
|
||||
[ -e "$colors" ] && COLORS="$colors" && \
|
||||
INCLUDE="`/usr/bin/cat "$COLORS" | /usr/bin/grep '^INCLUDE' | /usr/bin/cut -d ' ' -f2-`" && \
|
||||
break
|
||||
done
|
||||
|
||||
[ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.$TERM" ] && \
|
||||
COLORS="/etc/DIR_COLORS.$TERM"
|
||||
|
||||
[ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS" ] && \
|
||||
COLORS="/etc/DIR_COLORS"
|
||||
|
||||
# Existence of $COLORS already checked above.
|
||||
[ -n "$COLORS" ] || return
|
||||
|
||||
if [ -e "$INCLUDE" ];
|
||||
then
|
||||
TMP="`/usr/bin/mktemp .colorlsXXX -q --tmpdir=/tmp`"
|
||||
[ -z "$TMP" ] && return
|
||||
|
||||
/usr/bin/cat "$INCLUDE" >> $TMP
|
||||
/usr/bin/grep -v '^INCLUDE' "$COLORS" >> $TMP
|
||||
|
||||
eval "`/usr/bin/dircolors --sh $TMP 2>/dev/null`"
|
||||
/usr/bin/rm -f $TMP
|
||||
else
|
||||
eval "`/usr/bin/dircolors --sh $COLORS 2>/dev/null`"
|
||||
fi
|
||||
|
||||
[ -z "$LS_COLORS" ] && return
|
||||
/usr/bin/grep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null && return
|
||||
fi
|
||||
|
||||
unset TMP COLORS INCLUDE
|
||||
|
||||
alias ll='ls -l --color=auto' 2>/dev/null
|
||||
alias l.='ls -d .* --color=auto' 2>/dev/null
|
||||
alias ls='ls --color=auto' 2>/dev/null
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
Name: uutils-coreutils-replace
|
||||
Version: 0.0.29
|
||||
Release: 1%?dist
|
||||
Release: 2%?dist
|
||||
Summary: Cross-platform Rust rewrite of the GNU coreutils
|
||||
License: MIT
|
||||
URL: https://github.com/uutils/coreutils
|
||||
@@ -41,7 +41,7 @@ This package replaces the GNU coreutils commands.
|
||||
%prep
|
||||
%setup -q -n coreutils-%version
|
||||
%cargo_prep_online
|
||||
cp %{SOURCE3} .
|
||||
/usr/bin/cp %{SOURCE3} .
|
||||
sed dircolors.hin \
|
||||
-e 's| 00;36$| 01;36|' \
|
||||
> DIR_COLORS
|
||||
@@ -54,25 +54,19 @@ sed dircolors.hin \
|
||||
%build
|
||||
|
||||
%install
|
||||
export CARGOFLAGS="-vv --verbose"
|
||||
install -p -c -Dm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/profile.d/colorls.sh
|
||||
install -p -c -Dm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d/colorls.csh
|
||||
install -p -c -Dm644 DIR_COLORS{,.lightbgcolor} %{buildroot}%{_sysconfdir}
|
||||
/usr/bin/rm dircolors.hin DIR_COLORS DIR_COLORS.lightbgcolor
|
||||
%make_install PROFILE_CMD='--profile=rpm' MULTICALL=n DESTDIR=%buildroot BUILDDIR=target/rpm PREFIX=%_prefix SELINUX_ENABLED=1 SKIP_UTILS='hostname kill more uptime' &
|
||||
wait
|
||||
ln -sr hashsum %{buildroot}%{_bindir}/sha1sum
|
||||
ln -sr hashsum %{buildroot}%{_bindir}/sha224sum
|
||||
ln -sr hashsum %{buildroot}%{_bindir}/sha256sum
|
||||
ln -sr hashsum %{buildroot}%{_bindir}/sha384sum
|
||||
ln -sr hashsum %{buildroot}%{_bindir}/sha512sum
|
||||
ln -sr hashsum %{buildroot}%{_bindir}/sha3-224sum
|
||||
ln -sr hashsum %{buildroot}%{_bindir}/sha3-256sum
|
||||
ln -sr hashsum %{buildroot}%{_bindir}/sha3-384sum
|
||||
ln -sr hashsum %{buildroot}%{_bindir}/sha3-512sum
|
||||
ln -sr hashsum %{buildroot}%{_bindir}/sha3sum
|
||||
ln -sr hashsum %{buildroot}%{_bindir}/shake128sum
|
||||
ln -sr hashsum %{buildroot}%{_bindir}/shake256sum
|
||||
/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/b2sum
|
||||
/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/md5sum
|
||||
/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/sha1sum
|
||||
/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/sha224sum
|
||||
/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/sha256sum
|
||||
/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/sha384sum
|
||||
/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/sha512sum
|
||||
|
||||
%define cmds() $(echo %1{runcon,arch,base{32,64,name,nc},cat,ch{grp,mod,own,root,con},cksum,comm,cp,csplit,cut,date,dd,df,dir{,colors,name},du,echo,env,expand,expr,factor,false,fmt,fold,groups,hashsum,head,host{id},id,install,join,link,ln,logname,ls,mk{dir,fifo,nod,temp},mv,nice,nl,nohup,nproc,numfmt,od,paste,pathchk,pinky,pr,printenv,printf,ptx,pwd,readlink,realpath,rm{,dir},seq,shred,shuf,sleep,sort,split,stat,stdbuf,sum,sync,tac,tail,tee,test,timeout,touch,tr,true,truncate,tsort,tty,uname,un{expand,iq,link},users,vdir,wc,who{,ami},yes}%2)
|
||||
cat <<EOF > files.txt
|
||||
@@ -95,18 +89,13 @@ cat files.txt
|
||||
%files -f files.txt
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{_bindir}/b2sum
|
||||
%{_bindir}/md5sum
|
||||
%{_bindir}/sha1sum
|
||||
%{_bindir}/sha224sum
|
||||
%{_bindir}/sha256sum
|
||||
%{_bindir}/sha384sum
|
||||
%{_bindir}/sha512sum
|
||||
%{_bindir}/sha3-224sum
|
||||
%{_bindir}/sha3-256sum
|
||||
%{_bindir}/sha3-384sum
|
||||
%{_bindir}/sha3-512sum
|
||||
%{_bindir}/sha3sum
|
||||
%{_bindir}/shake128sum
|
||||
%{_bindir}/shake256sum
|
||||
%config(noreplace) %{_sysconfdir}/DIR_COLORS
|
||||
%config(noreplace) %{_sysconfdir}/DIR_COLORS.lightbgcolor
|
||||
%{_sysconfdir}/profile.d/colorls.sh
|
||||
|
||||
Reference in New Issue
Block a user