Files
perl-Alien-SVN/perl-Alien-SVN.spec
2025-08-12 18:11:38 +02:00

97 lines
3.5 KiB
RPMSpec

#
# spec file for package perl-Alien-SVN
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%define cpan_name Alien-SVN
%define perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib)
%define perl_vendorarch %(eval "`perl -V:installvendorarch`"; echo $installvendorarch)
Summary: A wrapper for installing the SVN Perl bindings
License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
Name: perl-Alien-SVN
BuildRequires: libapr-util1-devel
BuildRequires: libapr1-devel
BuildRequires: libneon-devel
BuildRequires: perl-macros
BuildRequires: sqlite3-devel >= 3.7.12
BuildRequires: zlib-devel
BuildRequires: perl(Module::Build)
Requires: libapr-util1
Requires: libapr1
Conflicts: subversion-perl
Version: 1.8.11.0
Release: 0
Url: https://metacpan.org/release/%{cpan_name}
Source: https://cpan.metacpan.org/authors/id/M/MS/MSCHWERN/%{cpan_name}-v%{version}.tar.gz
Source100: README.md
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Alien::SVN is a wrapper to install the Perl bindings for subversion, also known
as SVN::Core. If your module needs SVN::Core it can depend on Alien::SVN
instead and then the CPAN shell can handle automatic installation. This is
particularly useful for programs like SVK.
%prep
%setup -n %{cpan_name}-v%{version}
%build
## prevent @ldpaths appear in RPATH of the binding libraries.
sed -i.orig ./src/subversion/subversion/bindings/swig/perl/native/Makefile.PL.in -e \
's|my @ldpaths = (|my @ldpaths = (); my @ldpaths_bad = (|'
## env DESTDIR setting does not make its way into the swig Makefiles.
## do it the hardway, and make sure no trailing whitespace exists!!!:
echo >> ./src/subversion/subversion/bindings/swig/perl/native/Makefile.PL.in "system q{sed -i Makefile* -e 's@\\(DESTDIR\\) =.*@\\1 = %{buildroot}@'}"
env DESTDIR=%{buildroot} %{__perl} Build.PL --installdirs vendor
## libdir has a trailing '--prefix=/usr', which comes from a badly escaped whitespace
## during creation of Build.
sed -i.orig ./src/subversion/Makefile -e 's@ --prefix=/usr@@'
sed -i ./src/subversion/Makefile -e 's@/usr/local@/usr@'
./Build build
%check
./Build test
%install
env DESTDIR=%{buildroot} ./Build pure_install --destdir %{buildroot}
find %{buildroot}%{perl_vendorlib} -name \*.a -o -name \*.la | xargs %{__rm} -f
mkdir -p %{buildroot}/%{_mandir}/man3/ %{buildroot}/usr/bin
%perl_process_packlist
%perl_gen_filelist
# make sure filelist grabs *all* shared libaries.
sed -i.orig -e 's/\.so[0-9\.]*$/\.so*/' %{name}.files
# survive, if there are no man-pages
test -d %{buildroot}/usr/share/man || \
sed -i -e '/^.usr.share.man/d' %{name}.files
%clean
%{__rm} -rf %{buildroot}
%files -f %{name}.files
%defattr(-, root, root, 0755)
%doc Changes README
%license src/subversion/LICENSE
%{perl_vendorarch}/SVN
%{perl_vendorarch}/auto/SVN
%changelog