recipes: Rename 'pkghashtag' variable to 'pkgcategory'
[dragora.git] / recipes / devel / pkgconf / recipe
blob339b21122542bafd432ceadb6a39308cec919430
1 # Build recipe for pkgconf.
3 # Copyright (c) 2016-2020 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.6.3
19 release=2
21 # Define a category for the output of the package name
22 pkgcategory=devel
24 tarname=${program}-${version}.tar.gz
26 # Remote source(s)
27 fetch=http://distfiles.dereferenced.org/pkgconf/$tarname
29 description="
30 Package compiler and linker metadata toolkit.
32 pkgconf is a program which helps to configure compiler and linker flags
33 for development frameworks.  It is similar to pkg-config from
34 freedesktop.org.
36 libpkgconf is a library which provides access to most of pkgconf's
37 functionality, to allow other tooling such as compilers and IDEs
38 to discover and use frameworks configured by pkgconf.
41 homepage=http://git.dereferenced.org/pkgconf/pkgconf
42 license=Custom
44 # Source documentation
45 docs="AUTHORS COPYING NEWS README*"
46 docsdir="${docdir}/${program}-${version}"
48 build()
50     set -e
52     unpack "${tardir}/$tarname"
54     cd "$srcdir"
56     # Set sane permissions
57     chmod -R u+w,go-w,a+rX-s .
59     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
60      $configure_args \
61      --libdir=/usr/lib${libSuffix} \
62      --mandir=$mandir \
63      --docdir=$docsdir \
64      --enable-static=yes \
65      --enable-shared=yes \
66      --with-pkg-config-dir=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:/opt/trinity/lib/pkgconfig \
67      --build="$(cc -dumpmachine)"
69     make -j${jobs} V=1
70     #make -j${jobs} check;      # It needs "kyua" ...
71     make -j${jobs} DESTDIR="$destdir" install-strip
73     # Create symlink-compatibility for those
74     # programs looking for `pkg-config'
75     ln -s pkgconf "${destdir}/usr/bin/pkg-config"
77     # Include profile file
78     mkdir -p "${destdir}/etc/profile.d"
79     cp -p "${worktree}/archive/pkgconf/etc/profile.d/pkgconf.sh" \
80            "${destdir}/etc/profile.d/"
81     chmod 644 "${destdir}/etc/profile.d/pkgconf.sh"
83     # To handle config file(s)
84     touch "${destdir}/etc/profile.d/.graft-config"
86     # Compress and link man pages (if needed)
87     if test -d "${destdir}/$mandir"
88     then
89         (
90             cd "${destdir}/$mandir"
91             find . -type f -exec lzip -9 '{}' +
92             find . -type l | while read -r file
93             do
94                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
95                 rm -- "$file"
96             done
97         )
98     fi
100     # Copy documentation
101     mkdir -p "${destdir}${docsdir}"
102     cp -p $docs "${destdir}${docsdir}"