recipes: tde/tdelibs: Turn off systemd's logind by default
[dragora.git] / recipes / tde / tdelibs / recipe
blobbca55879dcdc3496fad02ca380b8ef45a627cf0c
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
18 set -e
20 program=tdelibs-trinity
21 version=14.0.9
22 release=3
24 # Define a category for the output of the package name
25 pkgcategory=tde
27 tarname=${program}-${version}.tar.xz
29 # Remote source(s)
30 fetch=https://mirror.ppa.trinitydesktop.org/trinity/releases/R${version}/main/$tarname
32 description="
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
38 tests.
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}"
48 build()
50     unpack "${tardir}/$tarname"
52     cd "$srcdir"
54     patch -p1 < "${worktree}/patches/tdelibs/xcomposite-shared.patch"
56     # Set sane permissions
57     chmod -R u+w,go-w,a+rX-s .
59     mkdir BUILD
60     cd BUILD
62     cmake \
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                               \
79      -DWITH_CUPS=OFF                                        \
80      -DWITH_ARTS=OFF                                        \
81      -DWITH_LIBART=ON                                       \
82      -DWITH_LIBIDN=OFF                                      \
83      -DWITH_TIFF=ON                                         \
84      -DWITH_JASPER=ON                                       \
85      -DWITH_OPENEXR=OFF                                     \
86      -DWITH_AVAHI=OFF                                       \
87      -DWITH_ISPELL=OFF                                      \
88      -DWITH_ASPELL=ON                                       \
89      -DWITH_HSPELL=OFF                                      \
90      -DDEFAULT_SPELL_CHECKER=ASPELL                         \
91      -DWITH_ELFICON=OFF                                     \
92      -DWITH_TDEHWLIB=ON                                     \
93      -DWITH_TDEHWLIB_DAEMONS=ON                             \
94      -DWITH_LOGINDPOWER=OFF                                 \
95      -DWITH_UPOWER=OFF                                      \
96      -DWITH_UDISKS=OFF                                      \
97      -DWITH_UDISKS2=OFF                                     \
98      -DWITH_UDEVIL=ON                                       \
99      -DWITH_CONSOLEKIT=OFF                                  \
100      -DWITH_NETWORK_MANAGER_BACKEND=OFF                     \
101      -DWITH_LZMA=ON                                         \
102      -DWITH_XRANDR=ON                                       \
103      -DWITH_XCOMPOSITE=ON                                   \
104      -DWITH_MITSHM=ON                                       \
105      -DWITH_PCSC=ON                                         \
106      -DWITH_PKCS=ON                                         \
107      -DWITH_CRYPTSETUP=ON                                   \
108      -DWITH_IMAGETOPS_BINARY=ON                             \
109      -G Ninja ..
111     ninja -j${jobs}
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
117     do
118         ( cd -- "$directory" && touch .graft-config )
119     done
121     # Compress and link man pages (if needed)
122     if test -d "${destdir}/$mandir"
123     then
124         (
125             cd "${destdir}/$mandir"
126             find . -type f -exec lzip -9 {} +
127             find . -type l | while read -r file
128             do
129                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
130                 rm -- "$file"
131             done
132         )
133     fi
135     cd ..
137     # Copy documentation
138     mkdir -p "${destdir}${docsdir}"
139     cp -p $docs "${destdir}${docsdir}"