recipes: Replace 'outdir' with package hash tags
[dragora.git] / recipes / tde / libart / recipe
blobccd2674a0a0f3808067eeb7e531a61c1a9edfea7
1 # Build recipe for libart-gpl.
3 # Copyright (c) 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=libart-lgpl-trinity
18 pkgname=libart
19 version=14.0.7
20 release=1
22 # Define hash tag to categorize the package name output
23 pkghashtag=tde
25 tarname=${program}-${version}.tar.xz
27 # Remote source(s)
28 fetch=http://mirror.ppa.trinitydesktop.org/trinity/releases/R${version}/main/dependencies/$tarname
30 description="
31 LGPL version of the libart library.
33 This is the LGPL'd component of libart.  All functions needed for
34 running the Gnome canvas, and for printing support, will be going in
35 here.  The GPL'd component will be getting various enhanced functions
36 for specific applications.
39 homepage=http://www.trinitydesktop.org/
40 license=LGPLv2+
42 # Source documentation
43 docs="AUTHORS COPYING ChangeLog NEWS README"
44 docsdir="${docdir}/${pkgname}-${version}"
46 build()
48     set -e
50     unpack "${tardir}/$tarname"
52     cd "$srcdir"
54     # Set sane permissions
55     chmod -R u+w,go-w,a+rX-s .
57     mkdir BUILD
58     cd BUILD
60     cmake \
61      -DCMAKE_C_FLAGS_RELEASE:STRING="$QICFLAGS"       \
62      -DCMAKE_CXX_FLAGS_RELEASE:STRING="$QICXXFLAGS"   \
63      -DCMAKE_SHARED_LINKER_FLAGS:STRING="$QILDFLAGS"  \
64      -DCMAKE_INSTALL_PREFIX=/usr                      \
65      -DLIB_SUFFIX=${libSuffix}                        \
66      -DCMAKE_VERBOSE_MAKEFILE=ON                      \
67      -DCMAKE_BUILD_TYPE=Release                       \
68      -DCMAKE_SKIP_INSTALL_RPATH=YES                   \
69      -DWITH_ALL_OPTIONS=ON                            \
70      ..
72     make -j${jobs}
73     make -j${jobs} DESTDIR="$destdir" install
75     # Compress and link man pages (if needed)
76     if test -d "${destdir}/$mandir"
77     then
78         (
79             cd "${destdir}/$mandir"
80             find . -type f -exec lzip -9 '{}' +
81             find . -type l | while read -r file
82             do
83                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
84                 rm -- "$file"
85             done
86         )
87     fi
89     cd ..
91     # Copy documentation
92     mkdir -p "${destdir}${docsdir}"
93     cp -p $docs "${destdir}${docsdir}"