summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7f9f4182ea06f52193b966634ecb0759ad4a2e5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: Wes Jackson <icebal dot 7 at gmail dot com>

pkgname=nfs-ganesha
pkgver=11.1
pkgrel=1
pkgdesc="NFS and 9P protocols in user mode."
arch=(x86_64 i686 armv7h aarch64)
url="https://github.com/nfs-ganesha/nfs-ganesha"
license=(LGPL-3.0-only)
depends=(
    acl
    btrfs-progs
    dbus
    e2fsprogs
    glibc
    jemalloc
    krb5
    libcap
    libgcc
    libprocps
    libstdc++
    libunwind
    liburcu
    libwbclient
    nfsidmap
    openssl
    #rdma-core
    util-linux-libs
    xfsprogs
    )
makedepends=(
    cmake
    doxygen
    git
    graphviz
    lsb-release
    python-sphinx
    )
options=(!emptydirs)
source=("git+https://github.com/nfs-ganesha/nfs-ganesha.git#tag=V${pkgver}"
        "git+https://github.com/nfs-ganesha/ntirpc.git"
        "git+https://github.com/biaks/prometheus-cpp-lite.git"
        )
sha256sums=('b61a4516f25ebbabc6cc2b614aeb5905f144516b0976b0b449ca343fd3000f31'
            'SKIP'
            'SKIP')
backup=(etc/ganesha/ganesha.conf) #etc/sysconfig/ganesha

prepare() {
  cd nfs-ganesha
  git submodule init
  git config submodule.src/libntirpc.url "${srcdir}/ntirpc"
  git -c protocol.file.allow=always submodule update

  cd src/libntirpc/src/monitoring
  git config submodule.src/monitoring/prometheus-cpp-lite.url "${srcdir}/prometheus-cpp-lite"
  git -c protocol.file.allow=always submodule update
}

build() {
  # Disable all warnings
  export CFLAGS+=" -w"
  export CXXFLAGS+=" -w"

  local _flags=(
    -DUSE_MAN_PAGE=ON
    -DUSE_RADOS_RECOV=OFF
    -DRADOS_URLS=OFF
    -DUSE_FSAL_LUSTRE=OFF
    -DUSE_FSAL_LIZARDFS=OFF
    -DUSE_FSAL_CEPH=OFF
    -DUSE_FSAL_GLUSTER=OFF
    -DUSE_FSAL_KVSFS=OFF
    -DUSE_FSAL_RGW=OFF
  )

  cmake -B build -S "nfs-ganesha/src" -Wno-dev \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    "${_flags[@]}"

  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}