1 # Build recipe for libtirpc.
3 # Copyright (C) 2020-2021 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 # Exit immediately on any error
24 # Define a category for the output of the package name
27 tarname=${program}-${version}.tar.bz2
30 fetch=https://sourceforge.net/projects/libtirpc/files/libtirpc/${version}/$tarname
33 Transport-Independent RPC library.
35 This package contains SunLib's implementation of transport-independent
36 RPC (TI-RPC) documentation. This library forms a piece of the base of
37 Open Network Computing (ONC), and is derived directly from the Solaris
40 TI-RPC is an enhanced version of TS-RPC that requires the UNIX System V
41 Transport Layer Interface (TLI) or an equivalent X/Open Transport Interface
42 (XTI). TI-RPC is on-the-wire compatible with the TS-RPC, which is supported
43 by almost 70 vendors on all major operating systems. TS-RPC source code
44 (RPCSRC 4.0) remains available from several internet sites.
46 This release was a native source release, compatible for building on
47 Solaris 2.3. It had been ported from FreeBSD 5.2.1 to GNU/Linux in 2004.
50 homepage=https://sourceforge.net/projects/libtirpc/
51 license="BSD 3-clause"
53 docs="AUTHORS COPYING ChangeLog NEWS README THANKS TODO VERSION"
54 docsdir="${docdir}/${program}-${version}"
58 unpack "${tardir}/$tarname"
62 # Set sane permissions
63 chmod -R u+w,go-w,a+rX-s .
65 ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
67 --libdir=/usr/lib${libSuffix} \
72 --build="$(gcc -dumpmachine)"
75 make -j${jobs} DESTDIR="$destdir" install
77 # To manage .new files via graft(1)
78 touch "${destdir}/etc/.graft-config"
80 # Compress and link man pages (if needed)
81 if test -d "${destdir}/$mandir"
84 cd "${destdir}/$mandir"
85 find . -type f -exec lzip -9 {} +
86 find . -type l | while read -r file
88 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
95 mkdir -p "${destdir}${docsdir}"
96 cp -p $docs "${destdir}${docsdir}"