File ion-dtn.spec of Package ion
#
# spec file for package ion-dtn
#
# Copyright (c) 2025 Eyad Issa <eyadlorenzo@gmail.com>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global git_rev ion-open-source-4.1.4-a.2
Name:           ion-dtn
Version:        4.1.4+a.2
Release:        0
Summary:        NASA's open-source software implementation of Delay Tolerant Networking
License:        BSD-3-Clause
URL:            https://ion-dtn.readthedocs.io/
Source:         https://github.com/nasa-jpl/ION-DTN/archive/%{git_rev}/%{name}-%{version}.tar.gz
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  make
%description
The NASA’s Interplanetary Overlay Network (ION) is an implementation
of Delay/Disruption Tolerant Networking (DTN).
DTN is a digital communication networking technology that enables
data to be conveyed reliably among communicating entities when
roundtrip times may be highly variable and/or very long. Data
transmission is done automatically and reliably even if one or more
of the network links in the end-to-end path between those entities
is subject to very long signal propagation latency and/or prolonged
intervals of unavailability.
%package devel
Summary:        Development files for ion-dtn
Requires:       %{name} = %{version}-%{release}
%description devel
The NASA’s Interplanetary Overlay Network (ION) is an implementation
of Delay/Disruption Tolerant Networking (DTN).
This package contains the header files and libraries necessary for
developing applications with ion-dtn.
%prep
%autosetup -n ION-DTN-%{git_rev}
%build
autoreconf -fi
%configure \
  --libdir=%{_libdir}/ion \
  --includedir=%{_includedir}/ion
%make_build
%install
%make_install
# remove static libraries
find %{buildroot} -type f -name "*.a" -delete -print
# remove libtool file
find %{buildroot} -type f -name "*.la" -delete -print
# remove Windows-specific script
rm %{buildroot}%{_bindir}/remove_win_shmem.ps1
# create ld.so.conf.d file
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
echo "%{_libdir}/ion" >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/ion.conf
# move pkgconfig file to proper location
mkdir -p %{buildroot}%{_libdir}/pkgconfig
mv %{buildroot}%{_libdir}/ion/pkgconfig/ion.pc %{buildroot}%{_libdir}/pkgconfig/
%ldconfig_scriptlets
%files
%license license.txt
%{_bindir}/ams*
%{_bindir}/bibe*
%{_bindir}/bp*
%{_bindir}/brs*
%{_bindir}/bss*
%{_bindir}/cfdp*
%{_bindir}/cgrfetch
%{_bindir}/cpsd
%{_bindir}/dccp*
%{_bindir}/dgr*
%{_bindir}/dtka*
%{_bindir}/dtn*
%{_bindir}/dtpc*
%{_bindir}/file2*
%{_bindir}/hmackeys
%{_bindir}/imcadminep
%{_bindir}/imcfw
%{_bindir}/ion*
%{_bindir}/ipn*
%{_bindir}/lg*
%{_bindir}/ltp*
%{_bindir}/nm_agent
%{_bindir}/nm_mgr
%{_bindir}/owlt*
%{_bindir}/psm*
%{_bindir}/ramsgate
%{_bindir}/recvfile
%{_bindir}/rfxclock
%{_bindir}/sdatest
%{_bindir}/sdr*
%{_bindir}/sendfile
%{_bindir}/sm*
%{_bindir}/spp*
%{_bindir}/stcp*
%{_bindir}/tca*
%{_bindir}/tcc*
%{_bindir}/tcp*
%{_bindir}/udp*
%{_bindir}/killm
%{_bindir}/net_model_gen
%{_datadir}/ion/
%dir %{_libdir}/ion/
%{_libdir}/ion/*.so.0.0.0
%{_sysconfdir}/ld.so.conf.d/ion.conf
%{_mandir}/man1/*.1%{?ext_man}
%{_mandir}/man5/*.5%{?ext_man}
%files devel
%{_includedir}/ion/
%{_libdir}/ion/*.so
%{_libdir}/ion/*.so.0
%{_libdir}/pkgconfig/ion.pc
%{_mandir}/man3/*.3%{?ext_man}
%changelog