diff --git a/alibuild.spec b/alibuild.spec new file mode 100644 index 00000000..83227470 --- /dev/null +++ b/alibuild.spec @@ -0,0 +1,39 @@ +Name: alibuild +Version: %{?version}%{!?version:0} +Release: 1%{?dist} +Summary: ALICE Build Tool +License: GPL-3.0-or-later +URL: https://github.com/alisw/alibuild +Source0: alibuild-%{version}-py3-none-any.whl + +BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: python3-pip + +Requires: python3 +Requires: git +Requires: python3-pyyaml +Requires: python3-requests +Requires: python3-distro + +%description +ALICE Build Tool for building HEP software. + +%prep +%build + +%install +%{python3} -m pip install --root %{buildroot} --prefix %{_prefix} --no-deps --no-index %{SOURCE0} + +%files +%{python3_sitelib}/alibuild_helpers/ +%{python3_sitelib}/alibuild-*.dist-info/ +%{_bindir}/aliBuild +%{_bindir}/alienv +%{_bindir}/aliDoctor +%{_bindir}/aliDeps +%{_bindir}/pb + +%changelog +* Tue Jan 14 2025 ALICE Offline +- See https://github.com/alisw/alibuild/releases for release notes diff --git a/build-rpm.sh b/build-rpm.sh new file mode 100755 index 00000000..3ac64147 --- /dev/null +++ b/build-rpm.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -e + +VERSION=${1:?Usage: $0 } +SPEC=alibuild.spec + +BUILDDIR=$(mktemp -d) +trap 'rm -rf "$BUILDDIR"' EXIT + +echo "Building alibuild ${VERSION} wheel from current directory..." + +# Build wheel to SOURCES +mkdir -p "$BUILDDIR/SOURCES" +SETUPTOOLS_SCM_PRETEND_VERSION="${VERSION}" pip wheel --no-deps --wheel-dir "$BUILDDIR/SOURCES" . + +# Build RPM +rpmbuild -ba "${SPEC}" \ + --define "version ${VERSION}" \ + --define "_topdir ${BUILDDIR}" + +# Copy RPMs to current directory +cp "$BUILDDIR/RPMS"/*/*.rpm "$BUILDDIR/SRPMS"/*.rpm . +echo "Done. RPMs copied to current directory." diff --git a/pyproject.toml b/pyproject.toml index d3bef30a..d01ebd6a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ alibuild_helpers = ['build_template.sh'] [tool.setuptools.packages.find] where = ["."] -exclude = ["yaml"] +exclude = ["debian", "docs", "docs.*", "templates", "tests", "tests.*"] [tool.setuptools.dynamic] readme = {file = ["README.rst"]}