blob: a6876e8c5f9561e1e7b71a7783259ef8e0caba28 [file] [log] [blame]
Junxiao Shi48ada892021-11-04 09:02:21 -06001# -*- Mode:bash; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2#
Junxiao Shi1e720872022-07-19 10:24:12 -06003# Copyright (C) 2015-2022, The University of Memphis,
Junxiao Shi48ada892021-11-04 09:02:21 -06004# Arizona Board of Regents,
5# Regents of the University of California.
6#
7# This file is part of Mini-NDN.
8# See AUTHORS.md for a complete list of Mini-NDN authors and contributors.
9#
10# Mini-NDN is free software: you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation, either version 3 of the License, or
13# (at your option) any later version.
14#
15# Mini-NDN is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with Mini-NDN, e.g., in COPYING.md file.
22# If not, see <http://www.gnu.org/licenses/>.
23
24if [[ $VERSION_ID -lt 33 ]]; then
25 cat <<EOT
26Fedora 33 or newer is required
27Installation on older versions may fail
28EOT
29fi
30
31# DNF packages, written in alphabetical order.
32DNF_PKGS=(
33 boost-devel
34 ca-certificates
35 gcc-c++
36 libpcap-devel
37 openssl-devel
38 python3-pip
39 sqlite-devel
40 systemd-devel
41)
42
43install_pkgs() {
44 $SUDO dnf install -y "${DNF_PKGS[@]}"
45}
46
47prepare_ld() {
Junxiao Shi1e720872022-07-19 10:24:12 -060048 if ! $SUDO ldconfig -v 2>/dev/null | grep -q /usr/local/lib64; then
Junxiao Shi48ada892021-11-04 09:02:21 -060049 echo 'Enabling /usr/local/lib64 in dynamic linker'
50 $SUDO mkdir -p /etc/ld.so.conf.d
51 echo /usr/local/lib64 | $SUDO tee /etc/ld.so.conf.d/usr-local-lib64.conf >/dev/null
52 fi
53}
54
55# ndn-cxx installs to /usr/local/lib64, but `pkg-config --libs libndn-cxx` by default strips out
56# `-L/usr/local/lib64` flag. This environ or `pkg-config --keep-system-libs` prevents that.
57export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1