strip remaining libraries for the distribution size
[dragora.git] / recipes / devel / pkgconf / recipe
blobadcd2b8b777dbf2f95f35273e2df8efed9d7639f
1 # Build recipe for pkgconf.
3 # Copyright (c) 2016-2017 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 program=pkgconf
18 version=1.3.10
19 release=1
21 tarname=${program}-${version}.tar.gz
23 # Remote source(s)
24 fetch=http://distfiles.dereferenced.org/pkgconf/$tarname
26 description="
27 Package compiler and linker metadata toolkit.
29 pkgconf is a program which helps to configure compiler and linker flags
30 for development frameworks.  It is similar to pkg-config from
31 freedesktop.org.
33 libpkgconf is a library which provides access to most of pkgconf's
34 functionality, to allow other tooling such as compilers and IDEs
35 to discover and use frameworks configured by pkgconf.
38 homepage=http://github.com/pkgconf/pkgconf
39 license=Custom
41 # Source documentation
42 docs="AUTHORS COPYING NEWS README*"
43 docsdir="${docdir}/${program}-${version}"
45 build()
47     set -e
49     unpack "${tardir}/$tarname"
51     cd "$srcdir"
53     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
54      $configure_args \
55      --libdir=/usr/lib${libSuffix} \
56      --mandir=$mandir \
57      --docdir=$docsdir \
58      --enable-static \
59      --enable-shared \
60      --with-pkg-config-dir=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig \
61      --build="$(cc -dumpmachine)"
63     make -j${jobs} V=1
64     #make check # It needs "kyua"...
65     make -j${jobs} DESTDIR="$destdir" install-strip
67     # Create symlink-compatibility for those
68     # programs looking for `pkg-config'
69     ln -s pkgconf "${destdir}/usr/bin/pkg-config"
71     # Include profile file
72     mkdir -p "${destdir}/etc/profile.d"
73     cp -p "${worktree}/archive/pkgconf/etc/profile.d/pkgconf.sh" \
74            "${destdir}/etc/profile.d/"
75     chmod 644 "${destdir}/etc/profile.d/pkgconf.sh"
77     # To handle config file(s)
78     touch "${destdir}/etc/profile.d/.graft-config"
80     # Compress man page
81     lzip -9 "${destdir}/${mandir}/man1/pkgconf.1"
83     # Copy documentation
84     mkdir -p "${destdir}${docsdir}"
85     cp -p $docs "${destdir}${docsdir}"