summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorruki <[email protected]>2020-09-23 23:27:52 +0800
committerruki <[email protected]>2020-09-23 23:27:52 +0800
commitfe95085a005dfed02c369f5a0100452d1bf4158e (patch)
tree7e87ca46367c96178e4ebcef6047d98324f10465 /scripts
parentd6122ebd5e1b9baaf5cc7091825deed22c3b7512 (diff)
improve xmake.spec
Diffstat (limited to 'scripts')
-rw-r--r--scripts/rpmbuild/SPECS/xmake.spec44
1 files changed, 37 insertions, 7 deletions
diff --git a/scripts/rpmbuild/SPECS/xmake.spec b/scripts/rpmbuild/SPECS/xmake.spec
index bd7bfcb15..bba2b0846 100644
--- a/scripts/rpmbuild/SPECS/xmake.spec
+++ b/scripts/rpmbuild/SPECS/xmake.spec
@@ -6,7 +6,6 @@ BuildArch: noarch
License: Apache-2.0
URL: https://xmake.io
-BuildRequires: git
BuildRequires: gcc-c++
BuildRequires: ncurses-devel
BuildRequires: readline-devel
@@ -22,20 +21,51 @@ It can compile the project directly like Make/Ninja, or
generate project files like CMake/Meson, and it also has a built-in package management
system to help users solve the integrated use of C/C++ dependent libraries.
+%define xmake_commitid dev
+%define tbox_commitid dev
+%define luajit_commitid 2.1-xmake
+%define sv_commitid xmake-core
+%define lua_cjson_commitid xmake-core
+%define xmake_basename xmake-v%{version}
%define _binaries_in_noarch_packages_terminate_build 0
%prep
-rm -rf xmake-v%{version}
-git clone https://github.com/xmake-io/xmake.git -b dev xmake-v%{version}
-cd xmake-v%{version}
-git submodule update --init
+# pull xmake sources, we cannot use git because it will crash on fedora-armhfp
+rm -rf %{xmake_basename}
+wget https://github.com/xmake-io/xmake/archive/%{xmake_commitid}.zip -O xmake-%{xmake_commitid}.zip
+unzip xmake-%{xmake_commitid}.zip
+mv xmake-%{xmake_commitid} %{xmake_basename}
+
+# pull tbox sources
+wget https://github.com/tboox/tbox/archive/%{tbox_commitid}.zip -O tbox-%{tbox_commitid}.zip
+unzip tbox-%{tbox_commitid}.zip
+rm -rf %{xmake_basename}/core/src/tbox/tbox
+mv tbox-%{tbox_commitid} %{xmake_basename}/core/src/tbox/tbox
+
+# pull luajit sources
+wget https://github.com/xmake-io/xmake-core-luajit/archive/v%{luajit_commitid}.zip -O luajit-%{luajit_commitid}.zip
+unzip luajit-%{luajit_commitid}.zip
+rm -rf %{xmake_basename}/core/src/luajit/luajit
+mv xmake-core-luajit-%{luajit_commitid} %{xmake_basename}/core/src/luajit/luajit
+
+# pull sv sources
+wget https://github.com/xmake-io/xmake-core-sv/archive/%{sv_commitid}.zip -O sv-%{sv_commitid}.zip
+unzip sv-%{sv_commitid}.zip
+rm -rf %{xmake_basename}/core/src/sv/sv
+mv xmake-core-sv-%{sv_commitid} %{xmake_basename}/core/src/sv/sv
+
+# pull lua-cjson sources
+wget https://github.com/xmake-io/xmake-core-lua-cjson/archive/%{lua_cjson_commitid}.zip -O lua-cjson-%{lua_cjson_commitid}.zip
+unzip lua-cjson-%{lua_cjson_commitid}.zip
+rm -rf %{xmake_basename}/core/src/lua-cjson/lua-cjson
+mv xmake-core-lua-cjson-%{lua_cjson_commitid} %{xmake_basename}/core/src/lua-cjson/lua-cjson
%build
-cd xmake-v%{version}
+cd %{xmake_basename}
make build
%install
-cd xmake-v%{version}
+cd %{xmake_basename}
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}
cp -r xmake %{buildroot}%{_datadir}/%{name}