1 # Build recipe for tdelibs.
3 # Copyright (c) 2020-2021 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 # Exit immediately on any error
20 program=tdelibs-trinity
24 # Define a category for the output of the package name
27 tarname=${program}-${version}.tar.xz
30 fetch=https://mirror.ppa.trinitydesktop.org/trinity/releases/R${version}/main/$tarname
33 The Trinity Desktop Environment (TDE) libraries.
35 This package includes libraries that are central to the development and
36 execution of a KDE program, as well as internationalization files for
37 these libraries, misc HTML documentation, theme modules, and regression
41 homepage=https://www.trinitydesktop.org/
42 license="GPLv2+, LGPLv2+ | BSD 2-clause"
44 # Source documentation
45 docs="AUTHORS COPYING* DEBUG NAMING README TODO KDE?PORTING.html"
46 docsdir="${docdir}/${program}-${version}"
50 unpack "${tardir}/$tarname"
54 patch -p1 < "${worktree}/patches/tdelibs/xcomposite-shared.patch"
56 # Set sane permissions
57 chmod -R u+w,go-w,a+rX-s .
63 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
64 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
65 -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="$QICFLAGS" \
66 -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="$QICXXFLAGS" \
67 -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(echo $QILDFLAGS | sed 's/-s//')" \
68 -DCMAKE_INSTALL_PREFIX=/usr \
69 -DLIB_SUFFIX=${libSuffix} \
70 -DCMAKE_VERBOSE_MAKEFILE=ON \
71 -DCMAKE_SKIP_RPATH=OFF \
72 -DCMAKE_INSTALL_PREFIX=/opt/trinity \
73 -DCONFIG_INSTALL_DIR=/etc/trinity \
74 -DSYSCONF_INSTALL_DIR=/etc/trinity \
75 -DCMAKE_LIBRARY_PATH=/opt/trinity/lib${libSuffix} \
76 -DCMAKE_INCLUDE_PATH=/opt/trinity/include \
77 -DXDG_MENU_INSTALL_DIR=/etc/xdg/menus \
78 -DWITH_GCC_VISIBILITY=ON \
90 -DDEFAULT_SPELL_CHECKER=ASPELL \
93 -DWITH_TDEHWLIB_DAEMONS=ON \
94 -DWITH_LOGINDPOWER=OFF \
99 -DWITH_CONSOLEKIT=OFF \
100 -DWITH_NETWORK_MANAGER_BACKEND=OFF \
103 -DWITH_XCOMPOSITE=ON \
107 -DWITH_CRYPTSETUP=ON \
108 -DWITH_IMAGETOPS_BINARY=ON \
112 DESTDIR="$destdir" ninja -j${jobs} install
114 # To handle (dot) .new files via graft(1)
116 find "${destdir}/etc" -type d -print | while read -r directory
118 ( cd -- "$directory" && touch .graft-config )
121 # Compress and link man pages (if needed)
122 if test -d "${destdir}/$mandir"
125 cd "${destdir}/$mandir"
126 find . -type f -exec lzip -9 {} +
127 find . -type l | while read -r file
129 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
138 mkdir -p "${destdir}${docsdir}"
139 cp -p $docs "${destdir}${docsdir}"