~dragora/dragora/trunk

« back to all changes in this revision

Viewing changes to recipes/libs/libxkbcommon/recipe

  • Committer: Gogs
  • Author(s): Matías Fonzo
  • Date: 2018-10-29 19:50:35 UTC
  • mfrom: (1221.1.8)
  • Revision ID: git-v1:ae2026f0e776f7a057c162c046cb2d06abff2090
Merge branch 'master' of n4dir/dragora into master

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Build recipe for libxkbcommon.
 
2
#
 
3
# Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
 
4
#
 
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
 
8
#
 
9
#    http://www.apache.org/licenses/LICENSE-2.0
 
10
#
 
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.
 
16
 
 
17
program=libxkbcommon
 
18
version=0.8.2
 
19
release=1
 
20
 
 
21
# Set 'outdir' for a nice and well-organized output directory
 
22
outdir="${outdir}/${arch}/libs"
 
23
 
 
24
tarname=${program}-${version}.tar.xz
 
25
 
 
26
# Remote source(s)
 
27
fetch=http://xkbcommon.org/download/"$tarname"
 
28
 
 
29
description="
 
30
xkbcommon is a library to handle keyboard descriptions.
 
31
 
 
32
Including loading them from disk, parsing them and handling their state.
 
33
It's mainly meant for client toolkits, window systems, and other
 
34
system applications; currently that includes Wayland, kmscon,
 
35
GTK+, Clutter, and more
 
36
"
 
37
 
 
38
homepage=https://xkbcommon.org/
 
39
license="GPLv2"
 
40
 
 
41
# Source documentation
 
42
docs="LICENSE NEWS README.md "
 
43
docsdir="${docdir}/${program}-${version}"
 
44
 
 
45
build()
 
46
{
 
47
    set -e
 
48
        
 
49
    unpack "${tardir}/$tarname"
 
50
        
 
51
    cd "$srcdir"
 
52
 
 
53
    ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
 
54
     $configure_args \
 
55
     --libdir=/usr/lib${libSuffix} \
 
56
     --infodir=$infodir \
 
57
     --mandir=$mandir \
 
58
     --docdir=$docdir \
 
59
     --build="$(cc -dumpmachine)"
 
60
 
 
61
    make -j${jobs} V=1
 
62
    make -j${jobs} DESTDIR="$destdir" install
 
63
 
 
64
    # Compress info documents deleting index file for the package
 
65
    if test -d "${destdir}/$infodir"
 
66
    then
 
67
        rm -f "${destdir}/${infodir}/dir"
 
68
        lzip -9 "${destdir}/${infodir}"/*
 
69
    fi
 
70
 
 
71
    # Compress and link man pages (if needed)
 
72
    if test -d "${destdir}/$mandir"
 
73
    then
 
74
        (
 
75
            cd "${destdir}/$mandir"
 
76
            find . -type f -exec lzip -9 '{}' +
 
77
            find . -type l | while read -r file
 
78
            do
 
79
                ln -sf "$(readlink -- "$file").lz" "${file}.lz"
 
80
                rm -- "$file"
 
81
            done
 
82
        )
 
83
    fi
 
84
 
 
85
    # Copy documentation
 
86
    mkdir -p "${destdir}${docsdir}"
 
87
    cp -p $docs "${destdir}${docsdir}/"
 
88
}
 
89
 
 
90