1 # Build recipe for git.
3 # Copyright (c) 2017-2019 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.
21 # Define a category for the output of the package name
24 tarname=${program}-${version}.tar.gz
25 tarname_manpages=${program}-manpages-${version}.tar.gz
29 http://mirrors.edge.kernel.org/pub/software/scm/git/$tarname
30 http://mirrors.edge.kernel.org/pub/software/scm/git/$tarname_manpages
34 A fast, scalable, distributed revision control system.
36 Git is a fast, scalable, distributed revision control system with an
37 unusually rich command set that provides both high-level operations
38 and full access to internals.
40 Git is an Open Source project covered by the GNU General Public
41 License version 2 (some parts of it are under different licenses,
42 compatible with the GPLv2). It was originally written by Linus
43 Torvalds with help of a group of hackers around the net.
46 homepage=http://www.git-scm.org
47 license="GPLv2 only, LGPLv2.1"
49 # Source documentation
50 docs="COPYING LGPL-2.1 README*"
51 docsdir="${docdir}/${program}-${version}"
57 unpack "${tardir}/$tarname"
61 # Set sane permissions
62 chmod -R u+w,go-w,a+rX-s .
64 cat << EOF >> config.mak
68 NO_PERL_CPAN_FALLBACKS=1
69 NEEDS_CRYPTO_WITH_SSL=1
73 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
75 --libdir=/usr/lib${libSuffix} \
80 --build="$(cc -dumpmachine)"
82 make -j${jobs} V=1 INSTALLDIRS=vendor
83 make -j${jobs} V=1 INSTALLDIRS=vendor \
84 DESTDIR="$destdir" install
86 # Compress and link man pages (if needed)
87 if test -d "${destdir}/$mandir"
90 cd "${destdir}/$mandir"
92 # Unpack provided man-pages
93 tar xf "${tardir}/$tarname_manpages"
95 find . -type f -exec lzip -9 '{}' +
96 find . -type l | while read -r file
98 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
103 unset tarname_manpages
105 # Clean up inventory file for Perl
107 # This line removes 'destdir' adding the suffix '.lz' for manpages
108 find "${destdir}/" -type f -name '.packlist' | while read -r file
111 -e "s|${destdir}||g" \
112 -e "s|\.[0-9][a-z]*|&.lz|g" \
116 find "${destdir}/" -type f -name 'perllocal.pod' -exec rm -f {} +
119 mkdir -p "${destdir}${docsdir}"
120 cp -p $docs "${destdir}${docsdir}/"