recipes: Adjust 'docsdir' variable to be consistent with the current recipe format
[dragora.git] / recipes / xorg / proto / xorgproto / recipe
blobf6f36b6c29c18d7282e52b28e23eea09add9b764
1 # Build recipe for xorgproto.
3 # Copyright (c) 2018-2019 Matias Fonzo, <selk@dragora.org>.
4 # Copyright (c) 2021 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.
18 # Exit immediately on any error
19 set -e
21 program=xorgproto
22 version=2021.5
23 release=2
25 # Define a category for the output of the package name
26 pkgcategory=xorg_proto
28 tarname=${program}-${version}.tar.bz2
30 # Remote source(s)
31 fetch=https://www.x.org/releases/individual/proto/$tarname
33 description="
34 X Window System Unified Protocol.
36 This package provides the headers and specification documents defining
37 the core protocol and (many) extensions for the X Window System.  The
38 extensions are those common among servers descended from X.Org 6.7.  It
39 also includes a number of headers that aren't purely protocol related,
40 but are depended upon by many other X Window System packages to provide
41 common definitions and porting layer.
44 homepage=https://www.x.org
45 license="MIT X Consortium"
47 # Source documentation
48 docs="AUTHORS COPYING* README.md"
49 docsdir="${docdir}/${program}-${version}"
51 build()
53     unpack "${tardir}/$tarname"
55     cd "$srcdir"
57     # Set sane permissions
58     chmod -R u+w,go-w,a+rX-s .
60     rm -rf BUILD
61     mkdir BUILD
62     cd BUILD
64     meson setup $configure_args -Dlegacy=true ..
66     ninja -j${jobs}
67     DESTDIR="$destdir" ninja -j${jobs} install
69     cd ..
71     # This is provided by 'xorg/lib/libXvMC' currently
72     rm "${destdir}/usr/include/X11/extensions/vldXvMC.h"
74     # Compress and link man pages (if needed)
75     if test -d "${destdir}/$mandir"
76     then
77         (
78             cd "${destdir}/$mandir"
79             find . -type f -exec lzip -9 {} +
80             find . -type l | while read -r file
81             do
82                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
83                 rm -- "$file"
84             done
85         )
86     fi
88     # Copy documentation
89     mkdir -p "${destdir}/$docsdir"
90     cp -p $docs "${destdir}/$docsdir"