-
Notifications
You must be signed in to change notification settings - Fork 190
/
Copy pathgit.spec
77 lines (67 loc) · 2.23 KB
/
git.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
### RPM external git 2.47.1
## INITENV +PATH PATH %{i}/bin
## INITENV +PATH PATH %{i}/libexec/git-core
## INITENV SET GIT_TEMPLATE_DIR %{i}/share/git-core/templates
## INITENV SET GIT_SSL_CAINFO %{i}/share/ssl/certs/ca-bundle.crt
## INITENV SET GIT_EXEC_PATH %{i}/libexec/git-core
Source0: https://github.com/git/git/archive/v%{realversion}.tar.gz
Source1: https://raw.github.com/curl/curl/curl-8_11_1/scripts/mk-ca-bundle.pl
Patch1: git-2.19.0-runtime
Requires: curl expat zlib pcre2 python3
BuildRequires: autotools
%define drop_files %{i}/share/man
%define runpath_opts -m libexec
%prep
%setup -b 0 -n %{n}-%{realversion}
%patch1 -p1
sed -i -e 's|$(sysconfdir)/git|etc/git|' Makefile
%build
export LDFLAGS=""
export NO_LIBPCRE1_JIT=1
make %{makeprocesses} configure
./configure prefix=%{i} \
--with-curl=${CURL_ROOT} \
--with-expat=${EXPAT_ROOT} \
--with-libpcre=${PCRE2_ROOT} \
--with-python=$(which python3) \
--with-zlib=${ZLIB_ROOT}
make %{makeprocesses} \
NO_GETTEXT=1 \
NO_R_TO_GCC_LINKER=1 \
RUNTIME_PREFIX=1 \
V=1 \
NO_CROSS_DIRECTORY_HARDLINK=1 \
NO_INSTALL_HARDLINKS=1 \
all
# Generate ca-bundle.crt (Certification Authority certificates)
mkdir ./ca-bundle
pushd ./ca-bundle
cp %{SOURCE1} ./mk-ca-bundle.pl
chmod +x ./mk-ca-bundle.pl
./mk-ca-bundle.pl
popd
%install
export NO_LIBPCRE1_JIT=1
make %{makeprocesses} \
V=1 \
NO_CROSS_DIRECTORY_HARDLINK=1 \
NO_INSTALL_HARDLINKS=1 \
install
# Install ca-bundle.crt (Certification Authority certificates)
mkdir -p %{i}/share/ssl/certs
cp ./ca-bundle/ca-bundle.crt %{i}/share/ssl/certs/ca-bundle.crt
perl -p -i -e "s|^#!.*python.*|#!/usr/bin/env python3|" %{i}/libexec/git-core/git-p4
%post
%{relocateConfig}bin/git-cvsserver
%{relocateConfig}libexec/git-core/git-sh-i18n
%{relocateConfig}libexec/git-core/git-archimport
%{relocateConfig}libexec/git-core/git-cvsexportcommit
%{relocateConfig}libexec/git-core/git-cvsimport
%{relocateConfig}libexec/git-core/git-cvsserver
%{relocateConfig}libexec/git-core/git-instaweb
%{relocateConfig}libexec/git-core/git-send-email
%{relocateConfig}libexec/git-core/git-svn
%{relocateConfig}libexec/git-core/git-citool
%{relocateConfig}libexec/git-core/git-gui
%{relocateConfig}share/perl5/Git/I18N.pm
%{relocateConfig}share/gitweb/gitweb.cgi