recipes: libs/libtirpc: Resolved a build a error
[dragora.git] / recipes / libs / libtirpc / recipe
blob5049c3f783509a73626bedea9438b43a5fa1b17d
1 # Build recipe for libtirpc.
3 # Copyright (C) 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=libtirpc
18 version=1.2.5
19 release=2
21 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/libs"
24 tarname=${program}-${version}.tar.bz2
26 # Remote source(s)
27 fetch=http://downloads.sourceforge.net/project/libtirpc/libtirpc/${version}/$tarname
29 description="
30 Transport-Independent RPC library. 
32 This package contains SunLib's implementation of transport-independent
33 RPC (TI-RPC) documentation.  This library forms a piece of the base of
34 Open Network Computing (ONC), and is derived directly from the Solaris
35 2.3 source.
37 TI-RPC is an enhanced version of TS-RPC that requires the UNIX System V
38 Transport Layer Interface (TLI) or an equivalent X/Open Transport Interface
39 (XTI).  TI-RPC is on-the-wire compatible with the TS-RPC, which is supported
40 by almost 70 vendors on all major operating systems.  TS-RPC source code
41 (RPCSRC 4.0) remains available from several internet sites.
43 This release was a native source release, compatible for building on
44 Solaris 2.3.  It had been ported from FreeBSD 5.2.1 to GNU/Linux in 2004.
47 homepage=http://sourceforge.net/projects/libtirpc/
48 license="BSD 3-clause"
50 docs="AUTHORS COPYING ChangeLog NEWS README THANKS TODO VERSION"
51 docsdir="${docdir}/${program}-${version}"
53 build()
55     set -e
57     unpack "${tardir}/$tarname"
59     cd "$srcdir"
61     # Look for the correct header location
62     patch -Np1 -i "${worktree}/patches/libtirpc/0001-xdr_float-do-not-include-bits-endian.h.patch"
64     # Set sane permissions
65     chmod -R u+w,go-w,a+rX-s .
67     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
68      $configure_args \
69      --libdir=/usr/lib${libSuffix} \
70      --mandir=$mandir \
71      --docdir=$docsdir \
72      --disable-gssapi \
73      --disable-symvers \
74      --build="$(cc -dumpmachine)"
75      
76     make -j${jobs} V=1
77     make -j${jobs} DESTDIR="$destdir" install-strip
79     # To manage .new files via graft(1)
80     touch "${destdir}/etc/.graft-config"
82     # Compress and link man pages (if needed)
83     if test -d "${destdir}/$mandir"
84     then
85         (
86             cd "${destdir}/$mandir"
87             find . -type f -exec lzip -9 '{}' +
88             find . -type l | while read -r file
89             do
90                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
91                 rm -- "$file"
92             done
93         )
94     fi
95      
96     # Copy documentation
97     mkdir -p "${destdir}${docsdir}"
98     cp -p $docs "${destdir}${docsdir}"