1 # Build recipe for weechat.
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.
21 # Define a category for the output of the package name
22 pkgcategory=networking
24 tarname=${program}-${version}.tar.bz2
27 fetch=http://weechat.org/files/src/$tarname
29 homepage=http://weechat.org
33 WeeChat is a fast, light and extensible chat client.
35 WeeChat (Wee Enhanced Environment for Chat) is a free chat client,
36 fast and light, designed for many operating systems. It is highly
37 customizable and extensible with scripts.
39 For more information, visit: $homepage
42 # Source documentation
44 docsdir="${docdir}/${program}-${version}"
50 unpack "${tardir}/$tarname"
54 # Set sane permissions
55 chmod -R u+w,go-w,a+rX-s .
60 # Note about NLS: it does not work with gettex-tiny, currently.
63 -DCMAKE_C_FLAGS_RELEASE:STRING="$QICFLAGS" \
64 -DCMAKE_CXX_FLAGS_RELEASE:STRING="$QICXXFLAGS" \
65 -DCMAKE_EXE_LINKER_FLAGS:STRING="$QILDFLAGS" \
66 -DCMAKE_INSTALL_PREFIX=/usr \
67 -DCMAKE_BUILD_TYPE=Release \
68 -DCMAKE_VERBOSE_MAKEFILE=ON \
69 -DCMAKE_SKIP_INSTALL_RPATH=YES \
70 -DLIBDIR=/usr/lib${libSuffix} \
72 -DENABLE_ENCHANT=OFF \
79 make -j${jobs} DESTDIR="$destdir" install
81 # Move generated documentation directory, if enabled
83 mkdir -p "${destdir}${docsdir}"
85 if test -d "${destdir}/usr/share/doc/weechat"
87 for file in "${destdir}/usr/share/doc/weechat"/*
89 mv -f -- "$file" "${destdir}${docsdir}"
92 rm -rf "${destdir}/usr/share/doc/weechat"
98 cp -p $docs "${destdir}${docsdir}"
100 # Compress and link man pages (if needed)
101 if test -d "${destdir}/$mandir"
104 cd "${destdir}/$mandir"
105 find . -type f -exec lzip -9 '{}' +
106 find . -type l | while read -r file
108 ln -sf "$(readlink -- "$file").lz" "${file}.lz"