commit 226018c2682cb1ffec63c8089f7d35b3b3202117 Author: catastrowings Date: Thu Nov 28 15:29:31 2019 +0800 openEuler init diff --git a/build.spec b/build.spec new file mode 100644 index 0000000..18290ae --- /dev/null +++ b/build.spec @@ -0,0 +1,109 @@ +Name: build +Summary: A tool to build binary packages +License: GPL-2.0-only OR GPL-3.0-only +Version: 20191114 +Release: 324.2 +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) +%doc README +%{_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 +%{_mandir}/man1/build.1* +%{_mandir}/man1/unrpm.1* +%{_mandir}/man1/buildvc.1* + +%changelog +* Thu Nov 28 2019 catastrowings - 20191114-324.2 +- openEuler init diff --git a/obs-build-20191114.tar.gz b/obs-build-20191114.tar.gz new file mode 100644 index 0000000..ca55de5 Binary files /dev/null and b/obs-build-20191114.tar.gz differ