recipes: Replace 'outdir' with package hash tags
[dragora.git] / recipes / networking / wireless_tools / recipe
blobb120c899ff30dfcfa759378fdcc48dc5a7b37c69
1 # Build recipe for wireless_tools.
3 # Copyright (c) 2018 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=wireless_tools
18 version=30.pre9
19 release=1
21 # Define hash tag to categorize the package name output
22 pkghashtag=networking
24 tarname=${program}.${version}.tar.gz
26 # Remote source(s)
27 fetch=http://hewlettpackard.github.io/wireless-tools/$tarname
29 description="
30 Tools for Wireless extension.
32 The wireless tools package is a set of tools allowing manipulation of
33 the Wireless Extensions.  They use a textual interface to support the
34 full Wireless Extension.
37 homepage=http://www.gnu.org/software/gawk
38 license=GPLv2+
40 # Custom source directory
41 srcdir="${program}.${version%.*}"
43 # Source documentation
44 docs="COPYING README* *.txt"
45 docsdir="${docdir}/${program}-${version}"
47 build()
49     set -e
51     unpack "${tardir}/$tarname"
53     cd "$srcdir"
55     # Set sane permissions
56     chmod -R u+w,go-w,a+rX-s .
58     make -j${jobs} \
59      BUILD_STRIPPING=y \
60      PREFIX="${destdir}/usr" \
61      INSTALL_MAN="${destdir}/$mandir" \
62      INSTALL_LIB="${destdir}/usr/lib${libSuffix}" \
63      install
65     # Compress and link man pages (if needed)
66     if test -d "${destdir}/$mandir"
67     then
68         (
69             cd "${destdir}/$mandir"
70             find . -type f -exec lzip -9 '{}' +
71             find . -type l | while read -r file
72             do
73                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
74                 rm -- "$file"
75             done
76         )
77     fi
79     # Copy documentation
80     mkdir -p "${destdir}${docsdir}"
81     cp -p $docs "${destdir}${docsdir}/"