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 # Define a category for the output of the package name
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"
54 "${worktree}/patches/tdebase/branch-updates_e37f480d1f2bc9786bdc578a37f657ca65052613.diff"
56 # Set sane permissions
57 chmod -R u+w,go-w,a+rX-s .
63 -DCMAKE_C_FLAGS_RELEASE:STRING="$QICFLAGS" \
64 -DCMAKE_CXX_FLAGS_RELEASE: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_VERBOSE_MAKEFILE=ON \
72 -DCMAKE_BUILD_TYPE=Release \
73 -DCMAKE_SKIP_INSTALL_RPATH=YES \
75 -DWITH_ALL_OPTIONS=ON \
76 -DWITH_SUDO_KONSOLE_SUPER_USER_COMMAND=OFF \
77 -DWITH_USBIDS=/usr/share/hwdata/usb.ids \
78 -DHTDIG_SEARCH_BINARY=/usr/bin/hlsearch \
82 -DWITH_LIBCONFIG=OFF \
83 -DWITH_XSCREENSAVER=OFF \
86 -DWITH_LIBRAW1394=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 # Include xinitrc file to start TDE
116 mkdir -p "${destdir}/etc/X11/xinit"
117 cp -p "${worktree}/archive/tdebase/xinitrc-tde" \
118 "${destdir}/etc/X11/xinit/"
119 chmod 644 "${destdir}/etc/X11/xinit/xinitrc-tde"
121 touch "${destdir}/etc/X11/xinit/.graft-config"
123 # Compress and link man pages (if needed)
124 if test -d "${destdir}/$mandir"
127 cd "${destdir}/$mandir"
128 find . -type f -exec lzip -9 '{}' +
129 find . -type l | while read -r file
131 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
140 mkdir -p "${destdir}${docsdir}"
141 cp -p $docs "${destdir}${docsdir}"