107 lines
2.6 KiB
RPMSpec
107 lines
2.6 KiB
RPMSpec
Name: build
|
|
Version: 20191114
|
|
Release: 324.3
|
|
Summary: A tool to build binary packages
|
|
License: GPL-2.0-only OR GPL-3.0-only
|
|
Url: https://github.com/openSUSE/obs-build
|
|
Source: obs-build-%{version}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
Requires: bash binutils perl tar psmisc build-mkbaselibs
|
|
BuildRequires: bash binutils perl psmisc tar
|
|
|
|
%description
|
|
This is a tool to build binary packages in a safe and reproducible
|
|
way. The default is to build in a chroot sandbox, but it also
|
|
supports building in a virtual machine for better security.
|
|
The build tool can work with multiple package and recipe formats.
|
|
The currently supported package formats are deb, rpm, and arch.
|
|
The supported recipe formats are spec, dsc, kiwi, and PKGBUILD.
|
|
|
|
%package mkbaselibs
|
|
Summary: Base lib package for %{name}
|
|
|
|
%description mkbaselibs
|
|
This package contains some files to be installed int the build system to generate
|
|
base lib packages.
|
|
|
|
%package mkdrpms
|
|
Summary: Delta rpms tools
|
|
Requires: deltarpm %{name}
|
|
|
|
%description mkdrpms
|
|
This package contains file to be installed in the build system to generate delta
|
|
rpm packages.
|
|
|
|
%package help
|
|
Summary: Help package for %{name}
|
|
BuildArch: noarch
|
|
|
|
%description help
|
|
This package contains some man help packages for %{name}.
|
|
|
|
%prep
|
|
%autosetup -n obs-build-%{version} -p1
|
|
|
|
%build
|
|
|
|
%install
|
|
%make_install
|
|
|
|
%check
|
|
for file in build build-*
|
|
do
|
|
bash -n ${file} || exit 1
|
|
done
|
|
if [ `id -u` -ne 0 ]
|
|
then
|
|
echo "warning: Not building as root, tests will not run!"
|
|
exit 0
|
|
fi
|
|
if [ ! -f "%{buildroot}/usr/lib/build/configs/default.conf" ]
|
|
then
|
|
echo "warning: No default config, tests will not run!"
|
|
exit 0
|
|
fi
|
|
cp -a %{buildroot}/usr/lib/build/configs/default.conf configs/
|
|
export BUILD_IGNORE_2ND_STAGE=1
|
|
export BUILD_DIR=$PWD
|
|
sed -i 's,build-mkbaselibs,,' configs/*.conf
|
|
./test/testbuild.sh /.build.binaries/
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%{_bindir}/build
|
|
%{_bindir}/buildvc
|
|
%{_bindir}/unrpm
|
|
/usr/lib/build
|
|
%config(noreplace) /usr/lib/build/emulator/emulator.sh
|
|
%exclude /usr/lib/build/mkbaselibs
|
|
%exclude /usr/lib/build/baselibs*
|
|
%exclude /usr/lib/build/mkdrpms
|
|
|
|
%files mkbaselibs
|
|
%defattr(-,root,root)
|
|
%dir /usr/lib/build
|
|
/usr/lib/build/mkbaselibs
|
|
/usr/lib/build/baselibs*
|
|
|
|
%files mkdrpms
|
|
%defattr(-,root,root)
|
|
%dir /usr/lib/build
|
|
/usr/lib/build/mkdrpms
|
|
|
|
%files help
|
|
%defattr(-,root,root)
|
|
%doc README
|
|
%{_mandir}/man1/build.1*
|
|
%{_mandir}/man1/unrpm.1*
|
|
%{_mandir}/man1/buildvc.1*
|
|
|
|
%changelog
|
|
* Fri Mar 06 2020 openEuler Buildteam <buildteam@openeuler.com> - 20191114-324.3
|
|
- Rectify the spec file
|
|
|
|
* Thu Nov 28 2019 catastrowings <jianghuhao1994@163.com> - 20191114-324.2
|
|
- openEuler init
|