use square brackets for the prelogin message
[dragora.git] / recipes / xorg / app / mkfontdir / recipe
blobcfb217c72c0bdbf00455754b0d729df6e34374c3
1 # Build recipe for mkfontdir.
3 # Copyright (C) 2017 Mateus P. Rodrigues <mprodrigues@dragora.org>.
5 # This recipe is free software: you have unlimited permission
6 # to copy, distribute and modify it.
8 program=mkfontdir
9 version=1.0.7
10 release=1
12 tarname=${program}-${version}.tar.bz2
14 # Remote source(s)
15 fetch=http://www.x.org/releases/individual/app/$tarname
17 description="
18 mkfontdir creates the fonts.dir files needed by the legacy X server core font
19 system.
22 homepage=http://www.x.org
23 license="MIT X Consortium"
25 # Source documentation
26 docs="COPYING ChangeLog README"
27 docsdir="${docdir}/${program}-${version}"
29 build()
31     set -e
33     unpack "${tardir}/$tarname"
35     cd "$srcdir"
37     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
38      $configure_args \
39      --libdir=/usr/lib${libSuffix} \
40      --infodir=$infodir \
41      --mandir=$mandir \
42      --docdir=$docsdir \
43      || true
45     make -j${jobs} V=1
46     make -j${jobs} DESTDIR="$destdir" install
48     # Compress info documents deleting index file for the package
49     if test -d "${destdir}/$infodir"
50     then
51         rm -f "${destdir}/${infodir}/dir"
52         lzip -9 "${destdir}/${infodir}"/*
53     fi
55     # Compress and link man pages (if needed)
56     if test -d "${destdir}/$mandir"
57     then
58         (
59             cd "${destdir}/$mandir"
60             find . -type f -exec lzip -9 '{}' +
61             find . -type l | while read -r file
62             do
63                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
64                 rm -- "$file"
65             done
66         )
67     fi
69     # Copy documentation
70     mkdir -p "${destdir}${docsdir}"
72     for file in $docs
73     do
74         if test -e $file
75         then
76             cp -p $file "${destdir}${docsdir}"
77         fi
78     done