89 lines
2.8 KiB
RPMSpec
89 lines
2.8 KiB
RPMSpec
%global __cmake_in_source_build 1
|
|
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
|
%global vendor %{?_vendor:%{_vendor}}%{!?_vendor:openEuler}
|
|
Name: scl-utils
|
|
Epoch: 1
|
|
Version: 2.0.2
|
|
Release: 5
|
|
Summary: Utilities for alternative packaging
|
|
License: GPLv2+
|
|
URL: https://github.com/sclorg/scl-utils
|
|
Source0: https://github.com/sclorg/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
|
Source1: macros.scl-filesystem
|
|
BuildRequires: gcc make
|
|
Buildrequires: cmake
|
|
Buildrequires: rpm-devel
|
|
Requires: %{_bindir}/modulecmd
|
|
Patch1: 0003-Scl-utils-layout-patch-from-fedora-famillecollet.com.patch
|
|
Patch100: scl-utils-2.0.2-rhbz-1728450.patch
|
|
Patch101: fix-direct-scl_source-help-output.patch
|
|
Patch102: add-h-option-to-scl-command.patch
|
|
%description
|
|
Run-time utility for alternative packaging.
|
|
|
|
%package build
|
|
Summary: RPM build macros for alternative packaging
|
|
Requires: iso-codes %{vendor}-rpm-config
|
|
%description build
|
|
Essential RPM build macros for alternative packaging.
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
|
|
%build
|
|
%cmake .
|
|
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
|
|
|
|
%install
|
|
rm -rf %{buildroot}
|
|
make install DESTDIR=%{buildroot}
|
|
if [ %{macrosdir} != %{_sysconfdir}/rpm ]; then
|
|
mkdir -p %{buildroot}%{macrosdir}
|
|
mv %{buildroot}%{_sysconfdir}/rpm/macros.scl %{buildroot}%{macrosdir}
|
|
rmdir %{buildroot}%{_sysconfdir}/rpm
|
|
fi
|
|
cat %SOURCE1 >> %{buildroot}%{macrosdir}/macros.scl
|
|
mkdir -p %{buildroot}%{_sysconfdir}/scl
|
|
cd %{buildroot}%{_sysconfdir}/scl
|
|
mkdir modulefiles
|
|
mkdir prefixes
|
|
ln -s prefixes conf
|
|
|
|
%files
|
|
%dir %{_sysconfdir}/scl/modulefiles
|
|
%dir %{_sysconfdir}/scl/prefixes
|
|
%{_sysconfdir}/scl/conf
|
|
%{_sysconfdir}/scl/func_scl.csh
|
|
%config %{_sysconfdir}/bash_completion.d/scl
|
|
%config %{_sysconfdir}/profile.d/scl-init.sh
|
|
%config %{_sysconfdir}/profile.d/scl-init.csh
|
|
%{_bindir}/scl
|
|
%{_bindir}/scl_enabled
|
|
%{_bindir}/scl_source
|
|
%{_mandir}/man1/scl.1.gz
|
|
%doc LICENSE
|
|
|
|
%files build
|
|
%{macrosdir}/macros.scl
|
|
%{_rpmconfigdir}/scldeps.sh
|
|
%{_rpmconfigdir}/fileattrs/scl.attr
|
|
%{_rpmconfigdir}/fileattrs/sclbuild.attr
|
|
%{_rpmconfigdir}/brp-scl-compress
|
|
%{_rpmconfigdir}/brp-scl-python-bytecompile
|
|
|
|
%changelog
|
|
* Thu Nov 17 2022 caodongxia <caodongxia@h-partners.com> - 1:2.0.2-5
|
|
- Replace oenEuler with the vendor macro
|
|
|
|
* Tue Mar 1 2022 yangping <yangping69@huawei.com> - 1:2.0.2-4
|
|
- Fix need config
|
|
|
|
* Tue Oct 12 2021 caodongxia <caodongxia@huawei.com> - 1:2.0.2-3
|
|
- add -h option to scl command
|
|
|
|
* Fri Oct 08 2021 wangyue <wangyue92@huawei.com> - 1:2.0.2-2
|
|
- fix direct scl_source --help output
|
|
|
|
* Tue Sep 7 2021 zhengyaohui <zhengyaohui1@huawei.com> - 1:2.0.2-1
|
|
- package init
|