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
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 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}"
49 unpack "${tardir}/$tarname"
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 .
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 \
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 \
79 -DWITH_LIBCONFIG=OFF \
80 -DWITH_XSCREENSAVER=OFF \
83 -DWITH_LIBRAW1394=OFF \
87 -DBUILD_TDEIOSLAVES=OFF \
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
97 ( cd -- "$directory" && touch .graft-config )
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"
113 cd "${destdir}/$mandir"
114 find . -type f -exec lzip -9 '{}' +
115 find . -type l | while read -r file
117 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
126 mkdir -p "${destdir}${docsdir}"
127 cp -p $docs "${destdir}${docsdir}"