blob: 4eca8ab0bddeec5d9219bdde3f05acba56ea9bd9 (
plain)
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
|
GIT_VERSION ?= 2.30.0
GIT_STATIC := $(if $(filter true,$(BUILD_HOST_STATIC)),-static,)
GIT_MAKE_ARGS := \
prefix=/opt/git \
V=1 \
CC="$(BUILD_HOST_CC)" \
CFLAGS="-O2 -Wall -Wextra -I$(OUTPUT)/rootfs/opt/zlib/include -I$(OUTPUT)/rootfs/opt/libressl/include" \
LDFLAGS="-L$(OUTPUT)/rootfs/opt/zlib/lib -L$(OUTPUT)/rootfs/opt/libressl/lib $(GIT_STATIC)" \
NO_PERL=YesPlease \
CURLDIR=$(OUTPUT)/rootfs/opt/curl \
CURL_LDFLAGS="-L$(OUTPUT)/rootfs/opt/curl/lib -lcurl -lssl -lcrypto -lz" \
NO_R_TO_GCC_LINKER=YesPlease \
NO_REGEX=NeedsStartEnd \
NO_EXPAT=YesPlease \
NO_TCLTK=YesPlease \
NO_GETTEXT=YesPlease \
NO_SVN_TESTS=YesPlease \
BLK_SHA1=YesPlease \
NO_ICONV=YesPlease \
NO_PYTHON=YesPlease \
NO_INSTALL_HARDLINKS=YesPlease \
NO_SYS_POLL_H=YesPlease \
HAVE_DEV_TTY=YesPlease \
USE_NSEC=1 \
LIBC_CONTAINS_LIBINTL=1 \
HAVE_ALLOCA_H=1 \
HAVE_CLOCK_GETTIME=1 \
HAVE_CLOCK_MONOTONIC=1 \
NEEDS_SSL_WITH_CURL=YesPlease \
NEEDS_CRYPTO_WITH_SSL=YesPlease
clean-git:
rm -f $(OUTPUT)/build-host/.lh_git_*
$(OUTPUT)/sources/git-$(GIT_VERSION).tar.gz: | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed
exec setuidgid $(NORMALUSER) cd $(OUTPUT)/sources wget https://www.kernel.org/pub/software/scm/git/git-$(GIT_VERSION).tar.gz
$(OUTPUT)/build-host/.lh_git_dled: $(OUTPUT)/sources/git-$(GIT_VERSION).tar.gz | $(OUTPUT)/build-build/.lh_skarnet_installed
exec setuidgid $(NORMALUSER) s6-touch $@
$(OUTPUT)/build-host/.lh_git_copied: $(OUTPUT)/build-host/.lh_git_dled | $(OUTPUT)/build-build/.lh_skarnet_installed
exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-host/git-$(GIT_VERSION)
exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host tar -zxpvf $(OUTPUT)/sources/git-$(GIT_VERSION).tar.gz
exec setuidgid $(NORMALUSER) s6-touch $@
$(OUTPUT)/build-host/.lh_git_built: $(OUTPUT)/build-host/.lh_git_copied $(OUTPUT)/build-host/.lh_libressl_installed $(OUTPUT)/build-host/.lh_curl_installed $(OUTPUT)/build-host/.lh_zlib_installed | $(OUTPUT)/build-build/.lh_skarnet_installed
exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/git-$(GIT_VERSION) $(MAKE) $(GIT_MAKE_ARGS)
exec setuidgid $(NORMALUSER) s6-touch $@
$(OUTPUT)/build-host/.lh_git_installed: $(OUTPUT)/build-host/.lh_git_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed
exec cd $(OUTPUT)/build-host/git-$(GIT_VERSION) $(MAKE) install DESTDIR=$(OUTPUT)/rootfs prefix=/opt/git-$(GIT_VERSION)
exec makenamelink $(OUTPUT)/rootfs/opt git git-$(GIT_VERSION) $(OUTPUT)/tmp
exec makelinks $(OUTPUT)/rootfs /bin /opt/git/bin
exec setuidgid $(NORMALUSER) s6-touch $@
|