git/git.spec

377 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
2014-12-15 16:53:02 +10:00
Summary: Global Information Tracker
Name: git
2017-03-05 16:47:46 +03:00
Version: 2.12.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}
Suggests: gitk = %{EVRD}
Suggests: git-arch = %{EVRD}
Suggests: git-core-oldies = %{EVRD}
Suggests: git-cvs = %{EVRD}
2017-01-20 16:38:07 +10:00
Obsoletes: python-git < 1:2.11
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
2014-12-15 16:53:02 +10:00
Suggests: git-prompt
Requires: less
Requires: openssh-clients
2014-12-15 16:53:02 +10:00
Requires: rsync
%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/*
%{_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*
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*
%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
#----------------------------------------------------------------------------
2017-03-05 16:47:46 +03:00
# %package -n gitview
# Summary: Git graphical revision tree visualiser
# Group: Development/Other
# Requires: git-core = %{EVRD}
# Requires: python-cairo
# Requires: pygtk2.0
# Requires: python-gtksourceview
#
# %description -n gitview
# Git graphical revision tree visualiser.
#
# %files -n gitview
# %doc contrib/gitview/gitview.txt
# %{_bindir}/gitview
2014-12-15 16:53:02 +10:00
#----------------------------------------------------------------------------
%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
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}
2014-12-15 16:53:02 +10:00
Suggests: cvs
Suggests: 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}
2012-02-01 14:53:17 +04:00
Suggests: 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}
2012-02-01 14:53:17 +04:00
Suggests: perl-Authen-SASL
Suggests: 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
%{perl_vendorlib}/*
%{_mandir}/man3/*
#----------------------------------------------------------------------------
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/INSTALL gitweb/README
%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
# 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
2015-10-20 18:49:09 +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}
%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
2012-02-01 14:53:17 +04:00
# (cg) Copy the whole contrib dir as docs. It contains useful scripts.
2014-12-15 16:53:02 +10:00
mkdir -p %{buildroot}%{_datadir}/doc/git-core
cp -ar contrib %{buildroot}%{_datadir}/doc/git-core
2012-02-01 14:53:17 +04:00
# (cg) Even tho' we copy the whole contrib dir, copy this rather than symlink incase the user is excluding docs
2017-03-05 16:47:46 +03:00
# install -m 755 contrib/gitview/gitview %{buildroot}%{_bindir}
2012-02-01 14:53:17 +04:00
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
2012-02-01 14:53:17 +04:00
2014-12-15 16:53:02 +10:00
mv %{buildroot}/%{_prefix}/lib/perl5/site_perl %{buildroot}/%{_prefix}/lib/perl5/vendor_perl
rm -f %{buildroot}/%{perl_vendorlib}/Error.pm
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>
2013-10-08 00:09:20 +04:00
Require all granted
2012-02-01 14:53:17 +04:00
Options ExecCgi
DirectoryIndex gitweb.cgi
2013-10-14 13:10:01 +04:00
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
2014-12-15 16:53:02 +10:00
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
install -m644 contrib/completion/git-completion.bash \
2012-02-01 14:53:17 +04:00
%{buildroot}%{_sysconfdir}/bash_completion.d/git
2015-03-16 19:35:10 +03:00
install -m644 contrib/completion/git-prompt.sh \
%{buildroot}%{_sysconfdir}/bash_completion.d/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}
2012-02-01 14:53:17 +04:00
# exposes a bug in less, as reported by coling
#install -D -m 0644 %SOURCE4 %{buildroot}%{_sysconfdir}/profile.d/%{profile_env}
%find_lang %{name}
2012-02-01 14:53:17 +04:00
%check
# We do NO_SVN_TESTS because git's tests hardcode
# replies from svn versions older than the one
# we're shipping -- and they have changed since
LC_ALL=C %make %{git_make_params} test NO_SVN_TESTS=true