%global __requires_exclude perl\\(packed-refs\\)|funcoes/func.gammu.php %global __provides_exclude_from %{_docdir} %global __requires_exclude_from %{_docdir} %define libname %mklibname git %define profile_branch 93git-branch.sh %define profile_env 93git-env.sh %bcond_with cvsimport Name: git Epoch: 1 Version: 2.52.0 Release: %mkrel 2 Summary: Fast and distributed version control system License: GPLv2 Group: Development/Other Url: https://git-scm.com/ Source0: https://www.kernel.org/pub/software/scm/git/git-%{version}.tar.xz Source1: https://www.kernel.org/pub/software/scm/git/git-%{version}.tar.sign Source2: gitweb.conf Source3: %{profile_branch} Source4: %{profile_env} Patch0: gitweb.perl.fix_uninitialized.patch BuildRequires: asciidoc BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(openssl) BuildRequires: perl(App::Prove) BuildRequires: perl(CGI) BuildRequires: perl(CGI::Carp) BuildRequires: perl(CGI::Util) BuildRequires: perl(DBD::SQLite) BuildRequires: perl(Digest::MD5) BuildRequires: perl(HTTP::Date) BuildRequires: perl(IO::Pty) BuildRequires: perl(Mail::Address) BuildRequires: perl(Memoize) BuildRequires: perl(Term::ReadKey) BuildRequires: perl(Test::More) BuildRequires: perl(Time::HiRes) BuildRequires: perl(Error) BuildRequires: perl(Test) BuildRequires: pkgconfig(python3) BuildRequires: xmlto-notex BuildRequires: pkgconfig(zlib) BuildRequires: docbook-dtd45-xml BuildRequires: docbook-style-xsl BuildRequires: pkgconfig(libpcre2-posix) Requires: git-core = %{epoch}:%{version} Requires: git-email = %{epoch}:%{version} Recommends: gitk = %{epoch}:%{version} Recommends: git-arch = %{epoch}:%{version} Recommends: git-core-oldies = %{epoch}:%{version} Recommends: git-cvs = %{epoch}:%{version} Recommends: git-svn = %{epoch}:%{version} %description Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. This is a dummy package which brings in all subpackages. %package -n git-core Summary: Global Information Tracker Group: Development/Other Requires: diffutils Requires: rsync Requires: less Requires: openssh-clients Provides: gitcompletion %description -n git-core Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. These are the core tools with minimal dependencies. You may want to install subversion, csvps and/or tla to import repositories from other VCS. %package -n gitk Summary: Git revision tree visualiser Group: Development/Other Requires: git-core = %{epoch}:%{version} Requires: tk >= 8.4 Requires: tcl >= 8.4 %description -n gitk Git revision tree visualiser. %package -n %{libname}-devel Summary: Git development files Group: Development/Other Provides: git-devel = %{version}-%{release} %description -n %{libname}-devel Development files for git. %package -n git-subtree Summary: Git subtree command Group: Development/Other Requires: git-core = %{epoch}:%{version}-%{release} %description -n git-subtree Git subtree allows for the inclusion of a subproject within a subdirectory of the main project. %package -n git-svn Summary: Git tools for importing Subversion repositories Group: Development/Other Requires: git-core = %{epoch}:%{version}-%{release}, subversion %description -n git-svn Git tools for importing Subversion repositories. %package -n git-cvs Summary: Git tools for working with CVS repositories Group: Development/Other Requires: git-core = %{epoch}:%{version}-%{release} Recommends: cvs Recommends: cvs-fast-export %description -n git-cvs Git tools for working with CVS repositories. %package -n git-arch Summary: Git tools for importing Arch repositories Group: Development/Other Requires: git-core = %{epoch}:%{version}-%{release} Recommends: tla %description -n git-arch Git tools for importing Arch repositories. %package -n git-email Summary: Git tools for sending email Group: Development/Other Requires: git-core = %{epoch}:%{version}-%{release} Recommends: perl-Authen-SASL Recommends: perl-MIME-Base64 %description -n git-email Git tools for sending email. %package -n perl-Git Summary: Perl interface to Git Group: Development/Perl Requires: git-core = %{epoch}:%{version}-%{release} %description -n perl-Git Perl interface to Git. %package -n perl-Git-SVN Summary: Perl interface to Git-SVN Group: Development/Perl Requires: git-core = %{epoch}:%{version}-%{release} %description -n perl-Git-SVN Perl interface to Git-SVN. %package -n python-git Summary: Python interface to Git Group: Development/Python Requires: git-core = %{epoch}:%{version}-%{release} %description -n python-git Python interface to Git. %package -n git-core-oldies Summary: Git obsolete commands, bound to extinction Group: Development/Other Requires: git-core = %{epoch}:%{version}-%{release} %description -n git-core-oldies Git obsolete commands, bound to extinction. %package -n gitweb Summary: cgi-bin script for browse a git repository with web browsers Group: System/Servers Requires: git-core = %{epoch}:%{version}-%{release} %description -n gitweb cgi-bin script for browse a git repository with web browsers. %package -n git-prompt Summary: Shows the current git branch in your bash prompt Group: Shells Requires: git-core = %{epoch}:%{version}-%{release} Requires: bash-completion %description -n git-prompt Shows the current git branch in your bash prompt. %package -n git-scalar Summary: Scalar helps Git scale to some of the largest Git repositories Group: Shells Requires: git-core = %{epoch}:%{version}-%{release} Requires: bash-completion %description -n git-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. %prep %autosetup -p1 # 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 # Fix for MGA#22223 perl -lni -e 'print unless (/^git-remote-testsvn/.../^\s*$/ or /testsvn\.o/)' Makefile # Use these same options for every invocation of 'make'. # Otherwise it will rebuild in %%install due to flags changes. cat << \EOF > config.mak CFLAGS = %{build_cflags} LDFLAGS = %{build_ldflags} GITWEB_CONFIG = %{_sysconfdir}/gitweb.conf USE_LIBPCRE = 1 NO_PERL_CPAN_FALLBACKS = 1 prefix = %{_prefix} perllibdir = %{perl_vendorlib} gitexecdir = %{_libdir}/git-core EOF # Remove Git::LoadCPAN to ensure we use only system perl modules. This also # allows the dependencies to be automatically processed by rpm. rm -rf perl/Git/LoadCPAN{.pm,/} grep -rlZ '^use Git::LoadCPAN::' | xargs -r0 sed -i 's/Git::LoadCPAN:://g' # Set Python3 explicitly %py3_shebang_fix \ git-p4.py \ $(find contrib/ -name "*.py" -type f) %if ! %{with cvsimport} # Remove git-cvsimport and gitcvs-migration from command list sed -i -e '/^gitcvs-migration/d' -e '/^git-cvsimport/d' command-list.txt %endif %build %make_build all doc gitweb # Make git-subtree pushd contrib/subtree %make_build popd # 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 make install-doc DESTDIR=%{buildroot} # Install git-subtree and its doc pushd contrib/subtree %make_install make install-doc DESTDIR=%{buildroot} popd make install-html DESTDIR=%{buildroot} mkdir -p %{buildroot}%{_docdir}/git-core for i in %{buildroot}/%{_docdir}/git-doc/* ; do mv "$i" %{buildroot}%{_docdir}/git-core/ done rm -fr %{buildroot}/%{_docdir}/git-doc/ # (cg) Copy the whole contrib dir as docs. It contains useful scripts. mkdir -p %{buildroot}%{_datadir}/doc/git-core cp -ar contrib %{buildroot}%{_datadir}/doc/git-core mkdir -p %{buildroot}%{_includedir}/git cp *.h %{buildroot}%{_includedir}/git mkdir -p %{buildroot}%{_libdir} install -m 644 libgit.a %{buildroot}%{_libdir}/libgit.a rm -fr %{buildroot}/%{perl_vendorlib}/FromCPAN 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 < Require all granted Options ExecCgi AddHandler cgi-script .cgi DirectoryIndex gitweb.cgi 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 <