File supportutils-scrub.spec of Package supportutils-scrub.39052

#
# spec file for package supportutils-scrub
#
# Copyright (c) 2025 SUSE LLC.
#
# 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/

Name:           supportutils-scrub
Version:        1.0
Release:        0
Summary:        Utility to sanitize and remove sensitive data from supportconfig tarballs
License:        GPL-2.0-only
Url:            https://github.com/SUSE/supportutils-scrub
Source:         %{name}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
Requires:       python3

%description
Supportutils-scrub is a utility designed to sanitize and remove sensitive or unwanted data from
SUSE supportconfig tarballs. It assists users and organizations in aligning with data protection
policies, privacy requirements, and GDPR compliance standards.

%prep
%setup -q

%build

%install
rm -rf %{buildroot}

# Create necessary directories
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_sysconfdir}/supportutils-scrub
mkdir -p %{buildroot}%{_mandir}/man8
mkdir -p %{buildroot}%{_mandir}/man5
mkdir -p %{buildroot}%{_prefix}/lib/supportutils-scrub/supportutils_scrub

# Install the executable script
install -m 0755 bin/supportutils-scrub %{buildroot}%{_sbindir}/supportutils-scrub

# Install the configuration file
install -m 0644 config/supportutils-scrub.conf %{buildroot}%{_sysconfdir}/supportutils-scrub/supportutils-scrub.conf

# Install the manpages
install -m 0644 man/supportutils-scrub.8 %{buildroot}%{_mandir}/man8/supportutils-scrub.8
gzip -9 %{buildroot}%{_mandir}/man8/supportutils-scrub.8
install -m 0644 man/supportutils-scrub.conf.5 %{buildroot}%{_mandir}/man5/supportutils-scrub.conf.5
gzip -9 %{buildroot}%{_mandir}/man5/supportutils-scrub.conf.5

# Install the Python modules
cp -r src/supportutils_scrub/* %{buildroot}%{_prefix}/lib/supportutils-scrub/supportutils_scrub/

%files
%defattr(-,root,root)
%license LICENSE
%doc README.md
%{_sbindir}/supportutils-scrub
%dir %{_sysconfdir}/supportutils-scrub
%config(noreplace) %{_sysconfdir}/supportutils-scrub/supportutils-scrub.conf
%dir %{_prefix}/lib/supportutils-scrub
%dir %{_prefix}/lib/supportutils-scrub/supportutils_scrub
%{_prefix}/lib/supportutils-scrub/supportutils_scrub/*
%{_mandir}/man8/supportutils-scrub.8.gz
%{_mandir}/man5/supportutils-scrub.conf.5.gz


openSUSE Build Service is sponsored by