recipes: tde/arts: refresh patch for musl coming from upstream
[dragora.git] / recipes / x-libs / shared-mime-info / recipe
blob36530ef6b78cf018e5de250cf528b4da1364026d
1 # Build recipe for Shared Mime Info.
3 # Copyright (C) 2018, MMPG <mmpg@vp.pl>
4 # Copyright (C) 2018-2019 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 program=shared-mime-info
19 version=1.14
20 release=1
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/x-libs"
25 tarname=${program}-${version}.tar.xz
27 # Remote source(s)
28 fetch=http://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/aee9ae9646cbef724bbb1bd2ba146556/$tarname
30 description="
31 A MIME database.
33 The shared-mime-info package contains a MIME database.
35 This allows central updates of MIME information for all
36 supporting applications.
39 homepage=http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/
40 license=GPLv2+
42 # Source documentation
43 docs="COPYING ChangeLog HACKING NEWS README"
44 docsdir="${docdir}/${program}-${version}"
46 # Limit parallel jobs for this build
47 jobs=1
49 build()
51     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      --disable-update-mimedb \
64      --build="$(cc -dumpmachine)"
66     make -j${jobs} V=1
67     make -j${jobs} DESTDIR="$destdir" install-strip
69     # Compress and link man pages (if needed)
70     if test -d "${destdir}/$mandir"
71     then
72         (
73             cd "${destdir}/$mandir"
74             find . -type f -exec lzip -9 '{}' +
75             find . -type l | while read -r file
76             do
77                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
78                 rm -- "$file"
79             done
80         )
81     fi
83     # Copy documentation
84     mkdir -p "${destdir}${docsdir}"
85     cp -p $docs "${destdir}${docsdir}"