1 # Build recipe for tdelibs.
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=tdelibs-trinity
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/tde"
25 tarname=${program}-${version}.tar.xz
28 fetch=http://mirror.ppa.trinitydesktop.org/trinity/releases/R${version}/main/$tarname
31 The Trinity Desktop Environment (TDE) libraries.
33 This package includes libraries that are central to the development and
34 execution of a KDE program, as well as internationalization files for
35 these libraries, misc HTML documentation, theme modules, and regression
39 homepage=http://www.trinitydesktop.org/
40 license="GPLv2+, LGPLv2+ | BSD 2-clause"
42 # Source documentation
43 docs="AUTHORS COPYING* DEBUG NAMING README TODO KDE?PORTING.html"
44 docsdir="${docdir}/${pkgname}-${version}"
50 unpack "${tardir}/$tarname"
54 patch -Np1 -i "${worktree}/patches/tdelibs/_isnan.patch"
55 patch -Np1 -i "${worktree}/patches/tdelibs/header-redirections.diff"
56 patch -Np1 -i "${worktree}/patches/tdelibs/tdeio-kssl_libressl.patch"
57 patch -Np1 -i "${worktree}/patches/tdelibs/start_tdeinit.c.diff"
59 # Set sane permissions
60 chmod -R u+w,go-w,a+rX-s .
66 -DCMAKE_C_FLAGS_RELEASE:STRING="$QICFLAGS" \
67 -DCMAKE_CXX_FLAGS_RELEASE:STRING="$QICXXFLAGS" \
68 -DCMAKE_SHARED_LINKER_FLAGS:STRING="$QILDFLAGS" \
69 -DCMAKE_INSTALL_PREFIX=/opt/trinity \
70 -DLIB_SUFFIX=${libSuffix} \
71 -DCONFIG_INSTALL_DIR=/etc/trinity \
72 -DSYSCONF_INSTALL_DIR=/etc/trinity \
73 -DXDG_MENU_INSTALL_DIR=/etc/xdg/menus \
74 -DCMAKE_VERBOSE_MAKEFILE=ON \
75 -DCMAKE_BUILD_TYPE=Release \
76 -DCMAKE_SKIP_INSTALL_RPATH=YES \
78 -DWITH_ALL_OPTIONS=ON \
79 -DWITH_SUDO_TDESU_BACKEND=ON \
92 -DWITH_CONSOLEKIT=OFF \
96 make -j${jobs} DESTDIR="$destdir" install
98 # Strip remaining binaries and libraries
99 find "$destdir" -type f -print0 | xargs -0 file | \
100 awk '/ELF/ && /executable/ || /shared object/' | \
101 cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
103 find "$destdir" -type f -print0 | xargs -0 file | \
104 awk '/current ar archive/' | \
105 cut -f 1 -d : | xargs strip --strip-debug 2> /dev/null || true
107 # To handle (dot) .new files via graft(1)
109 find "${destdir}/etc" -type d -print | while read -r directory
111 ( cd -- "$directory" && touch .graft-config )
114 # Compress and link man pages (if needed)
115 if test -d "${destdir}/$mandir"
118 cd "${destdir}/$mandir"
119 find . -type f -exec lzip -9 '{}' +
120 find . -type l | while read -r file
122 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
131 mkdir -p "${destdir}${docsdir}"
132 cp -p $docs "${destdir}${docsdir}"