1 # Build recipe for tqca-trinity.
3 # Copyright (c) 2020-2022 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
21 version=20220503_8dbed86
24 # Define a category for the output of the package name
27 tarname=${program}-${version}.tar.lz
31 https://dragora.mirror.garr.it/current/sources/$tarname
32 rsync://rsync.dragora.org/current/sources/$tarname
36 The TQt cryptographic architecture.
38 This library provides an easy API for the following features:
45 Ciphers (BlowFish, 3DES, AES)
47 Functionality is supplied via plugins. This is useful for avoiding
48 dependence on a particular crypto library and makes upgrading easier,
49 as there is no need to recompile your application when adding or
50 upgrading a crypto plugin. Also, by pushing crypto functionality into
51 plugins, your application is free of legal issues, such as export
55 homepage=https://www.trinitydesktop.org/
58 # Source documentation
60 docsdir="${docdir}/${program}-${version}"
64 unpack "${tardir}/$tarname"
68 # Set sane permissions
69 chmod -R u+w,go-w,a+rX-s .
76 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
77 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
78 -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="$QICFLAGS" \
79 -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="$QICXXFLAGS" \
80 -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(echo $QILDFLAGS | sed 's/-s//')" \
81 -DCMAKE_INSTALL_PREFIX=/usr \
82 -DLIB_SUFFIX=${libSuffix} \
83 -DCONFIG_INSTALL_DIR=/etc/trinity \
84 -DSYSCONF_INSTALL_DIR=/etc/trinity \
85 -DXDG_MENU_INSTALL_DIR=/etc/xdg/menus \
86 -DCMAKE_VERBOSE_MAKEFILE=ON \
87 -DCMAKE_SKIP_RPATH=OFF \
90 -DWITH_ALL_OPTIONS=ON \
94 DESTDIR="$destdir" ninja -j${jobs} install
96 # Compress and link man pages (if needed)
97 if test -d "${destdir}/$mandir"
100 cd "${destdir}/$mandir"
101 find . -type f -exec lzip -9 {} +
102 find . -type l | while read -r file
104 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
113 mkdir -p "${destdir}/$docsdir"
114 cp -p $docs "${destdir}/$docsdir"