%global pkgvers 0 %global scdate0 20241031 %global schash0 bc02e48d1ab3df1296ec6d4e5eb65cd95e804ca4 %global branch0 main %global source0 https://github.com/open5gs/open5gs.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: open5gs Version: %(curl -s https://raw.githubusercontent.com/open5gs/open5gs/%{schash0}/meson.build | grep " version :" | cut -d"'" -f2) Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Implementation for 5G Core and EPC License: AGPL v3.0 URL: https://open5gs.org BuildRequires: git gcc-c++ meson cmake mongo-c-driver-devel python3 ninja-build glibc-headers BuildRequires: pkgconf-pkg-config gnutls-devel libtalloc-devel libcurl-devel libyaml-devel openssl-devel BuildRequires: lksctp-tools-devel libnghttp2-devel libmicrohttpd-devel libtins-devel freeDiameter-devel %undefine _hardened_build %undefine _annotated_build %description Open5GS is a C-language Open Source implementation for 5G Core and EPC, i.e. the core network of LTE/NR network. %prep %setup -T -c -n %{name} git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git log --format=fuller %build %global optflags %(echo %optflags | sed 's|-Wp,-D_GLIBCXX_ASSERTIONS||g') # no rpath find . -name 'meson.build' -exec sed -i '/install_rpath/d' {} + # modern glibc sed -i '/sys\/sysctl.h/d' lib/ipfw/*.c # external freeDiameter sed -i 's|^freeDiameter|#freeDiameter|' lib/diameter/common/meson.build sed -i 's|^libfdcore_dep = |#libfdcore_dep|' lib/diameter/common/meson.build sed -i "/^#libfdcore_dep/i libfdcore_dep = [cc.find_library(['libfdcore'], dirs : ['%{_libdir}'])]" lib/diameter/common/meson.build sed -i "/^#libfdcore_dep/a libfdcore_dep += cc.find_library(['libfdproto'], dirs : ['%{_libdir}'])" lib/diameter/common/meson.build sed -i "/^#libfdcore_dep/a libfdcore_dep += cc.find_library(['libgnutls'], dirs : ['%{_libdir}'])" lib/diameter/common/meson.build sed -i '1 i #include ' src/upf/arp-nd.cpp export CFLAGS='%{optflags} -I/usr/include/uClibc/' meson subprojects download prometheus-client-c %meson %meson_build %install %meson_install %files %doc README.md %license LICENSE %{_bindir}/* %{_libdir}/*.so* %changelog * Fri Oct 02 2020 Cristian Balint - git update releases