diff options
| author | ruki <[email protected]> | 2017-03-29 23:13:12 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-03-29 23:13:12 +0800 |
| commit | 0999f3f14eda6192cd2bc8f4c4cc875c729ea500 (patch) | |
| tree | ee5e10a40a3401fce930a28d8d7b51d8d6c41a9d /scripts | |
| parent | 95c0752c2574edcd465d4f790e22ede96d8feb56 (diff) | |
modify makepkg script
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/make_deb | 35 | ||||
| -rwxr-xr-x | scripts/make_rpm | 35 | ||||
| -rwxr-xr-x | scripts/makepkg (renamed from scripts/make_osxpkg) | 21 |
3 files changed, 18 insertions, 73 deletions
diff --git a/scripts/make_deb b/scripts/make_deb deleted file mode 100755 index 95573e0e0..000000000 --- a/scripts/make_deb +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# install fpm -# apt-get install ruby ruby-dev rubygems gcc make -# 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 deb -n xmake -v $version -m "<[email protected]>" --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 - - diff --git a/scripts/make_rpm b/scripts/make_rpm deleted file mode 100755 index be4d153fe..000000000 --- a/scripts/make_rpm +++ /dev/null @@ -1,35 +0,0 @@ -#!/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 "<[email protected]>" --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 - - diff --git a/scripts/make_osxpkg b/scripts/makepkg index c9d4ae6af..913f49b49 100755 --- a/scripts/make_osxpkg +++ b/scripts/makepkg @@ -4,8 +4,17 @@ # brew install gnu-tar # gem install --no-ri --no-rdoc fpm +# check +if [ $# -lt 2 ]; then + echo "Usage: ./scripts/makepkg [rpm|deb|oscpkg|pacman] [version]" + exit +fi + +# target +target=$1 + # version -version=2.1.3 +version=$2 # arch arch=i386 @@ -13,6 +22,12 @@ if [ `getconf LONG_BIT` == "64" ]; then arch=x86_64 fi +# platform +plat=linux +if [ `uname` == "Darwin" ]; then + plat=macosx +fi + # build xmake core cd ./core make f DEBUG=n @@ -27,9 +42,9 @@ export XMAKE_PROGRAM_DIR=/usr/local/share/xmake chmod 755 /tmp/xmake.sh # make dep package using fpm -fpm -s dir -t osxpkg -n xmake -v $version -m "<[email protected]>" --description="A make-like build utility based on Lua" --license=LICENSE.md \ +fpm -s dir -t $target -n xmake -v $version -m "<[email protected]>" --description="A make-like build utility based on Lua" --license=LICENSE.md \ xmake=/usr/local/share/ \ - core/bin/demo.pkg/bin/macosx/$arch/demo.b=/usr/local/share/xmake/xmake \ + core/bin/demo.pkg/bin/$plat/$arch/demo.b=/usr/local/share/xmake/xmake \ /tmp/xmake.sh=/usr/local/bin/xmake |
