Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1487283
 поиск   регистрация   авторизация 
 
Группа :: Разработка/Прочее
Пакет: git

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

%def_with M24

%if_with M24
%define _release alt1.M24.1
%else
%define _release alt2
%endif

Name: git
Version: 1.3.3
Release: %_release

Summary: Git core and tools
License: GPL
Group: Development/Other
Url: http://kernel.org/pub/software/scm/git/
Packager: Dmitry V. Levin <ldv at altlinux.org>

Source0: ftp://ftp.kernel.org/pub/software/scm/git/git-%version.tar
Source1: hooks--update
Source2: linkify.c
Patch0: git-1.3.3-maint.patch
Patch1: git-1.3.2-svn.patch
Patch2: git-1.3.0-alt-tar-tree.patch

%def_enable curl
%def_enable expat
%def_with arch
%def_with cvs
%def_with email
%def_with svn
%def_with tk
%def_with doc
#%%def_without check

Requires: %name-core = %version-%release
%{!?_without_arch:Requires: %name-arch = %version-%release}
%{!?_without_cvs:Requires: %name-cvs = %version-%release}
%{!?_without_email:Requires: %name-email = %version-%release}
%{!?_without_svn:Requires: %name-svn = %version-%release}
%{!?_without_tk:Requires: gitk = %version-%release}
%{!?_without_doc:Requires: %name-doc = %version-%release}

BuildRequires: libssl-devel, python-modules-encodings, zlib-devel >= 0:1.2
%{!?_without_cvs:BuildRequires: perl-DBI}
%{!?_disable_curl:BuildRequires: libcurl-devel}
%{!?_disable_expat:BuildRequires: libexpat-devel}
%{!?_without_email:BuildRequires: perl-Term-ReadLine-Gnu}
%{!?_without_svn:BuildRequires: perl-URI, perl-libwww, subversion-perl}
%{!?_without_doc:BuildRequires: asciidoc > 0:6.0.3, xmlto}
%{?!_without_check:%{?!_disable_check:BuildRequires: rcs}}

%description
This is a stupid (but extremely fast) directory content manager.
It doesn't do a whole lot, but what it _does_ do is track directory
contents efficiently.  It is intended to be the base of an efficient,
distributed source code management system.  This package includes
rudimentary tools that can be used as a SCM, but you should look
elsewhere for tools for ordinary humans layered on top of this.

%package core
Summary: Git core tools
Group: Development/Other
Requires: diffstat, less, openssh-clients

%description core
This is a stupid (but extremely fast) directory content manager.
It doesn't do a whole lot, but what it _does_ do is track directory
contents efficiently.  It is intended to be the base of an efficient,
distributed source code management system.  Git itself includes
rudimentary tools that can be used as a SCM, but you should look
elsewhere for tools for ordinary humans layered on top of this.

This package contains core set of Git tools with minimal dependencies.

%package arch
Summary: Git tools for importing Arch repositories
Group: Development/Other
Requires: %name-core = %version-%release, tla

%description arch
Git tools for importing Arch repositories.

%package cvs
Summary: Git tools for importing CVS repositories
Group: Development/Other
Requires: %name-core = %version-%release, cvs, cvsps

%description cvs
Git tools for importing CVS repositories.

%package email
Summary: Git tools for sending email
Group: Development/Other
Requires: %name-core = %version-%release

%description email
Git tools for sending email.

%package svn
Summary: Git tools for importing Subversion repositories
Group: Development/Other
Requires: %name-core = %version-%release, subversion

%description svn
Git tools for importing Subversion repositories.

%package -n gitk
Summary: Git revision tree visualiser ('gitk')
Group: Development/Other
Requires: %name-core = %version-%release, tk >= 8.4

%description -n gitk
Git revision tree visualiser ('gitk')

%package doc
Summary: Git documentation
%if_with M24
Group: Development/Other
%else
Group: Development/Documentation
%endif
Provides: %name-docs = %version-%release
Obsoletes: %name-docs

%description doc
This package contain the Git documentation in text and HTML formats.

%define pkgdocdir %_docdir/%name-%version

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
install -pm644 %_sourcedir/hooks--update templates/

%build
%make_build CFLAGS="%optflags" prefix=%prefix \
%{?_disable_curl:NO_CURL=1} \
%{?_disable_expat:NO_EXPAT=1} \
%{!?_without_email:WITH_SEND_EMAIL=1} \
all %{!?_without_doc:doc}
%{?_with_svn:make -C contrib/git-svn all %{!?_without_doc:doc}}
%{?!__buildreqs:%{?!_without_check:%{?!_disable_check:%__make -k test}}}
%{?!__buildreqs:%{?!_without_check:%{?!_disable_check:%{?_with_svn:%__make -C contrib/git-svn -k test}}}}
%__cc %optflags %_sourcedir/linkify.c -o linkify

%install
%make_install DESTDIR=%buildroot \
prefix=%prefix mandir=%_mandir \
%{?_disable_curl:NO_CURL=1} \
%{?_disable_expat:NO_EXPAT=1} \
%{!?_without_email:WITH_SEND_EMAIL=1} \
install %{!?_without_doc:install-doc}
%if_with svn
%make_install -C contrib/git-svn DESTDIR=%buildroot \
prefix=%prefix mandir=%_mandir \
install %{!?_without_doc:install-doc}
%endif #svn

# Fix manpages.

find %buildroot%_mandir -type f -print0 |
xargs -r0 %__subst -p 's/^\(.\+\)\(\.sp\)$/\1\n\2/' --

%{?_without_arch:rm -f %buildroot%_bindir/*arch*}
%{?_without_svn:rm -f %buildroot%_bindir/*svn*}

mkdir -p %buildroot%pkgdocdir/
cp -a Documentation/*/ %{!?_without_doc:Documentation/*.html} \
%buildroot%pkgdocdir/

# Avoid compressing templates.

%set_compress_topdir %_mandir

# Hardlink identical files together.

%define __spec_install_custom_post  ./linkify -vc %buildroot

%files

%files core
%_bindir/*
%exclude %_bindir/*cvs*
%exclude %_bindir/*gitk*
%{!?_without_arch:%exclude %_bindir/*arch*}
%{!?_without_email:%exclude %_bindir/*email*}
%{!?_without_svn:%exclude %_bindir/*svn*}
%_datadir/git-core/
%if_with doc
%_mandir/man?/*
%exclude %_man1dir/*svn*.1*
%exclude %_man1dir/*git-cvs*.1*
%exclude %_man1dir/*arch*.1*
%exclude %_man1dir/*email*.1*
%exclude %_man1dir/*gitk*.1*
%endif #doc

%if_with arch
%files arch
%_bindir/*arch*
%if_with doc
%_man1dir/*arch*.1*
%endif #doc
%endif #arch

%if_with cvs
%files cvs
%_bindir/*cvs*
%if_with doc
%_man1dir/*git-cvs*.1*
%endif #doc
%endif #cvs

%if_with email
%files email
%_bindir/*email*
%if_with doc
%_man1dir/*email*.1*
%endif #doc
%endif #email

%if_with svn
%files svn
%_bindir/*svn*
%if_with doc
%_man1dir/*svn*.1*
%endif #doc
%endif #svn

%if_with tk
%files -n gitk
%_bindir/*gitk*
%if_with doc
%_man1dir/*gitk*.1*
%endif #doc
%endif #tk

%files doc
%pkgdocdir/

%changelog

Полный changelog можно просмотреть здесь

 
design & coding: Vladimir Lettiev aka crux © 2004-2005