Files
perl-Module-Build-CleanInstall/perl-Module-Build-CleanInstall.spec
2025-08-12 18:15:29 +02:00

78 lines
2.7 KiB
RPMSpec

#
# spec file for package perl-Module-Build-CleanInstall
#
# Copyright (c) 2024 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/
#
%define cpan_name Module-Build-CleanInstall
Name: perl-Module-Build-CleanInstall
Version: 0.50.0
Release: 0
# 0.05 -> normalize -> 0.50.0
%define cpan_version 0.05
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Subclass of Module::Build which removes the old module before installing[cut]
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/J/JB/JBERGER/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(List::MoreUtils)
BuildRequires: perl(Module::Build) >= 0.36
BuildRequires: perl(parent)
Requires: perl(Module::Build) >= 0.36
Requires: perl(parent)
Provides: perl(Module::Build::CleanInstall) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
Module::Build::CleanInstall is a subclass of Module::Build with one
additional feature, before upgrading the module from and old version to a
new one, it first removes the files installed by the previous version. This
is useful especially when the new version will not contain some files that
the old one did, and it is necessary that those files do not remain in
place.
Since it is a subclass of Module::Build it is used exactly like that
module. This module does provide an additional action 'uninstall', but it
need not be called separately; the action 'install' will call it when
invoked.
The uninstalling is done by removing the files in the installed module's
packlist which is created when the module is first installed.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%build
perl Build.PL --installdirs=vendor
./Build build --flags=%{?_smp_mflags}
%check
# MANUAL no testing (not working with rpm installed deps)
#./Build test
%install
./Build install --destdir=%{buildroot} --create_packlist=0
%perl_gen_filelist
%files -f %{name}.files
%doc Changes
%changelog