Name: vsomeip3 Version: 3.1.20.3 Release: 6%{?dist} Summary: COVESA implementation of SOME/IP protocol License: MPLv2.0 and Boost URL: https://github.com/COVESA/vsomeip Source0: %{URL}/archive/3.1.20.3/vsomeip-3.1.20.3.tar.gz Source1: routingmanagerd.service Source2: routingmanagerd.socket Source3: tmpfiles-vsomeip.conf Source4: etc-vsomeip.json Source5: vsomeip.fc Source6: vsomeip.if Source7: vsomeip.te # Install libs, etc into /usr Patch0: vsomeip-install-dirs.patch # Build/Install tools and examples Patch1: vsomeip-build-extra.patch # Drop -O and use -fPIC, not -fPIE Patch2: vsomeip-compiler-flags.patch # Support new boost: https://github.com/COVESA/vsomeip/pull/318 Patch3: vsomeip-Support-boost-1.76.patch Patch4: vsomeip-big-endian.patch BuildRequires: boost-devel BuildRequires: cmake BuildRequires: dlt-libs-devel BuildRequires: systemd-devel BuildRequires: gcc-c++ # https://fedoraproject.org/wiki/SELinux/IndependentPolicy Requires: (vsomeip3-selinux = %{?epoch:%{epoch}:}%{version}-%{release} if selinux-policy-targeted) %description The vsomeip stack implements the http://some-ip.com/ (Scalable service-Oriented MiddlewarE over IP (SOME/IP)) protocol. The stack consists out of: * a shared library for SOME/IP (libvsomeip3.so) * a second shared library for SOME/IP's service discovery (libvsomeip3-sd.so) which is loaded during runtime if the service discovery is enabled. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel %{summary}. %package selinux Summary: SELinux policy module for %{name} BuildRequires: selinux-policy BuildRequires: selinux-policy-devel BuildRequires: make BuildArch: noarch %{?selinux_requires} %description selinux This package contains the SELinux policy module for %{name}. %package routingmanager Summary: Routingmanager daemon %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires(pre): shadow-utils Requires: systemd %description routingmanager %{summary}. %package examples Summary: Examples for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description examples %{summary}. %package tools Summary: Tools for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description tools %{summary}. %package compat Summary: Compat libraries for vsomeip2 Requires: %{name}%{?_isa} = %{version}-%{release} %description compat %{summary}. %package compat-devel Summary: Development files for %{name}-compat Requires: %{name}-compat%{?_isa} = %{version}-%{release} %description compat-devel %{summary}. %prep %autosetup -n vsomeip-%{version} -p1 mkdir vsomeip-selinux cp %{SOURCE5} %{SOURCE6} %{SOURCE7} vsomeip-selinux/ # For some reasons, some source files are executable, which messes # with debuginfo find -name "*.[ch]pp" | xargs chmod a-x %ldconfig_scriptlets %ldconfig_scriptlets compat %build %cmake \ -DENABLE_SIGNAL_HANDLING=OFF \ -DENABLE_CONFIGURATION_OVERLAYS=ON \ -DENABLE_COMPAT=ON \ -DVSOMEIP_INSTALL_ROUTINGMANAGERD=ON \ -DBASE_PATH=/run/vsomeip %cmake_build --target all --target vsomeip_ctrl --target examples --target hello_world_client --target hello_world_service (cd vsomeip-selinux && make -f /usr/share/selinux/devel/Makefile vsomeip.pp && bzip2 -9 vsomeip.pp ) %install %cmake_install # Install samples DESTDIR="%{buildroot}" %__cmake --install "%{__cmake_builddir}/examples" mkdir -p %{buildroot}%{_datadir}/vsomeip # Move sample config mv %{buildroot}%{_prefix}%{_sysconfdir}/vsomeip %{buildroot}%{_datadir}/vsomeip/examples for b in %{buildroot}%{_bindir}/*-sample %{buildroot}%{_bindir}/*hello_world*; do \ mv $b $(dirname $b)/vsomeip-$(basename $b); \ done # Home directory for the 'routingmanagerd' user mkdir -p $RPM_BUILD_ROOT/var/lib/routingmanagerd mkdir -p %{buildroot}%{_unitdir} install %{SOURCE1} %{buildroot}%{_unitdir}/ # service install %{SOURCE2} %{buildroot}%{_unitdir}/ # socket mkdir -p %{buildroot}%{_tmpfilesdir} install -m 0644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}/%{name}.conf mkdir -p %{buildroot}%{_sysconfdir} install -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/vsomeip.json mkdir -p %{buildroot}%{_datadir}/selinux/packages/ %{buildroot}%{_datadir}/selinux/devel/include/contrib/ install -m 0644 vsomeip-selinux/vsomeip.pp.bz2 %{buildroot}%{_datadir}/selinux/packages/ install -m 0644 vsomeip-selinux/vsomeip.if %{buildroot}%{_datadir}/selinux/devel/include/contrib/ %post selinux %selinux_modules_install %{_datadir}/selinux/packages/vsomeip.pp.bz2 %postun selinux if [ $1 -eq 0 ]; then %selinux_modules_uninstall %{_datadir}/selinux/packages/vsomeip.pp.bz2 fi %pre routingmanager ## This creates the users that are needed for routingmanagerd getent group routingmanagerd >/dev/null || groupadd -r routingmanagerd getent passwd routingmanagerd >/dev/null || \ useradd -r -g routingmanagerd -d /var/lib/routingmanagerd -s /sbin/nologin \ -c "User for routingmanagerd" routingmanagerd exit 0 %post routingmanager %systemd_post routingmanagerd.socket routingmanagerd.service %preun routingmanager %systemd_preun routingmanagerd.socket routingmanagerd.service %postun routingmanager %systemd_postun_with_restart routingmanagerd.socket routingmanagerd.service %files %doc AUTHORS CHANGES README.md %license LICENSE LICENSE_boost %{_libdir}/libvsomeip3.so.* %{_libdir}/libvsomeip3-*.so.* %{_tmpfilesdir}/%{name}.conf %{_sysconfdir}/vsomeip.json %files selinux %{_datadir}/selinux/packages/vsomeip.pp.bz2 %{_datadir}/selinux/devel/include/contrib/vsomeip.if %files compat %doc AUTHORS CHANGES README.md %license LICENSE LICENSE_boost %{_libdir}/libvsomeip.so.* %files routingmanager %doc AUTHORS CHANGES README.md %license LICENSE LICENSE_boost %attr(755,routingmanagerd,routingmanagerd) %dir /var/lib/routingmanagerd %{_bindir}/routingmanagerd %{_unitdir}/routingmanagerd.service %{_unitdir}/routingmanagerd.socket %files tools %doc AUTHORS CHANGES README.md %license LICENSE LICENSE_boost %{_bindir}/vsomeip_ctrl %files examples %doc AUTHORS CHANGES README.md %license LICENSE LICENSE_boost %{_bindir}/vsomeip-*-sample %{_bindir}/vsomeip-hello_world* # Example configurations: %{_datadir}/vsomeip %files compat-devel %doc AUTHORS CHANGES README.md %license LICENSE LICENSE_boost %{_includedir}/compat %{_libdir}/libvsomeip.so %{_libdir}/cmake/vsomeip %{_libdir}/pkgconfig/vsomeip.pc %files devel %doc AUTHORS CHANGES README.md %license LICENSE LICENSE_boost %{_includedir}/vsomeip %{_libdir}/libvsomeip3.so %{_libdir}/libvsomeip3-*.so %{_libdir}/cmake/vsomeip3 %{_libdir}/pkgconfig/vsomeip3.pc %changelog * Thu Mar 10 2022 Alexander Larsson - 3.1.20.3-6 - Make routingmanager socket activated - Drop systemd buildrequires - Add selinux policy * Wed Mar 9 2022 Alexander Larsson - 3.1.20.3-5 - Fix build on big-endian * Wed Mar 9 2022 Alexander Larsson - 3.1.20.3-4 - Change basedir to /run/vsomeip * Wed Mar 9 2022 Alexander Larsson - 3.1.20.3-3 - Fix build on boost 1.75 * Tue Mar 1 2022 Stephen Smoogen - 3.1.20.3-2 - Add systemd to BuildRequires - Update description to upstream text - add %license line * Thu Feb 24 2022 Stephen Smoogen - 3.1.20.3-1 - Begin work to make it 'valid' Fedora spec - Add gcc-c++ because it is needed post Fedora 3x - Update License to MPLv2.0 for rpmlint * Tue Feb 22 2022 Alexander Larsson - 3.1.20.3-1 - Initial version