1 # Build recipe for tdelibs.
3 # Copyright (c) 2020-2022 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
21 version=20220503_32fc7e3e
24 # Define a category for the output of the package name
27 tarname=${program}-${version}.tar.lz
31 https://dragora.mirror.garr.it/current/sources/$tarname
32 rsync://rsync.dragora.org/current/sources/$tarname
36 The Trinity Desktop Environment (TDE) libraries.
38 This package includes libraries that are central to the development and
39 execution of a KDE program, as well as internationalization files for
40 these libraries, misc HTML documentation, theme modules, and regression
44 homepage=https://www.trinitydesktop.org/
45 license="GPLv2+, LGPLv2+ | BSD 2-clause"
47 # Source documentation
48 docs="AUTHORS COPYING* DEBUG NAMING README TODO KDE?PORTING.html"
49 docsdir="${docdir}/${program}-${version}"
53 unpack "${tardir}/$tarname"
57 patch -Np1 -i "${worktree}/patches/tdelibs/xcomposite-shared-masterbranch.patch"
59 # Set sane permissions
60 chmod -R u+w,go-w,a+rX-s .
67 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
68 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
69 -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="$QICFLAGS" \
70 -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="$QICXXFLAGS" \
71 -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(echo ${QILDFLAGS} | sed 's/-s//')" \
72 -DLIB_SUFFIX=${libSuffix} \
73 -DCMAKE_VERBOSE_MAKEFILE=ON \
74 -DCMAKE_SKIP_RPATH=OFF \
75 -DCMAKE_INSTALL_PREFIX=/opt/trinity \
76 -DCONFIG_INSTALL_DIR=/etc/trinity \
77 -DSYSCONF_INSTALL_DIR=/etc/trinity \
78 -DCMAKE_LIBRARY_PATH=/opt/trinity/lib${libSuffix} \
79 -DCMAKE_INCLUDE_PATH=/opt/trinity/include \
80 -DXDG_MENU_INSTALL_DIR=/etc/xdg/menus \
81 -DWITH_GCC_VISIBILITY=ON \
93 -DDEFAULT_SPELL_CHECKER=ASPELL \
96 -DWITH_LOGINDPOWER=OFF \
101 -DWITH_CONSOLEKIT=OFF \
102 -DWITH_NETWORK_MANAGER_BACKEND=OFF \
105 -DWITH_XCOMPOSITE=ON \
107 -DWITH_IMAGETOPS_BINARY=ON \
111 DESTDIR="$destdir" ninja -j${jobs} install
113 # This symlink will be handled from the post-install
114 # script to point to the correct location
115 rm -f "${destdir}/opt/trinity/share/icons/default.tde"
117 # To handle (dot) .new files via graft(1)
119 find "${destdir}/etc" -type d -print | while read -r directory
121 ( cd -- "$directory" && touch .graft-config )
124 # Compress and link man pages (if needed)
125 if test -d "${destdir}/$mandir"
128 cd "${destdir}/$mandir"
129 find . -type f -exec lzip -9 {} +
130 find . -type l | while read -r file
132 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
141 mkdir -p "${destdir}/$docsdir"
142 cp -p $docs "${destdir}/$docsdir"