mirror of
https://abf.rosa.ru/djam/git.git
synced 2025-02-23 09:43:00 +00:00
410 lines
12 KiB
RPMSpec
410 lines
12 KiB
RPMSpec
%global debug_package %nil
|
|
%define devname %mklibname git -d
|
|
%define profile_branch 93git-branch.sh
|
|
%define profile_env 93git-env.sh
|
|
# it's a hack remove it after perl upgrade
|
|
%define perl_vendorlib /usr/share/perl5/vendor_perl
|
|
|
|
Summary: Global Information Tracker
|
|
Name: git
|
|
Version: 2.45.0
|
|
Release: 1
|
|
Epoch: 1
|
|
License: GPLv2+
|
|
Group: Development/Tools
|
|
Url: http://git-scm.com/
|
|
Source0: https://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.xz
|
|
Source2: gitweb.conf
|
|
Source3: %{profile_branch}
|
|
# Do we really need it? It's not used anyway
|
|
Source4: %{profile_env}
|
|
BuildRequires: asciidoc
|
|
BuildRequires: docbook-dtd45-xml
|
|
BuildRequires: xmlto
|
|
BuildRequires: perl-CGI
|
|
BuildRequires: perl-devel
|
|
BuildRequires: pkgconfig(expat)
|
|
BuildRequires: pkgconfig(libcurl)
|
|
BuildRequires: pkgconfig(openssl)
|
|
BuildRequires: pkgconfig(zlib)
|
|
Requires: git-core = %{EVRD}
|
|
Requires: git-svn = %{EVRD}
|
|
Requires: git-email = %{EVRD}
|
|
Recommends: gitk = %{EVRD}
|
|
Recommends: git-scalar = %{EVRD}
|
|
Recommends: git-arch = %{EVRD}
|
|
Recommends: git-core-oldies = %{EVRD}
|
|
Recommends: git-cvs = %{EVRD}
|
|
|
|
%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.
|
|
|
|
This is a dummy package which brings in all subpackages.
|
|
|
|
%files
|
|
# no file in the main package
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n git-core
|
|
Summary: Global Information Tracker
|
|
Group: Development/Other
|
|
Requires: diffutils
|
|
Recommends: git-prompt
|
|
Requires: less
|
|
Requires: openssh-clients
|
|
Requires: rsync
|
|
%rename gitcompletion
|
|
|
|
%description -n git-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. 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.
|
|
|
|
This are the core tools with minimal dependencies.
|
|
|
|
You may want to install subversion, cpsps and/or tla to import
|
|
repositories from other VCS.
|
|
|
|
%files -n git-core -f %{name}.lang
|
|
%doc Documentation/*.html Documentation/howto Documentation/technical Documentation/RelNotes.txt.gz
|
|
%{_sysconfdir}/emacs/site-start.d/*
|
|
%{_datadir}/bash-completion/completions/*
|
|
%{_datadir}/emacs/site-lisp/*
|
|
%{_bindir}/git
|
|
%{_bindir}/git-*
|
|
%{_libdir}/git-core
|
|
%exclude %{_libdir}/git-core/*svn*
|
|
%exclude %{_libdir}/git-core/*cvs*
|
|
%exclude %{_libdir}/git-core/git-archimport
|
|
%exclude %{_libdir}/git-core/*email*
|
|
%{_datadir}/git-core
|
|
%{_datadir}/git-gui
|
|
%{_mandir}/man7/git*.7.*
|
|
%{_mandir}/man1/git*.1.*
|
|
%{_mandir}/man5/git*.5.*
|
|
%exclude %{_mandir}/man1/*svn*.1*
|
|
%exclude %{_mandir}/man1/*cvs*.1*
|
|
%exclude %{_mandir}/man7/*cvs*.7*
|
|
%exclude %{_mandir}/man1/*email*.1*
|
|
%exclude %{_mandir}/man1/git-archimport.1*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package scalar
|
|
Summary: Tools for git scalability
|
|
Group: Development/Tools
|
|
Requires: git-core = %{EVRD}
|
|
|
|
%description scalar
|
|
Scalar is a tool that helps Git scale to some of the largest Git repositories.
|
|
It achieves this by enabling some advanced Git features, such as:
|
|
|
|
* Partial clone: reduces time to get a working repository by not downloading
|
|
all Git objects right away.
|
|
|
|
* Background prefetch: downloads Git object data from all remotes every
|
|
hour, reducing the amount of time for foreground git fetch calls.
|
|
|
|
* Sparse-checkout: limits the size of your working directory.
|
|
|
|
* File system monitor: tracks the recently modified files and eliminates
|
|
the need for Git to scan the entire worktree.
|
|
|
|
* Commit-graph: accelerates commit walks and reachability calculations,
|
|
speeding up commands like git log.
|
|
|
|
* Multi-pack-index: enables fast object lookups across many pack-files.
|
|
|
|
* Incremental repack: Repacks the packed Git data into fewer pack-file
|
|
without disrupting concurrent commands by using the multi-pack-index.
|
|
|
|
%files scalar
|
|
%{_bindir}/scalar
|
|
%{_mandir}/man1/scalar.1*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n gitk
|
|
Summary: Git revision tree visualiser
|
|
Group: Development/Other
|
|
Requires: git-core = %{EVRD}
|
|
Requires: tcl >= 8.4
|
|
Requires: tk >= 8.4
|
|
|
|
%description -n gitk
|
|
Git revision tree visualiser.
|
|
|
|
%files -n gitk
|
|
%{_bindir}/gitk
|
|
%{_mandir}/*/gitk*
|
|
%{_datadir}/gitk
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{devname}
|
|
Summary: Git development files
|
|
Group: Development/Other
|
|
Provides: git-devel = %{EVRD}
|
|
|
|
%description -n %{devname}
|
|
Development files for git.
|
|
|
|
%files -n %{devname}
|
|
%{_includedir}/git
|
|
%{_libdir}/libgit.a
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n git-svn
|
|
Summary: Git tools for importing Subversion repositories
|
|
Group: Development/Other
|
|
Requires: git-core = %{EVRD}
|
|
Requires: perl-Git
|
|
Requires: perl-SVN
|
|
Requires: perl-Git-SVN
|
|
Requires: subversion
|
|
|
|
%description -n git-svn
|
|
Git tools for importing Subversion repositories.
|
|
|
|
%files -n git-svn
|
|
%{_libdir}/git-core/*svn*
|
|
%{_mandir}/man1/*svn*.1*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n git-cvs
|
|
Summary: Git tools for importing CVS repositories
|
|
Group: Development/Other
|
|
Requires: git-core = %{EVRD}
|
|
Recommends: cvs
|
|
Recommends: cvsps
|
|
|
|
%description -n git-cvs
|
|
Git tools for importing CVS repositories.
|
|
|
|
%files -n git-cvs
|
|
%{_libdir}/git-core/*cvs*
|
|
%{_mandir}/man1/*cvs*.1*
|
|
%{_mandir}/man7/*cvs*.7*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n git-arch
|
|
Summary: Git tools for importing Arch repositories
|
|
Group: Development/Other
|
|
Requires: git-core = %{EVRD}
|
|
Recommends: tla
|
|
|
|
%description -n git-arch
|
|
Git tools for importing Arch repositories.
|
|
|
|
%files -n git-arch
|
|
%{_libdir}/git-core/git-archimport
|
|
%{_mandir}/man1/git-archimport.1*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n git-email
|
|
Summary: Git tools for sending email
|
|
Group: Development/Other
|
|
Requires: git-core = %{EVRD}
|
|
Recommends: perl-Authen-SASL
|
|
Recommends: perl-MIME-Base64
|
|
|
|
%description -n git-email
|
|
Git tools for sending email.
|
|
|
|
%files -n git-email
|
|
%{_libdir}/git-core/*email*
|
|
%{_mandir}/man1/*email*.1*
|
|
%{_mandir}/man5/gitmailmap.5.*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n perl-Git
|
|
Summary: Perl interface to Git
|
|
Group: Development/Perl
|
|
Requires: git-core = %{EVRD}
|
|
|
|
%description -n perl-Git
|
|
Perl interface to Git
|
|
|
|
%files -n perl-Git
|
|
%{perl_vendorlib}/Git.pm
|
|
%dir %{perl_vendorlib}/Git
|
|
%{perl_vendorlib}/Git/I18N.pm
|
|
%{perl_vendorlib}/Git/IndexInfo.pm
|
|
%{perl_vendorlib}/Git/Packet.pm
|
|
%{perl_vendorlib}/FromCPAN
|
|
%{perl_vendorlib}/Git/LoadCPAN.pm
|
|
%{perl_vendorlib}/Git/LoadCPAN
|
|
%{_mandir}/man3/Git.3pm*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n perl-Git-SVN
|
|
Summary: Perl interface to Git SVN
|
|
Group: Development/Perl
|
|
Requires: perl-Git = %{EVRD}
|
|
|
|
%description -n perl-Git-SVN
|
|
Perl interface to Git SVN.
|
|
|
|
%files -n perl-Git-SVN
|
|
%{perl_vendorlib}/Git/SVN
|
|
%{perl_vendorlib}/Git/SVN.pm
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n git-core-oldies
|
|
Summary: Git obsolete commands, bound to extinction
|
|
Group: Development/Other
|
|
Requires: git-core = %{EVRD}
|
|
|
|
%description -n git-core-oldies
|
|
Git obsolete commands, bound to extinction
|
|
|
|
%files -n git-core-oldies
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n gitweb
|
|
Summary: cgi-bin script for browse a git repository with web browser
|
|
Group: System/Servers
|
|
Requires: git-core = %{EVRD}
|
|
Requires: apache-mod_perl
|
|
|
|
%description -n gitweb
|
|
cgi-bin script for browse a git repository with web browser.
|
|
|
|
%files -n gitweb
|
|
%doc gitweb/README
|
|
%config(noreplace) %{_sysconfdir}/gitweb.conf
|
|
%config(noreplace) %{_webappconfdir}/gitweb.conf
|
|
%{_datadir}/gitweb
|
|
%{_mandir}/man1/gitweb.1*
|
|
%{_mandir}/man5/gitweb.conf.5*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n git-prompt
|
|
Summary: Shows the current git branch in your bash prompt
|
|
Group: Shells
|
|
Requires: git-core = %{EVRD}
|
|
Requires: bash-completion
|
|
|
|
%description -n git-prompt
|
|
Shows the current git branch in your bash prompt.
|
|
|
|
%files -n git-prompt
|
|
%{_sysconfdir}/profile.d/%{profile_branch}
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -q
|
|
# remove borring file
|
|
rm -f Documentation/.gitignore
|
|
# prefix gitweb css/png files with /gitweb
|
|
perl -pi -e 's!^(GITWEB_CSS|GITWEB_LOGO|GITWEB_FAVICON) = !$1 = /gitweb/!' Makefile
|
|
|
|
%build
|
|
%global optflags %{optflags} -fno-strict-aliasing
|
|
# same flags and prefix must be passed for make test too
|
|
%define git_make_params prefix=%{_prefix} CC=%{__cc} gitexecdir=%{_libdir}/git-core CFLAGS="%{optflags}" GITWEB_CONFIG=%{_sysconfdir}/gitweb.conf DOCBOOK_XSL_172=0 INSTALLDIRS=vendor perllibdir=%{perl_vendorlib}
|
|
%make %{git_make_params} all doc gitweb
|
|
|
|
# Produce RelNotes.txt.gz
|
|
# sed trick changes "-x.y.z.txt" to "-x.y.z.0.txt" for ordering, then undoes it
|
|
# use awk to print a newline before each RelNotes header
|
|
cd Documentation/RelNotes \
|
|
&& relnotesls="`find . -name '*.txt' | sed 's/\([0-9]\.[0-9]\.[0-9]\)\.txt/\1.0.txt/' | sort -nr | sed 's/\([0-9]\.[0-9]\.[0-9]\)\.0\.txt/\1.txt/'`" \
|
|
&& awk 'FNR == 1 { print "" } { print }' $relnotesls | gzip -9c >../RelNotes.txt.gz
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
%make_install %{?with_docs:install-doc} CC=%{__cc} AR=%{__ar} prefix=%{_prefix} gitexecdir=%{_libdir}/git-core CFLAGS="%{optflags}" INSTALLDIRS=vendor perllibdir=%{perl_vendorlib}
|
|
make install-doc prefix=%{_prefix} gitexecdir=%{_libdir}/git-core DESTDIR=%{buildroot}
|
|
|
|
# Avoid dependencies on obscure perl modules
|
|
chmod -x contrib/mw-to-git/git-remote-mediawiki.perl
|
|
|
|
mkdir -p %{buildroot}%{_includedir}/git
|
|
cp *.h %{buildroot}%{_includedir}/git
|
|
|
|
mkdir -p %{buildroot}%{_libdir}
|
|
install -m 644 libgit.a %{buildroot}%{_libdir}/libgit.a
|
|
mkdir -p %{buildroot}/%{perl_vendorlib}
|
|
rm -f %{buildroot}%{_mandir}/man3/private-Error.3pm*
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/gitweb/static
|
|
install -m 755 gitweb/gitweb.cgi %{buildroot}%{_datadir}/gitweb
|
|
install -m 644 gitweb/static/*.css gitweb/static/*.png %{buildroot}%{_datadir}/gitweb/static/
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}
|
|
install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/gitweb.conf
|
|
# apache configuration
|
|
mkdir -p %{buildroot}%{_webappconfdir}
|
|
cat > %{buildroot}%{_webappconfdir}/gitweb.conf <<EOF
|
|
# gitweb configuration
|
|
Alias /gitweb %{_datadir}/gitweb
|
|
|
|
<Directory %{_datadir}/gitweb>
|
|
Require all granted
|
|
Options ExecCgi
|
|
DirectoryIndex gitweb.cgi
|
|
AddHandler cgi-script .cgi
|
|
</Directory>
|
|
EOF
|
|
|
|
# fix .sp in man files
|
|
find %{buildroot}/%{_mandir} -type f | xargs perl -e 's/\.sp$/\n\.sp/g' -pi
|
|
|
|
# emacs VC backend:
|
|
mkdir -p %{buildroot}{%{_datadir}/emacs/site-lisp,/etc/emacs/site-start.d}
|
|
install -m 644 contrib/emacs/*.el %{buildroot}%{_datadir}/emacs/site-lisp
|
|
cat >%{buildroot}/etc/emacs/site-start.d/vc_git.el <<EOF
|
|
(add-to-list 'vc-handled-backends 'GIT)
|
|
EOF
|
|
|
|
# install bash-completion file
|
|
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/
|
|
install -m644 contrib/completion/git-completion.bash \
|
|
%{buildroot}%{_datadir}/bash-completion/completions/git
|
|
install -m644 contrib/completion/git-prompt.sh \
|
|
%{buildroot}%{_datadir}/bash-completion/completions/git-prompt
|
|
|
|
# And the prompt manipulation file
|
|
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/profile.d/%{profile_branch}
|
|
|
|
%find_lang %{name}
|
|
|
|
%check
|
|
# t9502 t9501 t9500 gitweb test need internet connection
|
|
GIT_SKIP_TESTS="t9001 t9902 t9500 t9501 t9502"
|
|
%ifarch aarch64 %{arm} %{power64}
|
|
# Skip tests which fail on aarch64, arm, and ppc
|
|
#
|
|
# The following 2 tests use run_with_limited_cmdline, which calls ulimit -s 128
|
|
# to limit the maximum stack size.
|
|
# t5541.35 'push 2000 tags over http'
|
|
# t5551.25 'clone the 2,000 tag repo to check OS command line overflow'
|
|
GIT_SKIP_TESTS="$GIT_SKIP_TESTS t5541.35 t5551.25"
|
|
%endif
|
|
|
|
export GIT_SKIP_TESTS
|
|
# Set LANG so various UTF-8 tests are run
|
|
export LANG=en_US.UTF-8
|
|
|
|
# Run the tests
|
|
%__make test
|