1 # Build recipe for libxml2.
3 # Copyright (C) 2018, MMPG <mmpg@vp.pl>
4 # Copyright (C) 2018, 2019 Matias Fonzo <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
20 pkgversion="$(echo $version | tr - _)"
23 # Set 'outdir' for a nice and well-organized output directory
24 outdir="${outdir}/${arch}/libs"
26 tarname=${program}-${version}.tar.gz
29 fetch=http://xmlsoft.org/sources/$tarname
32 A XML C parser library and toolkit.
34 XML itself is a meta language to design markup languages. HTML is the
35 most well-known markup language. Though the library is written in C,
36 a variety of language bindings make it available in other environments.
39 homepage=http://xmlsoft.org
42 docs="AUTHORS ChangeLog Copyright NEWS README TODO"
43 docsdir="${docdir}/${program}-${version}"
45 # The source has a custom directory
46 srcdir="${program}-${version%-*}"
51 unpack "${tardir}/$tarname"
55 # Set sane permissions
56 chmod -R u+w,go-w,a+rX-s .
58 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
60 --libdir=/usr/lib${libSuffix} \
66 --with-python=/usr/bin/python3 \
69 --build="$(cc -dumpmachine)"
72 make -j${jobs} DESTDIR="$destdir" install-strip
74 # Compress info documents deleting index file for the package
75 if test -d "${destdir}/$infodir"
77 rm -f "${destdir}/${infodir}/dir"
78 lzip -9 "${destdir}/${infodir}"/*
81 # Compress and link man pages (if needed)
82 if test -d "${destdir}/$mandir"
85 cd "${destdir}/$mandir"
86 find . -type f -exec lzip -9 '{}' +
87 find . -type l | while read -r file
89 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
96 mkdir -p "${destdir}${docsdir}"
97 cp -p $docs "${destdir}${docsdir}"