Ignore:
Timestamp:
Dec 13, 2016, 1:17:22 PM (9 years ago)
Author:
dmik
Message:

spec: git: Release version 2.11.0-1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • spec/trunk/SPECS/git.spec

    r458 r921  
    1 # Note: this .spec is borrowed from git-2.1.0-1.fc22.src.rpm
     1# Note: this .spec is borrowed from http://pkgs.fedoraproject.org/cgit/rpms/git.git
    22
    33# Pass --without docs to rpmbuild if you don't want the documentation (force it for now)
     
    55
    66%global gitcoredir          %{_libexecdir}/git-core
     7%global noarch_sub          1
    78%global libcurl_devel       libcurl-devel
    89%global docbook_suppress_sp 0
    910%global enable_ipv6         0
    10 
     11%global use_prebuilt_docs   0
     12
     13%global bashcompdir         %{_sysconfdir}/bash_completion.d
     14%global bashcomproot        %{bashcompdir}
    1115%global use_systemd         0
    1216
    1317Name:           git
    14 Version:        2.0.0
    15 Release:        2%{?dist}
     18Version:        2.11.0
     19Release:        1%{?dist}
    1620Summary:        Fast Version Control System
    1721License:        GPLv2
    1822Group:          Development/Tools
    19 URL:            http://git-scm.com/
    20 #Source0:        http://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz
    21 
    22 %define svn_url     http://svn.netlabs.org/repos/ports/git/branches/2.0
    23 %define svn_rev     864
     23URL:            https://git-scm.com/
     24
     25%define svn_url     http://svn.netlabs.org/repos/ports/git/trunk
     26%define svn_rev     1885
    2427
    2528Source: %{name}-%{version}-r%{svn_rev}.zip
     
    2932BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
    3033
    31 %if ! 0%{?_without_docs}
     34%if ! %{use_prebuilt_docs} && ! 0%{?_without_docs}
    3235BuildRequires:  asciidoc >= 8.4.1
    3336BuildRequires:  xmlto
     
    3639BuildRequires:  expat-devel
    3740BuildRequires:  gettext
    38 BuildRequires:  libcurl-devel
     41BuildRequires:  %{libcurl_devel}
    3942#BuildRequires:  pcre-devel
     43#BuildRequires:  perl-generators
     44#BuildRequires:  perl(Test)
    4045BuildRequires:  openssl-devel
    4146BuildRequires:  zlib-devel >= 1.2
    42 
    43 #Requires:       less
    44 #Requires:       openssh-clients
     47%if %{use_systemd}
     48# For macros
     49BuildRequires:  systemd
     50%endif
     51
     52Requires:       git-core = %{version}-%{release}
     53Requires:       git-core-doc = %{version}-%{release}
    4554#Requires:       perl(Error)
     55%if ! %{defined perl_bootstrap}
    4656#Requires:       perl(Term::ReadKey)
     57%endif
    4758Requires:       perl-Git = %{version}-%{release}
    48 #Requires:       rsync
    49 Requires:       zlib >= 1.2
    50 
    51 Provides:       git-core = %{version}-%{release}
    5259
    5360# Obsolete git-arch
     
    5966and full access to internals.
    6067
    61 The git rpm installs the core tools with minimal dependencies.  To
    62 install all git packages, including tools for integrating with other
    63 SCMs, install the git-all meta-package.
     68The git rpm installs common set of tools which are usually using with
     69small amount of dependencies. To install all git packages, including
     70tools for integrating with other SCMs, install the git-all meta-package.
    6471
    6572%package all
    6673Summary:        Meta-package to pull in all git tools
    6774Group:          Development/Tools
    68 BuildArch:      noarch
     75%if %{noarch_sub}
     76BuildArch:      noarch
     77%endif
    6978Requires:       git = %{version}-%{release}
    7079Requires:       git-cvs = %{version}-%{release}
    7180Requires:       git-email = %{version}-%{release}
    72 #Requires:       git-gui = %{version}-%{release}
     81Requires:       git-gui = %{version}-%{release}
    7382Requires:       git-svn = %{version}-%{release}
    7483Requires:       git-p4 = %{version}-%{release}
    75 #Requires:       gitk = %{version}-%{release}
     84Requires:       gitk = %{version}-%{release}
    7685Requires:       perl-Git = %{version}-%{release}
     86%if ! %{defined perl_bootstrap}
     87#Requires:       perl(Term::ReadKey)
     88%endif
    7789#Requires:       emacs-git = %{version}-%{release}
    7890Obsoletes:      git <= 1.5.4.3
     
    8597This is a dummy package which brings in all subpackages.
    8698
    87 %package bzr
    88 Summary:        Git tools for working with bzr repositories
    89 Group:          Development/Tools
    90 BuildArch:      noarch
    91 Requires:       git = %{version}-%{release}
    92 Requires:       bzr
    93 
    94 %description bzr
    95 %{summary}.
     99%package core
     100Summary:        Core package of git with minimal funcionality
     101Group:          Development/Tools
     102Requires:       less
     103#Requires:       openssh-clients
     104#Requires:       rsync
     105Requires:       zlib >= 1.2
     106%description core
     107Git is a fast, scalable, distributed revision control system with an
     108unusually rich command set that provides both high-level operations
     109and full access to internals.
     110
     111The git-core rpm installs really the core tools with minimal
     112dependencies. Install git package for common set of tools.
     113To install all git packages, including tools for integrating with
     114other SCMs, install the git-all meta-package.
     115
     116%package core-doc
     117Summary:        Documentation files for git-core
     118Group:          Development/Tools
     119Requires:       git-core = %{version}-%{release}
     120
     121%description core-doc
     122Documentation files for git-core package including man pages.
    96123
    97124%package daemon
     
    99126Group:          Development/Tools
    100127Requires:       git = %{version}-%{release}
    101 #%if %{use_systemd}
    102 #Requires:      systemd
    103 #Requires(post): systemd
    104 #Requires(preun): systemd
    105 #Requires(postun): systemd
    106 #%else
     128%if %{use_systemd}
     129Requires:       systemd
     130Requires(post): systemd
     131Requires(preun): systemd
     132Requires(postun): systemd
     133%else
    107134#Requires:       xinetd
    108 #%endif
     135%endif
    109136%description daemon
    110137The git dÊmon for supporting git:// access to git repositories
     
    114141Summary:        Simple web interface to git repositories
    115142Group:          Development/Tools
    116 BuildArch:      noarch
     143%if %{noarch_sub}
     144BuildArch:      noarch
     145%endif
    117146Requires:       git = %{version}-%{release}
    118147
     
    121150%endif
    122151
    123 %package hg
    124 Summary:        Git tools for working with mercurial repositories
    125 Group:          Development/Tools
    126 BuildArch:      noarch
    127 Requires:       git = %{version}-%{release}
    128 Requires:       mercurial >= 1.8
    129 
    130 %description hg
    131 %{summary}.
    132 
    133152%package p4
    134153Summary:        Git tools for working with Perforce depots
    135154Group:          Development/Tools
    136 BuildArch:      noarch
     155%if %{noarch_sub}
     156BuildArch:      noarch
     157%endif
    137158BuildRequires:  python
    138159Requires:       git = %{version}-%{release}
     
    143164Summary:        Git tools for importing Subversion repositories
    144165Group:          Development/Tools
    145 Requires:       git = %{version}-%{release}, subversion, subversion-perl
     166Requires:       git = %{version}-%{release}, subversion
     167Requires:       perl(Digest::MD5)
     168%if ! %{defined perl_bootstrap}
    146169#Requires:       perl(Term::ReadKey)
     170%endif
    147171%description svn
    148172Git tools for importing Subversion repositories.
     
    151175Summary:        Git tools for importing CVS repositories
    152176Group:          Development/Tools
    153 BuildArch:      noarch
     177%if %{noarch_sub}
     178BuildArch:      noarch
     179%endif
    154180Requires:       git = %{version}-%{release}, cvs
    155181Requires:       cvsps
    156 Requires:       perl-DBD-SQLite
     182Requires:       perl(DBD::SQLite)
    157183%description cvs
    158184Git tools for importing CVS repositories.
     
    161187Summary:        Git tools for sending email
    162188Group:          Development/Tools
    163 BuildArch:      noarch
     189%if %{noarch_sub}
     190BuildArch:      noarch
     191%endif
    164192Requires:       git = %{version}-%{release}, perl-Git = %{version}-%{release}
    165193Requires:       perl(Authen::SASL)
     
    173201Summary:        Git GUI tool
    174202Group:          Development/Tools
    175 BuildArch:      noarch
     203%if %{noarch_sub}
     204BuildArch:      noarch
     205%endif
    176206Requires:       git = %{version}-%{release}, tk >= 8.4
    177207Requires:       gitk = %{version}-%{release}
     
    182212Summary:        Git revision tree visualiser
    183213Group:          Development/Tools
    184 BuildArch:      noarch
     214%if %{noarch_sub}
     215BuildArch:      noarch
     216%endif
    185217Requires:       git = %{version}-%{release}, tk >= 8.4
    186218%description -n gitk
     
    192224Summary:        Perl interface to Git
    193225Group:          Development/Libraries
    194 BuildArch:      noarch
     226%if %{noarch_sub}
     227BuildArch:      noarch
     228%endif
    195229Requires:       git = %{version}-%{release}
    196230#BuildRequires:  perl(Error)
     
    205239Summary:        Perl interface to Git::SVN
    206240Group:          Development/Libraries
    207 BuildArch:      noarch
     241%if %{noarch_sub}
     242BuildArch:      noarch
     243%endif
    208244Requires:       git = %{version}-%{release}
    209245Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
     
    218254Group:          Applications/Editors
    219255Requires:       git = %{version}-%{release}
     256%if %{noarch_sub}
    220257BuildArch:      noarch
    221258Requires:       emacs(bin) >= %{_emacs_version}
     259%else
     260Requires:       emacs-common
     261%endif
    222262
    223263%description -n emacs-git
     
    227267Summary:        Elisp source files for git version control system support for Emacs
    228268Group:          Applications/Editors
    229 BuildArch:      noarch
     269%if %{noarch_sub}
     270BuildArch:      noarch
     271%endif
    230272Requires:       emacs-git = %{version}-%{release}
    231273
     
    235277%endif
    236278
    237 %package debug
    238 Summary: HLL debug data for exception handling support.
    239 
    240 %description debug
    241 HLL debug data for exception handling support.
    242 
     279%debug_package
    243280
    244281%prep
     
    257294V = 1
    258295CFLAGS = %{optflags}
     296#LDFLAGS = %{__global_ldflags}
    259297#BLK_SHA1 = 1
    260298#NEEDS_CRYPTO_WITH_SSL = 1
     
    262300ETC_GITCONFIG = %{_sysconfdir}/gitconfig
    263301DESTDIR = %{buildroot}
    264 INSTALL = install -p
     302INSTALL = %{_bindir}/install -p
    265303GITWEB_PROJECTROOT = %{_var}/lib/git
    266304GNU_ROFF = 1
     
    281319%build
    282320make %{?_smp_mflags} all
    283 %if ! 0%{?_without_docs}
    284 make doc
     321%if ! %{use_prebuilt_docs} && ! 0%{?_without_docs}
     322make %{?_smp_mflags} doc
    285323%endif
    286324
     
    296334%install
    297335rm -rf %{buildroot}
    298 make INSTALLDIRS=vendor install
    299 %if ! 0%{?_without_docs}
    300 make INSTALLDIRS=vendor install-doc
     336make %{?_smp_mflags} INSTALLDIRS=vendor install
     337%if ! %{use_prebuilt_docs} && ! 0%{?_without_docs}
     338make %{?_smp_mflags} INSTALLDIRS=vendor install-doc
     339%else
     340%if %{use_prebuilt_docs}
     341cp -a prebuilt_docs/man/* %{buildroot}%{_mandir}
     342cp -a prebuilt_docs/html/* Documentation/
     343%endif
    301344%endif
    302345
     
    310353    %{buildroot}%{elispdir}
    311354done
    312 install -Dpm 644 %{SOURCE2} \
     355install -Dpm 644 %{SOURCE10} \
    313356    %{buildroot}%{_emacs_sitestartdir}/git-init.el
    314357
     
    316359
    317360make -C contrib/subtree install
    318 %if ! 0%{?_without_docs}
     361%if ! %{use_prebuilt_docs} && ! 0%{?_without_docs}
    319362make -C contrib/subtree install-doc
    320363%endif
     364# it's ugly hack, but this file don't need to be copied to this directory
     365# it's already part of git-core-doc and it's alone here
     366rm -f %{buildroot}%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}/git-subtree.html
    321367
    322368%if 0
    323369mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d
    324 install -pm 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/httpd/conf.d/git.conf
     370install -pm 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/httpd/conf.d/git.conf
    325371sed "s|@PROJECTROOT@|%{_var}/lib/git|g" \
    326     %{SOURCE6} > %{buildroot}%{_sysconfdir}/gitweb.conf
     372    %{SOURCE14} > %{buildroot}%{_sysconfdir}/gitweb.conf
    327373%else
    328374rm -rf %{buildroot}%{_var}/www/git/
     
    351397
    352398mkdir -p %{buildroot}%{_var}/lib/git
    353 %if 0
    354399%if %{use_systemd}
    355400mkdir -p %{buildroot}%{_unitdir}
    356 cp -a %{SOURCE12} %{SOURCE13} %{buildroot}%{_unitdir}
    357 %else
     401cp -a %{SOURCE15} %{SOURCE16} %{buildroot}%{_unitdir}
     402%else
     403%if 0
    358404mkdir -p %{buildroot}%{_sysconfdir}/xinetd.d
    359405# On EL <= 5, xinetd does not enable IPv6 by default
     
    366412    -e "s|^}|$enable_ipv6\n$&|;" \
    367413%endif
    368     %{SOURCE3} > %{buildroot}%{_sysconfdir}/xinetd.d/git
    369 %endif
    370 %endif
    371 
    372 # Install bzr and hg remote helpers from contrib
    373 install -pm 755 contrib/remote-helpers/git-remote-* %{buildroot}%{gitcoredir}
     414    %{SOURCE11} > %{buildroot}%{_sysconfdir}/xinetd.d/git
     415%endif
     416%endif
    374417
    375418# Setup bash completion
    376 mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
    377 install -pm 644 contrib/completion/git-completion.bash %{buildroot}%{_sysconfdir}/bash_completion.d/git
     419install -Dpm 644 contrib/completion/git-completion.bash %{buildroot}%{bashcompdir}/git
     420ln -s git %{buildroot}%{bashcompdir}/gitk
    378421
    379422# Install tcsh completion
     
    386429mv contrib/hooks %{buildroot}%{_datadir}/git-core/contrib
    387430chmod +x %{buildroot}%{_datadir}/git-core/contrib/hooks/*
    388 ln -s ../../../git-core/contrib/hooks contrib/
     431ln -s %{buildroot}%{_datadir}/git-core/contrib/hooks contrib/
    389432
    390433# Install git-prompt.sh
     
    393436    %{buildroot}%{_datadir}/git-core/contrib/completion/
    394437
     438%if 0
     439# install git-gui .desktop file
     440desktop-file-install \
     441%if %{desktop_vendor_tag}
     442  --vendor fedora \
     443%endif
     444  --dir=%{buildroot}%{_datadir}/applications %{SOURCE13}
     445%endif
     446
    395447# find translations
    396 %if 0
    397448%find_lang %{name} %{name}.lang
    398449cat %{name}.lang >> bin-man-doc-files
    399 %else
    400 find %{buildroot}%{_datadir}/locale/* -type f | sed -e s@^%{buildroot}@@ >> bin-man-doc-files
    401 %endif
    402450
    403451# quiet some rpmlint complaints
    404452chmod -R g-w %{buildroot}
    405453find %{buildroot} -name git-mergetool--lib | xargs chmod a-x
    406 rm -f {Documentation/technical,contrib/emacs,contrib/credential/gnome-keyring}/.gitignore
     454# rm -f {Documentation/technical,contrib/emacs,contrib/credential/gnome-keyring}/.gitignore
     455# These files probably are not needed
     456find . -name .gitignore -delete
    407457chmod a-x Documentation/technical/api-index.sh
    408458find contrib -type f | xargs chmod -x
    409459
     460# Split core files
     461not_core_re="git-(add--interactive|am|credential-netrc|difftool|instaweb|relink|request-pull|send-mail|submodule)|gitweb|prepare-commit-msg|pre-rebase"
     462grep -vE "$not_core_re|\/man\/" bin-man-doc-files > bin-files-core
     463%if %{use_prebuilt_docs} || ! 0%{?_without_docs}
     464grep -vE "$not_core_re" bin-man-doc-files | grep "\/man\/" > man-doc-files-core
     465%endif
     466grep -E "$not_core_re" bin-man-doc-files > bin-man-doc-git-files
     467
    410468
    411469%clean
     
    414472%if %{use_systemd}
    415473%post daemon
    416 %systemd_post git.service
     474%systemd_post git@.service
    417475
    418476%preun daemon
    419 %systemd_preun git.service
     477%systemd_preun git@.service
    420478
    421479%postun daemon
    422 %systemd_postun_with_restart git.service
    423 %endif
    424 
    425 %files -f bin-man-doc-files
    426 %defattr(-,root,root)
     480%systemd_postun_with_restart git@.service
     481%endif
     482
     483%files -f bin-man-doc-git-files
     484%defattr(-,root,root)
     485%if 0
     486%{elispdir}
     487%{_emacs_sitestartdir}/git-init.el
     488%endif
     489%{_datadir}/git-core/contrib/hooks/update-paranoid
     490%{_datadir}/git-core/contrib/hooks/setgitperms.perl
     491#%{_datadir}/git-core/*
     492#%doc Documentation/*.txt
     493#%{!?_without_docs: %doc Documentation/*.html}
     494#%{!?_without_docs: %doc Documentation/howto/* Documentation/technical/*}
     495
     496%files core -f bin-files-core
     497%defattr(-,root,root)
     498%{!?_licensedir:%global license %doc}
     499%license COPYING
     500# exlude is best way here because of troubels with symlinks inside git-core/
     501%exclude %{_datadir}/git-core/contrib/hooks/update-paranoid
     502%exclude %{_datadir}/git-core/contrib/hooks/setgitperms.perl
     503%{bashcomproot}
    427504%{_datadir}/git-core/
    428 %doc README COPYING Documentation/*.txt Documentation/RelNotes contrib/
     505
     506%if %{use_prebuilt_docs} || ! 0%{?_without_docs}
     507%files core-doc -f man-doc-files-core
     508%else
     509%files core-doc
     510%endif
     511%defattr(-,root,root)
     512%doc README.md Documentation/*.txt Documentation/RelNotes contrib/
    429513%{!?_without_docs: %doc Documentation/*.html Documentation/docbook-xsl.css}
    430514%{!?_without_docs: %doc Documentation/howto Documentation/technical}
    431 %{_sysconfdir}/bash_completion.d
    432 
    433 %files bzr
    434 %defattr(-,root,root)
    435 %{gitcoredir}/git-remote-bzr
    436 
    437 %files hg
    438 %defattr(-,root,root)
    439 %{gitcoredir}/git-remote-hg
     515%if ! %{use_prebuilt_docs}
     516%{!?_without_docs: %doc contrib/subtree/git-subtree.html}
     517%endif
    440518
    441519%files p4
     
    457535%defattr(-,root,root)
    458536%doc Documentation/*git-cvs*.txt
     537%if "%{gitcoredir}" != "%{_bindir}"
    459538%{_bindir}/git-cvsserver
     539%endif
    460540%{gitcoredir}/*cvs*
    461541%{!?_without_docs: %{_mandir}/man1/*cvs*.1*}
     
    521601%if %{use_systemd}
    522602%{_unitdir}/git.socket
    523 %{_unitdir}/git.service
     603%{_unitdir}/git@.service
    524604%else
    525605%if 0
     
    544624# No files for you!
    545625
    546 %files debug
    547 %defattr(-,root,root)
    548 %{_bindir}/*.dbg
    549 %{gitcoredir}/*.dbg
    550 
    551626%changelog
     627* Tue Dec 13 2016 Dmitriy Kuminov <coding@dmik.org> 2.11.0-1
     628- Update git to version 2.11.0.
     629- Increase stack size to 8 MB to fix crashes when cloning huge repos.
     630- Link against LIBCx 0.4 (this brings EXCEPTQ TRP report generator).
     631- Rebuild against LIBC 0.6.6 and GCC 4.9.2.
     632- Enable %lang definitions.
     633
    552634* Wed Sep 10 2014 yd
    553635- added debug package with symbolic info for exceptq.
Note: See TracChangeset for help on using the changeset viewer.