blob: 5a2056ed1078a873af4d1615407ac75bb6808e27 [file] [log] [blame]
Junxiao Shi48ada892021-11-04 09:02:21 -06001# -*- Mode:bash; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2#
matianxing1992b95d1942025-01-28 15:04:02 -06003# Copyright (C) 2015-2025, 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++
matianxing1992b95d1942025-01-28 15:04:02 -060036 gpsd
Junxiao Shi48ada892021-11-04 09:02:21 -060037 libpcap-devel
38 openssl-devel
39 python3-pip
40 sqlite-devel
41 systemd-devel
42)
43
44install_pkgs() {
45 $SUDO dnf install -y "${DNF_PKGS[@]}"
46}
47
48prepare_ld() {
Junxiao Shi1e720872022-07-19 10:24:12 -060049 if ! $SUDO ldconfig -v 2>/dev/null | grep -q /usr/local/lib64; then
Junxiao Shi48ada892021-11-04 09:02:21 -060050 echo 'Enabling /usr/local/lib64 in dynamic linker'
51 $SUDO mkdir -p /etc/ld.so.conf.d
52 echo /usr/local/lib64 | $SUDO tee /etc/ld.so.conf.d/usr-local-lib64.conf >/dev/null
53 fi
54}
55
56# ndn-cxx installs to /usr/local/lib64, but `pkg-config --libs libndn-cxx` by default strips out
57# `-L/usr/local/lib64` flag. This environ or `pkg-config --keep-system-libs` prevents that.
58export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1