recipes: Adjust 'docsdir' variable to be consistent with the current recipe format
[dragora.git] / recipes / libs / libtirpc / recipe
blob98955fc8afc0d12a3baf72dcd5689d2867061910
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
18 set -e
20 program=libtirpc
21 version=1.3.2
22 release=1
24 # Define a category for the output of the package name
25 pkgcategory=libs
27 tarname=${program}-${version}.tar.bz2
29 # Remote source(s)
30 fetch=https://sourceforge.net/projects/libtirpc/files/libtirpc/${version}/$tarname
32 description="
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
38 2.3 source.
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}"
56 build()
58     unpack "${tardir}/$tarname"
60     cd "$srcdir"
62     # Set sane permissions
63     chmod -R u+w,go-w,a+rX-s .
65     ./configure \
66     CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
67      $configure_args \
68      --libdir=/usr/lib${libSuffix} \
69      --mandir=$mandir \
70      --docdir=$docsdir \
71      --disable-gssapi \
72      --disable-symvers \
73      --build="$(gcc -dumpmachine)"
74      
75     make -j${jobs} V=1
76     make -j${jobs} DESTDIR="$destdir" install-strip
78     # To manage .new files via graft(1)
79     touch "${destdir}/etc/.graft-config"
81     # Compress and link man pages (if needed)
82     if test -d "${destdir}/$mandir"
83     then
84         (
85             cd "${destdir}/$mandir"
86             find . -type f -exec lzip -9 {} +
87             find . -type l | while read -r file
88             do
89                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
90                 rm -- "$file"
91             done
92         )
93     fi
94      
95     # Copy documentation
96     mkdir -p "${destdir}/$docsdir"
97     cp -p $docs "${destdir}/$docsdir"