Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37712810
en ru br
ALT Linux repos
4.0: 4.3.20-alt1

Group :: File tools
RPM: gnuit

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Summary: A set of GNU Interactive Tools.
Name: gnuit
Version: 4.3.20
Release: alt1
Copyright: GPL
Group: File tools
URL: http://www.hulubei.net/tudor/git/
Packager: Alexey Gladkov <legion at altlinux.ru>

Source0: git-%version.tar
Patch0: git-alt-fix-configure.patch
Patch1: git-alt-rename.patch
Patch2: git-alt-rename-envs.patch
Patch3: git-4.3.20-option-fix.patch
Patch4: git-alt-gitaction-fix.patch

%define _libexecdir %_prefix/libexec
%define helperdir %_libexecdir/%name

# Automatically added by buildreq on Thu Mar 29 2007

BuildRequires: libncurses-devel libreadline-devel

%description
GIT (GNU Interactive Tools) provides an extensible file system browser,
an ASCII/hexadecimal file viewer, a process viewer/killer and other
related utilities and shell scripts.  GIT can be used to increase the
speed and efficiency of copying and moving files and directories, invoking
editors, compressing and uncompressing files, creating and expanding
archives, compiling programs, sending mail and more.  GIT uses standard
ANSI color sequences, if they are available.

You should install the git package if you are interested in using its file
management capabilities.

%prep
%setup -q -n git-%version
%patch0 -p1 -b .fix0
%patch1 -p1 -b .fix1
%patch2 -p1 -b .fix2
%patch3 -p1 -b .fix3
%patch4 -p1 -b .fix4

%build
export CFLAGS="%optflags"
%__autoreconf
%configure --with-terminfo --enable-gcc-warnings --program-transform-name='s/^git/gnuit/'
%make_build

%install
%makeinstall

# Make helper

%__mkdir_p %buildroot/%_sysconfdir/bashrc.d %buildroot/%helperdir
cat >%buildroot/%helperdir/runner.sh<<-EOF
gnuit_runner() {
   unset gnuit_runner
   local rc=0 path= tempfile=
   if ! tempfile="\$(mktemp -t 'gnuit.XXXXXXXXX' 2>/dev/null)"; then
       %_bindir/%name \$ at  || rc=\$?
       return \$rc
   fi
   if %_bindir/%name -p 2>"\$tempfile"; then
       path="\$(head -1 "\$tempfile")"    
       [ ! -d "\$path" ] || cd "\$path"
   else
       rc=\$?
       cat "\$tempfile" >&2
   fi
   rm -f -- "\$tempfile"
   return \$rc
}
gnuit_runner
EOF
printf "alias gnuit='. %helperdir/runner.sh'\\n" > %buildroot/%_sysconfdir/bashrc.d/%name.sh

chmod +x %buildroot/%_sysconfdir/bashrc.d/%name.sh

# Rename documentation

mv -f doc/{git,gnuit}.html

find %buildroot/%_infodir -type f -name 'git*' -printf '%%h %%f\n' |
while read o f; do
mv -vf "$o/$f" "$o/gnuit${f#git}"
done

# Rename gitrc.* files

mv -f %buildroot/%_datadir/{git,%name}
find %buildroot/%_datadir/%name -type f -name '.gitrc*' -printf '%%h %%f\n' |
while read o f; do
mv -vf "$o/$f" "$o/.gnuit${f#.git}"
done

%files
%_sysconfdir/bashrc.d/*
%_bindir/*
%helperdir
%_man1dir/*
%_infodir/gnuit*
%_datadir/%name/.gnuitrc*
%doc COPYING ChangeLog LSM NEWS PLATFORMS PROBLEMS README INSTALL doc/gnuit.html

%post -p %install_info
%preun -p %uninstall_info

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin