d400b0f8083cdce579c0e4f262ea48d3aa7eb3d6
[gentoo.git] / net-fs / libnfs / libnfs-2.0.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5
6 AUTOTOOLS_AUTORECONF="1"
7
8 inherit autotools autotools-utils eutils
9 if [[ ${PV} == "9999" ]] ; then
10         EGIT_REPO_URI="https://github.com/sahlberg/${PN}.git"
11         inherit git-r3
12 else
13         SRC_URI="https://github.com/sahlberg/${PN}/archive/${P}.tar.gz"
14         KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 s390 x86"
15 fi
16
17 DESCRIPTION="Client library for accessing NFS shares over a network"
18 HOMEPAGE="https://github.com/sahlberg/libnfs"
19
20 LICENSE="LGPL-2.1 GPL-3"
21 SLOT="0/11"  # sub-slot matches SONAME major
22 IUSE="examples static-libs"
23
24 RDEPEND=""
25 DEPEND="${RDEPEND}
26         virtual/pkgconfig"
27
28 S="${WORKDIR}/${PN}-${P}"
29
30 src_prepare() {
31         default
32
33         epatch_user
34
35         eautoreconf
36 }
37
38 src_install() {
39         autotools-utils_src_install
40         if use examples; then
41                 # --enable-examples configure switch just compiles them
42                 # better install sources instead
43                 exeinto /usr/share/doc/${PF}/examples/
44                 for program in $(grep PROGRAMS examples/Makefile.am | cut -d= -f2); do
45                         doexe examples/${program}.c
46                 done
47         fi
48 }