%global __brp_check_rpaths %{nil} %global __requires_exclude ^libmpi %global packname GaussSuppression %global packver 1.3.2 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 1.3.2 Release: 1%{?dist}%{?buildtag} Summary: Tabular Data Suppression using Gaussian Elimination License: MIT + file LICENSE URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 3.5.0 Requires: R-core >= 3.5.0 BuildArch: noarch BuildRequires: R-CRAN-SSBtools >= 1.8.8 BuildRequires: R-CRAN-RegSDC >= 0.7.0 BuildRequires: R-stats BuildRequires: R-methods BuildRequires: R-utils BuildRequires: R-CRAN-Matrix BuildRequires: R-CRAN-ellipsis BuildRequires: R-CRAN-rlang Requires: R-CRAN-SSBtools >= 1.8.8 Requires: R-CRAN-RegSDC >= 0.7.0 Requires: R-stats Requires: R-methods Requires: R-utils Requires: R-CRAN-Matrix Requires: R-CRAN-ellipsis Requires: R-CRAN-rlang %description A statistical disclosure control tool to protect tables by suppression using the Gaussian elimination secondary suppression algorithm (Langsrud, 2024) . A suggestion is to start by working with functions SuppressSmallCounts() and SuppressDominantCells(). These functions use primary suppression functions for the minimum frequency rule and the dominance rule, respectively. Novel functionality for targeted attribute disclosure protection is also included. See Langsrud (2026) and references therein. General primary suppression functions can be supplied as input to the general working horse function, GaussSuppressionFromData(). Suppressed frequencies can be replaced by synthetic decimal numbers as described in Langsrud (2019) . This approach can also be used as a flexible tool for suppression of post-published tabular data (Langsrud and Bøvelstad, 2022) . %prep %setup -q -c -n %{packname} # fix end of executable files find -type f -executable -exec grep -Iq . {} \; -exec sed -i -e '$a\' {} \; # prevent binary stripping [ -d %{packname}/src ] && find %{packname}/src -type f -exec \ sed -i 's@/usr/bin/strip@/usr/bin/true@g' {} \; || true [ -d %{packname}/src ] && find %{packname}/src/Make* -type f -exec \ sed -i 's@-g0@@g' {} \; || true # don't allow local prefix in executable scripts find -type f -executable -exec sed -Ei 's@#!( )*/usr/local/bin@#!/usr/bin@g' {} \; %build %install mkdir -p %{buildroot}%{rlibdir} %{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname} test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so) rm -f %{buildroot}%{rlibdir}/R.css # remove buildroot from installed files find %{buildroot}%{rlibdir} -type f -exec sed -i "s@%{buildroot}@@g" {} \; %files %{rlibdir}/%{packname}