!9 change spec
From: @wcc_140409 Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
780e02fae4
17
BSSolv.pm
17
BSSolv.pm
@ -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;
|
||||
22
Makefile.PL
22
Makefile.PL
@ -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.
115
perl-BSSolv.spec
115
perl-BSSolv.spec
@ -1,76 +1,69 @@
|
||||
|
||||
%global min_libsolv_version 0.6.30
|
||||
|
||||
Name: perl-BSSolv
|
||||
Version: 0.37
|
||||
Release: lp151.1.3
|
||||
Summary: A new approach to package dependency solving
|
||||
License: BSD-3-Clause
|
||||
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
|
||||
Source1: Makefile.PL
|
||||
Source2: BSSolv.pm
|
||||
Source3: BSSolv.xs
|
||||
Source4: typemap
|
||||
|
||||
BuildRequires: perl-devel cmake gcc-c++ perl xz-devel zlib-devel
|
||||
BuildRequires: libzstd-devel perl(ExtUtils::MakeMaker) check-devel
|
||||
Requires: perl
|
||||
|
||||
%if 0%{!?perl_vendorarch}
|
||||
%define perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
|
||||
%endif
|
||||
|
||||
Version: 0.14
|
||||
Release: 1%{?dist}
|
||||
Summary: OBS solver and repository management using libsolv
|
||||
License: GPL or Artistic
|
||||
URL: https://github.com/openSUSE/perl-BSSolv
|
||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
# Backports from upstream
|
||||
Patch0001: 0001-Implement-genmetaalgo-1.patch
|
||||
|
||||
# Patches proposed upstream
|
||||
# Align Debian and Arch support to libsolv, bug #1342160
|
||||
# From: https://github.com/openSUSE/perl-BSSolv/pull/10
|
||||
Patch0501: 0501-Align-Debian-and-Arch-support-to-libsolv.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libsolv-devel >= %{min_libsolv_version}
|
||||
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
|
||||
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
|
||||
%setup -c
|
||||
ln -s libsolv-* libsolv
|
||||
cp %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
|
||||
pushd libsolv
|
||||
popd
|
||||
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
|
||||
CMAKE_FLAGS=
|
||||
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
|
||||
|
||||
# Ensure build flags are set
|
||||
%{set_build_flags}
|
||||
perl Makefile.PL
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} install_vendor
|
||||
find %{buildroot} -type f -name perllocal.pod -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} -depth -type d -exec rmdir {} 2>/dev/null \;
|
||||
find %{buildroot} -type f -name perllocal.pod -exec rm -f {} \;
|
||||
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
|
||||
find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
|
||||
%{_fixperms} %{buildroot}/*
|
||||
|
||||
|
||||
%check
|
||||
make test
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{perl_vendorarch}/BSSolv.pm
|
||||
%{perl_vendorarch}/auto/BSSolv
|
||||
%doc README dist/perl-BSSolv.changes
|
||||
|
||||
%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
|
||||
- Modify Source0 Url
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user