mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
packaging: add a simple 'make rpm' (#3)
Summary: Pull Request resolved: https://github.com/facebook/sapling-staging/pull/3 Reviewed By: bolinfest Differential Revision: D39072060 fbshipit-source-id: bb7a207fade4d3b717a1cf2ff6c68542d2da6e84
This commit is contained in:
parent
0ff247bc9f
commit
2e3ca8b5fa
@ -113,6 +113,12 @@ deb:
|
||||
dpkg-deb --build --root-owner-group install
|
||||
dpkg-name install.deb
|
||||
|
||||
rpm:
|
||||
rpmbuild \
|
||||
--define "sapling_root `pwd`" \
|
||||
--define "version $(VERSION)" \
|
||||
-bb packaging/rpm/sapling.spec
|
||||
|
||||
wheel:
|
||||
FORCE_SETUPTOOLS=1 $(PYTHON) setup.py $(PURE) bdist_wheel $(COMPILERFLAG)
|
||||
|
||||
|
45
eden/scm/packaging/rpm/sapling.spec
Normal file
45
eden/scm/packaging/rpm/sapling.spec
Normal file
@ -0,0 +1,45 @@
|
||||
%define py_version 3.8
|
||||
%define py_version_num 38
|
||||
%define py_usr_dir /usr
|
||||
%define __python python3.8
|
||||
%if 0%{?fedora}
|
||||
%define os_release fc29
|
||||
%else
|
||||
%define os_release el
|
||||
%endif
|
||||
|
||||
%undefine __brp_mangle_shebangs
|
||||
|
||||
Summary: Sapling
|
||||
Name: sapling
|
||||
Version: %version
|
||||
Release: %{os_release}
|
||||
|
||||
License: GPLv2+
|
||||
Group: Development/Tools
|
||||
|
||||
Requires: python%{py_version}
|
||||
|
||||
%description
|
||||
A source control system.
|
||||
|
||||
%prep
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
cd "%{sapling_root}"
|
||||
make DESTDIR="$RPM_BUILD_ROOT" PREFIX="%{_prefix}" install-oss
|
||||
|
||||
%post
|
||||
|
||||
%clean
|
||||
rm -rf "$RPM_BUILD_ROOT"
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
%{_bindir}/*
|
||||
%{_libdir}/*
|
||||
|
||||
%changelog
|
@ -522,7 +522,9 @@ void print_buildinfo() {
|
||||
|
||||
# If NEED_BUILDINFO is set, write buildinfo.
|
||||
# For rpmbuild, imply NEED_BUILDINFO.
|
||||
needbuildinfo = bool(os.environ.get("NEED_BUILDINFO", "RPM_PACKAGE_NAME" in os.environ))
|
||||
needbuildinfo = bool(
|
||||
os.environ.get("NEED_BUILDINFO", "RPM_PACKAGE_NAME" in os.environ and not ossbuild)
|
||||
)
|
||||
|
||||
if needbuildinfo:
|
||||
buildinfocpath = writebuildinfoc()
|
||||
|
Loading…
Reference in New Issue
Block a user