From 95c0752c2574edcd465d4f790e22ede96d8feb56 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 29 Mar 2017 22:43:58 +0800 Subject: add make rpm script --- scripts/make_deb | 8 +++++++- scripts/make_osxpkg | 8 +++++++- scripts/make_rpm | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100755 scripts/make_rpm (limited to 'scripts') diff --git a/scripts/make_deb b/scripts/make_deb index 336ff25d1..95573e0e0 100755 --- a/scripts/make_deb +++ b/scripts/make_deb @@ -7,6 +7,12 @@ # version version=2.1.3 +# arch +arch=i386 +if [ `getconf LONG_BIT` == "64" ]; then + arch=x86_64 +fi + # build xmake core cd ./core make f DEBUG=n @@ -23,7 +29,7 @@ chmod 755 /tmp/xmake.sh # make dep package using fpm fpm -s dir -t deb -n xmake -v $version -m "" --description="A make-like build utility based on Lua" --license=LICENSE.md \ xmake=/usr/local/share/ \ - core/bin/demo.pkg/bin/linux/x86_64/demo.b=/usr/local/share/xmake/xmake \ + core/bin/demo.pkg/bin/linux/$arch/demo.b=/usr/local/share/xmake/xmake \ /tmp/xmake.sh=/usr/local/bin/xmake diff --git a/scripts/make_osxpkg b/scripts/make_osxpkg index d19e9c6cb..c9d4ae6af 100755 --- a/scripts/make_osxpkg +++ b/scripts/make_osxpkg @@ -7,6 +7,12 @@ # version version=2.1.3 +# arch +arch=i386 +if [ `getconf LONG_BIT` == "64" ]; then + arch=x86_64 +fi + # build xmake core cd ./core make f DEBUG=n @@ -23,7 +29,7 @@ chmod 755 /tmp/xmake.sh # make dep package using fpm fpm -s dir -t osxpkg -n xmake -v $version -m "" --description="A make-like build utility based on Lua" --license=LICENSE.md \ xmake=/usr/local/share/ \ - core/bin/demo.pkg/bin/macosx/x86_64/demo.b=/usr/local/share/xmake/xmake \ + core/bin/demo.pkg/bin/macosx/$arch/demo.b=/usr/local/share/xmake/xmake \ /tmp/xmake.sh=/usr/local/bin/xmake diff --git a/scripts/make_rpm b/scripts/make_rpm new file mode 100755 index 000000000..be4d153fe --- /dev/null +++ b/scripts/make_rpm @@ -0,0 +1,35 @@ +#!/bin/bash + +# install fpm +# yum install ruby-devel gcc make rpm-build +# gem install --no-ri --no-rdoc fpm + +# version +version=2.1.3 + +# arch +arch=i386 +if [ `getconf LONG_BIT` == "64" ]; then + arch=x86_64 +fi + +# build xmake core +cd ./core +make f DEBUG=n +make r +cd - + +# make xmake wrapper +echo "#/!bin/bash +export XMAKE_PROGRAM_DIR=/usr/local/share/xmake +/usr/local/share/xmake/xmake \"\$@\" +" > /tmp/xmake.sh +chmod 755 /tmp/xmake.sh + +# make dep package using fpm +fpm -s dir -t rpm -n xmake -v $version -m "" --description="A make-like build utility based on Lua" --license=LICENSE.md \ + xmake=/usr/local/share/ \ + core/bin/demo.pkg/bin/linux/$arch/demo.b=/usr/local/share/xmake/xmake \ + /tmp/xmake.sh=/usr/local/bin/xmake + + -- cgit v1.3.1