123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- # Build recipe for git.
- #
- # Copyright (c) 2017-2018 Matias Fonzo, <selk@dragora.org>.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- program=git
- version=2.19.2
- release=2
- # Set 'outdir' for a nice and well-organized output directory
- outdir="${outdir}/${arch}/devel"
- tarname=${program}-${version}.tar.gz
- tarname_manpages=${program}-manpages-${version}.tar.gz
- # Remote source(s)
- fetch="
- http://mirrors.edge.kernel.org/pub/software/scm/git/$tarname
- http://mirrors.edge.kernel.org/pub/software/scm/git/$tarname_manpages
- "
- description="
- A fast, scalable, distributed revision control system.
- Git is a fast, scalable, distributed revision control system with an
- unusually rich command set that provides both high-level operations
- and full access to internals.
- Git is an Open Source project covered by the GNU General Public
- License version 2 (some parts of it are under different licenses,
- compatible with the GPLv2). It was originally written by Linus
- Torvalds with help of a group of hackers around the net.
- "
- homepage=http://www.git-scm.org
- license="GPLv2 only, LGPLv2.1"
- # Source documentation
- docs="COPYING LGPL-2.1 README*"
- docsdir="${docdir}/${program}-${version}"
- build()
- {
- set -e
- unpack "${tardir}/$tarname"
- cd "$srcdir"
- # Set sane permissions
- chmod -R u+w,go-w,a+rX-s .
- cat << EOF >> config.mak
- NO_GETTEXT=1
- NO_SVN_TESTS=1
- NO_REGEX=1
- NO_NSEC=1
- NO_SYS_POLL_H=1
- NO_PERL_CPAN_FALLBACKS=1
- NEEDS_CRYPTO_WITH_SSL=1
- INSTALL_SYMLINKS=1
- EOF
- ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
- $configure_args \
- --libdir=/usr/lib${libSuffix} \
- --mandir=$mandir \
- --docdir=$docsdir \
- --with-libpcre1 \
- --without-tcltk \
- --build="$(cc -dumpmachine)"
- make -j${jobs} V=1 INSTALLDIRS=vendor
- make -j${jobs} V=1 INSTALLDIRS=vendor \
- DESTDIR="$destdir" install
- # Compress and link man pages (if needed)
- if test -d "${destdir}/$mandir"
- then
- (
- cd "${destdir}/$mandir"
- # Unpack provided man-pages
- tar xf "${tardir}/$tarname_manpages"
- find . -type f -exec lzip -9 '{}' +
- find . -type l | while read -r file
- do
- ln -sf "$(readlink -- "$file").lz" "${file}.lz"
- rm -- "$file"
- done
- )
- fi
- unset tarname_manpages
- # Clean up inventory file for Perl
- # This line removes 'destdir' adding the suffix '.lz' for manpages
- find "${destdir}/" -type f -name '.packlist' | while read -r file
- do
- sed -i \
- -e "s|${destdir}||g" \
- -e "s|\.[0-9][a-z]*|&.lz|g" \
- $file
- done
- find "${destdir}/" -type f -name 'perllocal.pod' -exec rm -f {} +
- # Copy documentation
- mkdir -p "${destdir}${docsdir}"
- cp -p $docs "${destdir}${docsdir}/"
- }
|