%define devname %mklibname git -d %define profile_branch 93git-branch.sh %define profile_env 93git-env.sh Summary: Global Information Tracker Name: git Version: 2.22.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} Suggests: gitk = %{EVRD} Suggests: git-arch = %{EVRD} Suggests: git-core-oldies = %{EVRD} Suggests: git-cvs = %{EVRD} Obsoletes: python-git < 1:2.11 %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 Suggests: 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/* %{_sysconfdir}/bash_completion.d/* %{_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* %{_mandir}/*/*tutorial* %{_mandir}/*/*glossary* %{_mandir}/*/giteveryday* %{_mandir}/*/gitdiffcore* %{_mandir}/*/gitworkflows* %{_mandir}/*/gitrevisions* %{_mandir}/*/gitcredentials* %{_mandir}/man7/gitsubmodules.7* %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 -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: 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} Suggests: cvs Suggests: 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} Suggests: 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} Suggests: perl-Authen-SASL Suggests: perl-MIME-Base64 %description -n git-email Git tools for sending email. %files -n git-email %{_libdir}/git-core/*email* %{_mandir}/man1/*email*.1* #---------------------------------------------------------------------------- %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}/* %{_mandir}/man3/* #---------------------------------------------------------------------------- %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/INSTALL 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 # same flags and prefix must be passed for make test too %define git_make_params prefix=%{_prefix} gitexecdir=%{_libdir}/git-core CFLAGS="%{optflags}" GITWEB_CONFIG=%{_sysconfdir}/gitweb.conf DOCBOOK_XSL_172=1 %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} %makeinstall_std prefix=%{_prefix} gitexecdir=%{_libdir}/git-core CFLAGS="%{optflags}" 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 # (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 mkdir -p %{buildroot}/%{perl_vendorlib} mv %{buildroot}/%{_prefix}/share/perl5/* %{buildroot}/%{perl_vendorlib}/ 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 DirectoryIndex gitweb.cgi AddHandler cgi-script .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 <