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.
21 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/libs"
24 tarname=${program}-${version}.tar.bz2
27 fetch=http://downloads.sourceforge.net/project/libtirpc/libtirpc/${version}/$tarname
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
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}"
57 unpack "${tardir}/$tarname"
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" \
69 --libdir=/usr/lib${libSuffix} \
74 --build="$(cc -dumpmachine)"
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"
86 cd "${destdir}/$mandir"
87 find . -type f -exec lzip -9 '{}' +
88 find . -type l | while read -r file
90 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
97 mkdir -p "${destdir}${docsdir}"
98 cp -p $docs "${destdir}${docsdir}"