recipes: libs/libtirpc: added version 1.2.5
[dragora.git] / recipes / libs / libtirpc / recipe
bloba10eab4f86c08b1238775ac2ccdbcbe2cf7344b6
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=4
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     # Set sane permissions
62     chmod -R u+w,go-w,a+rX-s .
64     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
65      $configure_args \
66      --libdir=/usr/lib${libSuffix} \
67      --mandir=$mandir \
68      --docdir=$docsdir \
69      --disable-gssapi \
70      --disable-symvers \
71      --build="$(cc -dumpmachine)"
72      
73     make -j${jobs} V=1
74     make -j${jobs} DESTDIR="$destdir" install-strip
76     # To manage .new files via graft(1)
77     touch "${destdir}/etc/.graft-config"
79     # Compress and link man pages (if needed)
80     if test -d "${destdir}/$mandir"
81     then
82         (
83             cd "${destdir}/$mandir"
84             find . -type f -exec lzip -9 '{}' +
85             find . -type l | while read -r file
86             do
87                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
88                 rm -- "$file"
89             done
90         )
91     fi
92      
93     # Copy documentation
94     mkdir -p "${destdir}${docsdir}"
95     cp -p $docs "${destdir}${docsdir}"