recipes: tde/tdebase: added version 14.0.7
[dragora.git] / recipes / tde / tdebase / recipe
blobaf6cdb03df165841d5571e1c5209168354edfe65
1 # Build recipe for tdebase.
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=tdebase-trinity
18 pkgname=tdebase
19 version=14.0.7
20 release=1
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/tde"
25 tarname=${program}-${version}.tar.xz
27 # Remote source(s)
28 fetch=http://mirror.ppa.trinitydesktop.org/trinity/releases/R${version}/main/$tarname
30 description="
31 TDE base libraries and programs.
33 tdebase is the second mandatory package (besides tdelibs) for the
34 Trinity Desktop Environment.  Here we have various applications
35 and infrastructure files and libraries.
38 homepage=http://www.trinitydesktop.org/
39 license="GPLv2+, GFDLv1.2"
41 # Source documentation
42 docs="AUTHORS COPYING* README*"
43 docsdir="${docdir}/${pkgname}-${version}"
45 build()
47     set -e
49     unpack "${tardir}/$tarname"
51     cd "$srcdir"
53     patch -Np1 -i "${worktree}/patches/tdebase/missing-header.patch"
54     patch -Np1 -i "${worktree}/patches/tdebase/header-redirections.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_C_FLAGS:STRING="$QICFLAGS"                     \
64      -DCMAKE_CXX_FLAGS:STRING="$QICXXFLAGS"                 \
65      -DCMAKE_SHARED_LINKER_FLAGS:STRING="$QILDFLAGS"        \
66      -DCMAKE_INSTALL_PREFIX=/opt/trinity                    \
67      -DCONFIG_INSTALL_DIR=/etc/trinity                      \
68      -DSYSCONF_INSTALL_DIR=/etc/trinity                     \
69      -DXDG_MENU_INSTALL_DIR=/etc/xdg/menus                  \
70      -DLIB_SUFFIX=${libSuffix}                              \
71      -DCMAKE_BUILD_TYPE=Release                             \
72      -DCMAKE_SKIP_INSTALL_RPATH=YES                         \
73      -DBUILD_ALL=ON                                         \
74      -DWITH_ALL_OPTIONS=ON                                  \
75      -DWITH_SUDO_KONSOLE_SUPER_USER_COMMAND=OFF             \
76      -DWITH_USBIDS=/usr/share/hwdata/usb.ids                \
77      -DHTDIG_SEARCH_BINARY=/usr/bin/hlsearch                \
78      -DWITH_PAM=OFF                                         \
79      -DWITH_LIBCONFIG=OFF                                   \
80      -DWITH_XSCREENSAVER=OFF                                \
81      -DWITH_ELFICON=OFF                                     \
82      -DWITH_LIBUSB=OFF                                      \
83      -DWITH_LIBRAW1394=OFF                                  \
84      -DWITH_SASL=OFF                                        \
85      -DWITH_HAL=OFF                                         \
86      -DWITH_UPOWER=OFF                                      \
87      -DBUILD_TDEIOSLAVES=OFF \
88      ..
90     make -j${jobs}
91     make -j${jobs} DESTDIR="$destdir" install
93     # To handle (dot) .new files via graft(1)
95     find "${destdir}/etc" -type d -print | while read -r directory
96     do
97         ( cd -- "$directory" && touch .graft-config )
98     done
100     # Strip remaining binaries and libraries
101     find "$destdir" -type f -print0 | xargs -0 file | \
102      awk '/ELF/ && /executable/ || /shared object/' | \
103       cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
105     find "$destdir" -type f -print0 | xargs -0 file | \
106      awk '/current ar archive/' | \
107       cut -f 1 -d : | xargs strip --strip-debug 2> /dev/null || true
109     # Compress and link man pages (if needed)
110     if test -d "${destdir}/$mandir"
111     then
112         (
113             cd "${destdir}/$mandir"
114             find . -type f -exec lzip -9 '{}' +
115             find . -type l | while read -r file
116             do
117                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
118                 rm -- "$file"
119             done
120         )
121     fi
123     cd ..
125     # Copy documentation
126     mkdir -p "${destdir}${docsdir}"
127     cp -p $docs "${destdir}${docsdir}"