1 # Build recipe for git.
3 # Copyright (c) 2017-2019, 2021-2022 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Exit immediately on any error
24 # Define a category for the output of the package name
27 tarname=${program}-${version}.tar.gz
28 tarname_manpages=${program}-manpages-${version}.tar.gz
32 https://mirrors.edge.kernel.org/pub/software/scm/git/$tarname
33 https://mirrors.edge.kernel.org/pub/software/scm/git/$tarname_manpages
37 A fast, scalable, distributed revision control system.
39 Git is a fast, scalable, distributed revision control system with an
40 unusually rich command set that provides both high-level operations
41 and full access to internals.
43 Git is an Open Source project covered by the GNU General Public
44 License version 2 (some parts of it are under different licenses,
45 compatible with the GPLv2). It was originally written by Linus
46 Torvalds with help of a group of hackers around the net.
49 homepage=https://www.git-scm.org
50 license="GPLv2 only, LGPLv2.1"
52 # Source documentation
53 docs="COPYING LGPL-2.1 README*"
54 docsdir="${docdir}/${program}-${version}"
58 unpack "${tardir}/$tarname"
62 # Set sane permissions
63 chmod -R u+w,go-w,a+rX-s .
65 cat << EOF >> config.mak
66 NEEDS_CRYPTO_WITH_SSL=1
70 ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" \
71 LDFLAGS="$QILDFLAGS" \
73 --libdir=/usr/lib${libSuffix} \
78 --with-python=python3 \
79 --build="$(gcc -dumpmachine)"
81 make -j${jobs} V=1 INSTALLDIRS=vendor
82 make -j${jobs} V=1 INSTALLDIRS=vendor \
83 DESTDIR="$destdir" install
85 # Compress and link man pages (if needed)
86 if test -d "${destdir}/$mandir"
89 cd "${destdir}/$mandir"
91 # Unpack provided man-pages
92 tar xf "${tardir}/$tarname_manpages"
94 find . -type f -exec lzip -9 {} +
95 find . -type l | while read -r file
97 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
102 unset -v tarname_manpages
104 # Clean up inventory file for Perl
106 # This line removes 'destdir' adding the suffix '.lz' for manpages
107 find "${destdir}/" -type f -name '.packlist' | while read -r file
110 -e "s|${destdir}||g" \
111 -e "s|\.[0-9][a-z]*|&.lz|g" \
115 find "${destdir}/" -type f -name 'perllocal.pod' -exec rm -f {} +
118 mkdir -p "${destdir}${docsdir}"
119 cp -p $docs "${destdir}${docsdir}"