git/git.spec

389 lines
11 KiB
RPMSpec
Raw Normal View History

%define devname %mklibname git -d
2014-12-15 16:53:02 +10:00
%define profile_branch 93git-branch.sh
%define profile_env 93git-env.sh
2020-03-06 16:45:21 +00:00
# it's a hack remove it after perl upgrade
%define perl_vendorlib /usr/share/perl5/vendor_perl
2014-12-15 16:53:02 +10:00
Summary: Global Information Tracker
Name: git
2020-10-22 07:57:44 +03:00
Version: 2.29.0
Release: 1
2014-12-15 16:53:02 +10:00
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
2014-12-15 16:53:02 +10:00
BuildRequires: docbook-dtd45-xml
BuildRequires: xmlto
BuildRequires: perl-CGI
BuildRequires: perl-devel
2014-12-15 16:53:02 +10:00
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(zlib)
Requires: git-core = %{EVRD}
Requires: git-svn = %{EVRD}
Requires: git-email = %{EVRD}
2020-01-04 03:37:48 +03:00
Recommends: gitk = %{EVRD}
Recommends: git-arch = %{EVRD}
Recommends: git-core-oldies = %{EVRD}
Recommends: git-cvs = %{EVRD}
2012-02-01 14:53:17 +04:00
%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.
2014-12-15 16:53:02 +10:00
%files
# no file in the main package
#----------------------------------------------------------------------------
2012-02-01 14:53:17 +04:00
%package -n git-core
Summary: Global Information Tracker
Group: Development/Other
Requires: diffutils
2020-01-04 03:37:48 +03:00
Recommends: git-prompt
Requires: less
Requires: openssh-clients
2014-12-15 16:53:02 +10:00
Requires: rsync
2020-03-24 00:27:18 +03:00
%rename gitcompletion
2012-02-01 14:53:17 +04:00
%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.
2014-12-15 16:53:02 +10:00
%files -n git-core -f %{name}.lang
2016-09-01 18:31:53 +04:00
%doc Documentation/*.html Documentation/howto Documentation/technical Documentation/RelNotes.txt.gz
2014-12-15 16:53:02 +10:00
%{_sysconfdir}/emacs/site-start.d/*
2020-08-07 15:29:05 +03:00
%{_datadir}/bash-completion/completions/*
2014-12-15 16:53:02 +10:00
%{_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}/*/git-*
%{_mandir}/*/git.*
%{_mandir}/*/gitattributes*
%{_mandir}/*/gitignore*
%{_mandir}/*/gitmodules*
%{_mandir}/*/gitnamespaces*
%{_mandir}/*/gitcli*
%{_mandir}/*/githooks*
%{_mandir}/*/gitrepository*
%{_mandir}/*/gitremote-helpers*
2014-12-15 16:53:02 +10:00
%{_mandir}/*/*tutorial*
%{_mandir}/*/*glossary*
%{_mandir}/*/giteveryday*
2014-12-15 16:53:02 +10:00
%{_mandir}/*/gitdiffcore*
%{_mandir}/*/gitworkflows*
%{_mandir}/*/gitrevisions*
%{_mandir}/*/gitcredentials*
2017-09-19 22:03:35 +10:00
%{_mandir}/man7/gitsubmodules.7*
2020-06-02 11:37:53 +00:00
%{_mandir}/man7/gitfaq.7.*
2014-12-15 16:53:02 +10:00
%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*
#----------------------------------------------------------------------------
2012-02-01 14:53:17 +04:00
%package -n gitk
Summary: Git revision tree visualiser
Group: Development/Other
Requires: git-core = %{EVRD}
Requires: tcl >= 8.4
2014-12-15 16:53:02 +10:00
Requires: tk >= 8.4
2012-02-01 14:53:17 +04:00
%description -n gitk
Git revision tree visualiser.
2014-12-15 16:53:02 +10:00
%files -n gitk
%{_bindir}/gitk
%{_mandir}/*/gitk*
%{_datadir}/gitk
#----------------------------------------------------------------------------
%package -n %{devname}
Summary: Git development files
Group: Development/Other
2014-12-15 16:53:02 +10:00
Provides: git-devel = %{EVRD}
2014-12-15 16:53:02 +10:00
%description -n %{devname}
2012-02-01 14:53:17 +04:00
Development files for git.
2014-12-15 16:53:02 +10:00
%files -n %{devname}
%{_includedir}/git
%{_libdir}/libgit.a
#----------------------------------------------------------------------------
2012-02-01 14:53:17 +04:00
%package -n git-svn
Summary: Git tools for importing Subversion repositories
Group: Development/Other
2014-12-15 16:53:02 +10:00
Requires: git-core = %{EVRD}
2012-02-01 14:53:17 +04:00
Requires: perl-Git
Requires: perl-SVN
2020-03-06 16:46:00 +00:00
Requires: perl-Git-SVN
2014-12-15 16:53:02 +10:00
Requires: subversion
2012-02-01 14:53:17 +04:00
%description -n git-svn
Git tools for importing Subversion repositories.
2014-12-15 16:53:02 +10:00
%files -n git-svn
%{_libdir}/git-core/*svn*
%{_mandir}/man1/*svn*.1*
#----------------------------------------------------------------------------
2012-02-01 14:53:17 +04:00
%package -n git-cvs
Summary: Git tools for importing CVS repositories
Group: Development/Other
Requires: git-core = %{EVRD}
2020-01-04 03:37:48 +03:00
Recommends: cvs
Recommends: cvsps
2012-02-01 14:53:17 +04:00
%description -n git-cvs
Git tools for importing CVS repositories.
2014-12-15 16:53:02 +10:00
%files -n git-cvs
%{_libdir}/git-core/*cvs*
%{_mandir}/man1/*cvs*.1*
%{_mandir}/man7/*cvs*.7*
#----------------------------------------------------------------------------
2012-02-01 14:53:17 +04:00
%package -n git-arch
Summary: Git tools for importing Arch repositories
Group: Development/Other
Requires: git-core = %{EVRD}
2020-01-04 03:37:48 +03:00
Recommends: tla
2012-02-01 14:53:17 +04:00
%description -n git-arch
Git tools for importing Arch repositories.
2014-12-15 16:53:02 +10:00
%files -n git-arch
%{_libdir}/git-core/git-archimport
%{_mandir}/man1/git-archimport.1*
#----------------------------------------------------------------------------
2012-02-01 14:53:17 +04:00
%package -n git-email
Summary: Git tools for sending email
Group: Development/Other
Requires: git-core = %{EVRD}
2020-01-04 03:37:48 +03:00
Recommends: perl-Authen-SASL
Recommends: perl-MIME-Base64
2012-02-01 14:53:17 +04:00
%description -n git-email
Git tools for sending email.
2014-12-15 16:53:02 +10:00
%files -n git-email
%{_libdir}/git-core/*email*
%{_mandir}/man1/*email*.1*
#----------------------------------------------------------------------------
2012-02-01 14:53:17 +04:00
%package -n perl-Git
Summary: Perl interface to Git
Group: Development/Perl
Requires: git-core = %{EVRD}
2012-02-01 14:53:17 +04:00
%description -n perl-Git
Perl interface to Git
2014-12-15 16:53:02 +10:00
%files -n perl-Git
2020-03-06 16:45:21 +00:00
%{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
2014-12-15 16:53:02 +10:00
#----------------------------------------------------------------------------
2012-02-01 14:53:17 +04:00
%package -n git-core-oldies
Summary: Git obsolete commands, bound to extinction
Group: Development/Other
Requires: git-core = %{EVRD}
2012-02-01 14:53:17 +04:00
%description -n git-core-oldies
Git obsolete commands, bound to extinction
2014-12-15 16:53:02 +10:00
%files -n git-core-oldies
#----------------------------------------------------------------------------
2012-02-01 14:53:17 +04:00
%package -n gitweb
Summary: cgi-bin script for browse a git repository with web browser
Group: System/Servers
Requires: git-core = %{EVRD}
2013-10-14 13:10:01 +04:00
Requires: apache-mod_perl
2012-02-01 14:53:17 +04:00
%description -n gitweb
cgi-bin script for browse a git repository with web browser.
2014-12-15 16:53:02 +10:00
%files -n gitweb
%doc gitweb/README
2014-12-15 16:53:02 +10:00
%config(noreplace) %{_sysconfdir}/gitweb.conf
%config(noreplace) %{_webappconfdir}/gitweb.conf
%{_datadir}/gitweb
%{_mandir}/man1/gitweb.1*
%{_mandir}/man5/gitweb.conf.5*
#----------------------------------------------------------------------------
2012-02-01 14:53:17 +04:00
%package -n git-prompt
Summary: Shows the current git branch in your bash prompt
Group: Shells
Requires: git-core = %{EVRD}
Requires: bash-completion
2012-02-01 14:53:17 +04:00
%description -n git-prompt
Shows the current git branch in your bash prompt.
2014-12-15 16:53:02 +10:00
%files -n git-prompt
%{_sysconfdir}/profile.d/%{profile_branch}
#----------------------------------------------------------------------------
2012-02-01 14:53:17 +04:00
%prep
%setup -q
2012-02-01 14:53:17 +04:00
# 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
2020-04-15 12:18:09 +03:00
%global optflags %{optflags} -fno-strict-aliasing
2012-02-01 14:53:17 +04:00
# same flags and prefix must be passed for make test too
2020-03-06 16:45:21 +00:00
%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}
2020-01-13 15:07:31 +03:00
%make %{git_make_params} all doc gitweb
2012-02-01 14:53:17 +04:00
# 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
2014-12-15 16:53:02 +10:00
mkdir -p %{buildroot}%{_bindir}
2020-03-24 00:27:18 +03:00
%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
2014-12-15 16:53:02 +10:00
mkdir -p %{buildroot}%{_includedir}/git
cp *.h %{buildroot}%{_includedir}/git
2012-02-01 14:53:17 +04:00
2014-12-15 16:53:02 +10:00
mkdir -p %{buildroot}%{_libdir}
install -m 644 libgit.a %{buildroot}%{_libdir}/libgit.a
2018-05-23 18:42:32 +03:00
mkdir -p %{buildroot}/%{perl_vendorlib}
rm -f %{buildroot}%{_mandir}/man3/private-Error.3pm*
2012-02-01 14:53:17 +04:00
2014-12-15 16:53:02 +10:00
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/
2012-02-01 14:53:17 +04:00
2014-12-15 16:53:02 +10:00
mkdir -p %{buildroot}%{_sysconfdir}
install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/gitweb.conf
2012-02-01 14:53:17 +04:00
# apache configuration
2014-12-15 16:53:02 +10:00
mkdir -p %{buildroot}%{_webappconfdir}
cat > %{buildroot}%{_webappconfdir}/gitweb.conf <<EOF
2012-02-01 14:53:17 +04:00
# gitweb configuration
Alias /gitweb %{_datadir}/gitweb
<Directory %{_datadir}/gitweb>
2017-04-19 11:14:14 +03:00
Require all granted
Options ExecCgi
DirectoryIndex gitweb.cgi
AddHandler cgi-script .cgi
2012-02-01 14:53:17 +04:00
</Directory>
EOF
# fix .sp in man files
find %{buildroot}/%{_mandir} -type f | xargs perl -e 's/\.sp$/\n\.sp/g' -pi
# emacs VC backend:
2014-12-15 16:53:02 +10:00
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
2012-02-01 14:53:17 +04:00
(add-to-list 'vc-handled-backends 'GIT)
EOF
# install bash-completion file
2020-08-07 15:29:05 +03:00
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/
2014-12-15 16:53:02 +10:00
install -m644 contrib/completion/git-completion.bash \
2020-08-07 15:29:05 +03:00
%{buildroot}%{_datadir}/bash-completion/completions/git
2015-03-16 19:35:10 +03:00
install -m644 contrib/completion/git-prompt.sh \
2020-08-07 15:29:05 +03:00
%{buildroot}%{_datadir}/bash-completion/completions/git-prompt
2012-02-01 14:53:17 +04:00
# And the prompt manipulation file
2014-12-15 16:53:02 +10:00
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/profile.d/%{profile_branch}
%find_lang %{name}
2012-02-01 14:53:17 +04:00
%check
2020-04-14 23:22:48 +00:00
GIT_SKIP_TESTS="t9001 t9902"
2020-04-14 21:08:49 +00:00
%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