Debian Codegraph @

dist/perl-BSSolv.spec

raw
1 #
2 # spec file for package perl-BSSolv
3 #
4 # Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
5 #
6 # All modifications and additions to the file contributed by third parties
7 # remain the property of their copyright owners, unless otherwise agreed
8 # upon. The license for this file, and modifications and additions to the
9 # file, is the same license as for the pristine package itself (unless the
10 # license for the pristine package is not an Open Source License, in which
11 # case the license is the MIT License). An "Open Source License" is a
12 # license that conforms to the Open Source Definition (Version 1.9)
13 # published by the Open Source Initiative.
14
15 # Please submit bugfixes or comments via https://bugs.opensuse.org/
16 #
17
18
19 Name: perl-BSSolv
20 Version: 0.37.0
21 Release: 0
22 Url: https://github.com/openSUSE/perl-BSSolv
23 Source0: perl-BSSolv-%{version}.tar.xz
24 Source1: libsolv.tar.gz
25 BuildRoot: %{_tmppath}/%{name}-%{version}-build
26
27 %if 0%{?fedora_version}
28 BuildRequires: perl-devel
29 %endif
30 %if 0%{?suse_version}
31 Requires: perl = %perl_version
32 %endif
33 BuildRequires: cmake
34 BuildRequires: gcc-c++
35 BuildRequires: perl
36 BuildRequires: xz-devel
37 BuildRequires: zlib-devel
38 BuildRequires: libzstd-devel
39 #RHEL6 moved ExtUtils::MakeMaker outside the main perl package
40 BuildRequires: perl(ExtUtils::MakeMaker)
41 # the testsuite uses the check framework
42 BuildRequires: check-devel
43 Summary: A new approach to package dependency solving
44 License: BSD-3-Clause
45 Group: Development/Libraries/C and C++
46 # probably needed for rhel/centos on x86_64
47 %if 0%{!?perl_vendorarch}
48 %define perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
49 %endif
50
51 %description
52 Using a Satisfyability Solver to compute package dependencies.
53
54 %prep
55 %setup -a 1
56 test -d libsolv || ln -s libsolv-* libsolv
57 pushd libsolv
58 popd
59
60 %build
61 export CFLAGS="$RPM_OPT_FLAGS"
62 export CXXFLAGS="$CFLAGS"
63
64 CMAKE_FLAGS=
65 %if 0%{?rhel_version} || 0%{?centos_version}
66 CFLAGS="$CFLAGS -DUSE_OWN_QSORT"
67 %endif
68
69 pushd libsolv
70 cmake $CMAKE_FLAGS \
71 -DDISABLE_SHARED=1 \
72 -DCMAKE_BUILD_TYPE=Release \
73 -DCMAKE_SKIP_RPATH=1 \
74 -DENABLE_RPMPKG=1 \
75 -DENABLE_DEBIAN=1 \
76 -DENABLE_ARCHREPO=1 \
77 -DENABLE_APK=1 \
78 -DENABLE_LZMA_COMPRESSION=1 \
79 -DENABLE_ZSTD_COMPRESSION=1 \
80 -DENABLE_COMPLEX_DEPS=1 \
81 -DMULTI_SEMANTICS=1
82 pushd src ; make ; popd
83 pushd ext ; make ; popd
84 popd
85
86 perl Makefile.PL --bundled-libsolv
87 make
88
89 %check
90 make test
91
92 %install
93 make DESTDIR=$RPM_BUILD_ROOT install_vendor
94 %if 0%{?suse_version}
95 %perl_process_packlist
96 %else
97 find $RPM_BUILD_ROOT -type f -name perllocal.pod -exec rm -f {} \;
98 find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
99 find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
100 find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
101 %{_fixperms} $RPM_BUILD_ROOT/*
102 %endif
103
104 %files
105 %defattr(-,root,root)
106 %{perl_vendorarch}/BSSolv.pm
107 %{perl_vendorarch}/auto/BSSolv
108 %if 0%{?suse_version}
109 %if 0%{?suse_version} < 1140
110 /var/adm/perl-modules/*
111 %endif
112 %endif
113
114 %changelog