strip remaining libraries for the distribution size
[dragora.git] / recipes / tools / attr / recipe
blobd8dad46c14c1216b0a2d032d13d5bcaa03628375
1 # Build recipe for attr.
3 # Copyright (c) 2016-2017 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=attr
18 version=c1a7b53073202c67becf4df36cadc32ef4759c8a-rebase
19 pkgversion=c1a7b53
20 release=1
22 tarname=${program}-${version}.tar.lz
24 # Remote source(s)
25 fetch=http://rsync.dragora.org/v3/sources/$tarname
27 description="
28 Extended attributes.
30 The extended attributes are name:value pairs associated
31 permanently with files and directories.
33 For more information, type: \"man 5 attr\".
36 homepage=http://savannah.nongnu.org/projects/attr
37 license="GPLv2+, LGPLv2.1"
39 # Source documentation
40 docs="README doc/CHANGES doc/COPYING*"
41 docsdir="${docdir}/${program}-${pkgversion}"
43 build()
45     set -e
47     unpack "${tardir}/$tarname"
49     cd "$srcdir"
51     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
52      $configure_args \
53      --libdir=/usr/lib${libSuffix} \
54      --mandir=$mandir \
55      --docdir=$docsdir \
56      --build="$(cc -dumpmachine)"
58     make -j${jobs} V=1
59     make -j${jobs} DESTDIR="$destdir" install-strip
61     # To handle config file(s)
62     touch "${destdir}/etc/.graft-config"
64     # Compress and link man pages (if needed)
65     if test -d "${destdir}/$mandir"
66     then
67         (
68             cd "${destdir}/$mandir"
69             find . -type f -exec lzip -9 '{}' +
70             find . -type l | while read -r file
71             do
72                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
73                 rm -- "$file"
74             done
75         )
76     fi
78     # Copy documentation
79     mkdir -p "${destdir}${docsdir}"
81     for file in $docs
82     do
83         cp -p $file "${destdir}${docsdir}"
84     done