!9 change spec

From: @wcc_140409
Reviewed-by: @small_leek
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2020-11-25 11:29:47 +08:00 committed by Gitee
commit 780e02fae4
6 changed files with 54 additions and 7648 deletions

View File

@ -1,17 +0,0 @@
package BSSolv;
use strict;
require Exporter;
our @ISA = qw(Exporter);
our $VERSION = '0.17';
require XSLoader;
XSLoader::load('BSSolv', $VERSION);
package BSSolv::repo;
1;

7545
BSSolv.xs

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +0,0 @@
use ExtUtils::MakeMaker;
my $solvprefix = '/usr';
my $inc = "-I$solvprefix/include/solv";
my $lib;
if (grep {$_ eq '--bundled-libsolv'} @ARGV) {
my $builddir = 'libsolv';
$inc = "-I$builddir/src -I$builddir/ext";
$lib = "-L$builddir/src -L$builddir/ext -lsolvext -lsolv -lz -llzma -lzstd";
} else {
$lib = '-lsolvext -lsolv';
}
WriteMakefile(
NAME => 'BSSolv',
VERSION_FROM => 'BSSolv.pm',
INC => $inc,
LIBS => [ $lib ],
)

Binary file not shown.

View File

@ -1,76 +1,69 @@
%global min_libsolv_version 0.6.30
Name: perl-BSSolv Name: perl-BSSolv
Version: 0.37 Version: 0.14
Release: lp151.1.3 Release: 1%{?dist}
Summary: A new approach to package dependency solving Summary: OBS solver and repository management using libsolv
License: BSD-3-Clause License: GPL or Artistic
Url: https://github.com/openSUSE/perl-BSSolv URL: https://github.com/openSUSE/perl-BSSolv
Source: https://github.com/openSUSE/libsolv/archive/0.7.2.tar.gz#/libsolv-0.7.2.tar.gz Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Source1: Makefile.PL
Source2: BSSolv.pm # Backports from upstream
Source3: BSSolv.xs Patch0001: 0001-Implement-genmetaalgo-1.patch
Source4: typemap
# Patches proposed upstream
BuildRequires: perl-devel cmake gcc-c++ perl xz-devel zlib-devel # Align Debian and Arch support to libsolv, bug #1342160
BuildRequires: libzstd-devel perl(ExtUtils::MakeMaker) check-devel # From: https://github.com/openSUSE/perl-BSSolv/pull/10
Requires: perl Patch0501: 0501-Align-Debian-and-Arch-support-to-libsolv.patch
%if 0%{!?perl_vendorarch} BuildRequires: gcc
%define perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch) BuildRequires: libsolv-devel >= %{min_libsolv_version}
%endif BuildRequires: perl-interpreter
BuildRequires: perl(strict)
BuildRequires: perl-interpreter
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: perl(Test::More)
BuildRequires: perl(ExtUtils::MakeMaker)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: libsolv%{?_isa} >= %{min_libsolv_version}
%description %description
Using a Satisfyability Solver to compute package dependencies. This is a support perl module for the OBS backend. It contains functions
for repository management, dependency solving, package ordering, and meta
file creation.
%prep %prep
%setup -c %autosetup -p1
ln -s libsolv-* libsolv
cp %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
pushd libsolv
popd
%build %build
export CFLAGS="$RPM_OPT_FLAGS" # Ensure build flags are set
export CXXFLAGS="$CFLAGS" %{set_build_flags}
perl Makefile.PL
CMAKE_FLAGS= make %{?_smp_mflags}
CFLAGS="$CFLAGS -DUSE_OWN_QSORT"
pushd libsolv
cmake $CMAKE_FLAGS \
-DDISABLE_SHARED=1 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=1 \
-DENABLE_RPMPKG=1 \
-DENABLE_DEBIAN=1 \
-DENABLE_ARCHREPO=1 \
-DENABLE_LZMA_COMPRESSION=1 \
-DENABLE_ZSTD_COMPRESSION=1 \
-DENABLE_COMPLEX_DEPS=1 \
-DMULTI_SEMANTICS=1
pushd src ; make ; popd
pushd ext ; make ; popd
popd
perl Makefile.PL --bundled-libsolv INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1
%make_build
%check
make test
%install %install
make DESTDIR=%{buildroot} install_vendor make DESTDIR=%{buildroot} install_vendor
find %{buildroot} -type f -name perllocal.pod -exec rm -f {} \; find %{buildroot} -type f -name perllocal.pod -exec rm -f {} \;
find %{buildroot} -type f -name .packlist -exec rm -f {} \; find %{buildroot} -type f -name .packlist -exec rm -f {} \;
find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';' find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} %{buildroot}/* %{_fixperms} %{buildroot}/*
%check
make test
%files %files
%defattr(-,root,root)
%{perl_vendorarch}/BSSolv.pm %{perl_vendorarch}/BSSolv.pm
%{perl_vendorarch}/auto/BSSolv %{perl_vendorarch}/auto/BSSolv
%doc README dist/perl-BSSolv.changes
%changelog %changelog
* Wed Nov 25 2020 wuchaochao <wuchaochao4@huawei.com> - 0.14-1
- change spec
* Wed Sep 16 2020 Ge Wang <wangge20@huawei.com> - 0.37-lp151.1.3 * Wed Sep 16 2020 Ge Wang <wangge20@huawei.com> - 0.37-lp151.1.3
- Modify Source0 Url - Modify Source0 Url

View File

@ -1,3 +0,0 @@
BSSolv::pool T_PTROBJ
BSSolv::repo T_PTROBJ
BSSolv::expander T_PTROBJ