Junxiao Shi | 48ada89 | 2021-11-04 09:02:21 -0600 | [diff] [blame] | 1 | # -*- Mode:bash; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | # |
Junxiao Shi | 1e72087 | 2022-07-19 10:24:12 -0600 | [diff] [blame] | 3 | # Copyright (C) 2015-2022, The University of Memphis, |
Junxiao Shi | 48ada89 | 2021-11-04 09:02:21 -0600 | [diff] [blame] | 4 | # 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 | |
| 24 | if [[ $VERSION_ID -lt 33 ]]; then |
| 25 | cat <<EOT |
| 26 | Fedora 33 or newer is required |
| 27 | Installation on older versions may fail |
| 28 | EOT |
| 29 | fi |
| 30 | |
| 31 | # DNF packages, written in alphabetical order. |
| 32 | DNF_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 | |
| 43 | install_pkgs() { |
| 44 | $SUDO dnf install -y "${DNF_PKGS[@]}" |
| 45 | } |
| 46 | |
| 47 | prepare_ld() { |
Junxiao Shi | 1e72087 | 2022-07-19 10:24:12 -0600 | [diff] [blame] | 48 | if ! $SUDO ldconfig -v 2>/dev/null | grep -q /usr/local/lib64; then |
Junxiao Shi | 48ada89 | 2021-11-04 09:02:21 -0600 | [diff] [blame] | 49 | 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. |
| 57 | export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 |