recipes: tde/tqt3: update copyright year
[dragora.git] / recipes / tde / tqt3 / recipe
blobcfd50f1a3bcb7352c3adb8c1f203adab1924a768
1 # Build recipe for tqt3 (trinity).
3 # Copyright (c) 2019-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=tqt3-trinity
18 pkgname=tqt3
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/dependencies/$tarname
30 description="
31 Qt is a multiplatform C++ GUI application framework.
33 Qt 3.3 introduces new features and many improvements over the 3.2.x
34 series. See the changes file for details.
36 The Qt version 3.3 series is binary compatible with the 3.2.x series -
37 applications compiled for 3.2 will continue to run with 3.3.
40 homepage=http://www.trinitydesktop.org/
41 license="GPLv2+, GPLv3+ | The Q Public License"
43 # Source documentation
44 docs="FAQ LICENSE* README*"
45 docsdir="${docdir}/${pkgname}-${version}"
47 build()
49     set -e
51     unpack "${tardir}/$tarname"
53     cd "$srcdir"
55     # Remove unneeded specs for other targets
56     ( cd mkspecs && find . -maxdepth 1 \( -type d -a ! -name 'linux-g++*' \) -exec rm -rf -- '{}' \; )
58     # Do not link with -rpath
59     sed -i '/QMAKE_RPATH/d' mkspecs/linux*/qmake.conf
61     # Set sane permissions
62     chmod -R u+w,go-w,a+rX-s .
64     QTDIR="$PWD"
65     LD_LIBRARY_PATH="${PWD}/lib:${LD_LIBRARY_PATH}"
66     SAVED_PATH="$PATH"
67     PATH="${PWD}/bin:${PATH}"
69     echo ""
70     echo "QTDIR: $QTDIR"
71     echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
72     echo "PATH: $PATH"
73     echo ""
75     export QTDIR LD_LIBRARY_PATH PATH
77     echo 'yes' | ./configure \
78      -prefix /opt/tqt3 \
79      -sysconfdir /etc/tqt3 \
80      -docdir $docsdir \
81      -no-exceptions \
82      -stl \
83      -largefile \
84      -qt-gif \
85      -system-zlib \
86      -system-libpng \
87      -system-libjpeg \
88      -system-libmng \
89      -plugin-imgfmt-png \
90      -plugin-imgfmt-jpeg \
91      -plugin-imgfmt-mng \
92      -thread \
93      -xinerama \
94      -xcursor \
95      -xrandr \
96      -xrender \
97      -xft \
98      -tablet \
99      -xkb \
100      -plugin-style-cde \
101      -plugin-style-compact \
102      -plugin-style-motif \
103      -plugin-style-motifplus \
104      -plugin-style-platinum \
105      -plugin-style-sgi \
106      -plugin-style-windows \
107      -release
109     make -i -j${jobs} sub-tools
110     make -j${jobs} INSTALL_ROOT="$destdir" install
112     unset QTDIR LD_LIBRARY_PATH
113     PATH=$SAVED_PATH
114     export PATH
116     # Do not ship the HTML documentation in order to save disk space
117     rm -rf "${destdir}${docsdir}/html"
119     # Strip remaining binaries and libraries
120     find "$destdir" -type f | xargs file | \
121      awk '/ELF/ && /executable/ || /shared object/' | \
122       cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
124     # Compress and link man pages (if needed)
125     if test -d "${destdir}/$mandir"
126     then
127         (
128             cd "${destdir}/$mandir"
129             find . -type f -exec lzip -9 '{}' +
130             find . -type l | while read -r file
131             do
132                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
133                 rm -- "$file"
134             done
135         )
136     fi
138     # Copy documentation
139     mkdir -p "${destdir}${docsdir}"
140     cp -p $docs "${destdir}${docsdir}"