summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-09-26 20:46:06 +0800
committerruki <[email protected]>2020-09-26 20:46:06 +0800
commitb1c358e57b442610f481cf8c834ae46c90b99645 (patch)
treef4fe7118dcbc15361efad360fc65e05e9d93c2eb
parent666cff34c4bda3b6896adfdcdc7df85ab0287d29 (diff)
improve xmake.spec
-rw-r--r--makefile7
-rw-r--r--scripts/rpmbuild/SPECS/xmake.spec16
2 files changed, 8 insertions, 15 deletions
diff --git a/makefile b/makefile
index acd92d640..d6103f6a6 100644
--- a/makefile
+++ b/makefile
@@ -86,11 +86,6 @@ else
xmake_core_install :=$(destdir)/bin/xmake
endif
-tip:
- @echo 'Usage: '
- @echo ' $ make build'
- @echo ' $ sudo make install [PREFIX=/usr/local] [DESTDIR=/xxx]'
-
build:
@echo compiling xmake-core ...
@if [ -f core/.config.mak ]; then rm core/.config.mak; fi
@@ -127,4 +122,4 @@ test:
@xmake lua --verbose tests/run.lua $(name)
@echo ok!
-.PHONY: tip build install uninstall
+.PHONY: build install uninstall
diff --git a/scripts/rpmbuild/SPECS/xmake.spec b/scripts/rpmbuild/SPECS/xmake.spec
index 6d9460f8c..62ac723f9 100644
--- a/scripts/rpmbuild/SPECS/xmake.spec
+++ b/scripts/rpmbuild/SPECS/xmake.spec
@@ -11,7 +11,7 @@ Version: 2.3.7
Release: 1%{?dist}
Summary: A cross-platform build utility based on Lua
BuildArch: noarch
-License: Apache-2.0
+License: ASL 2.0
URL: https://xmake.io
Source0: https://github.com/xmake-io/xmake/archive/%{xmake_branch}.tar.gz#/xmake-%{xmake_branch}.tar.gz
Source1: https://github.com/tboox/tbox/archive/%{tbox_branch}.tar.gz#/tbox-%{tbox_branch}.tar.gz
@@ -55,23 +55,21 @@ ln -s `pwd`/../xmake-core-luajit-%{luajit_branch} core/src/luajit/luajit
ln -s `pwd`/../xmake-core-lua-cjson-%{lua_cjson_branch} core/src/lua-cjson/lua-cjson
%build
-make build
+%set_build_flags
+%make_build
%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}
-cp -r xmake %{buildroot}%{_datadir}/%{name}
-cp core/src/demo/demo.b %{buildroot}%{_bindir}/%{name}
+cp -p -r xmake %{buildroot}%{_datadir}/%{name}
+cp -p core/src/demo/demo.b %{buildroot}%{_bindir}/%{name}
chmod 755 %{buildroot}%{_bindir}/%{name}
-cp README.md %{buildroot}%{_datadir}
-cp LICENSE.md %{buildroot}%{_datadir}
+cp -p README.md %{buildroot}%{_datadir}
+cp -p LICENSE.md %{buildroot}%{_datadir}
%check
XMAKE_ROOT=y %{buildroot}%{_bindir}/%{name} --version
-%clean
-rm -rf %{buildroot}
-
%files
%{_bindir}/%{name}
%{_datadir}/%{name}