summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorruki <[email protected]>2017-03-29 22:17:34 +0800
committerruki <[email protected]>2017-03-29 22:17:57 +0800
commitaa17c1b4cae53dc686a551326291020ac793c2df (patch)
tree070952ae06dba85fed7a966d47874ea482b9308e /scripts
parenta51c06d23ad40e8a1c626ca0d56e65387fcca551 (diff)
add makedeb script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/makedeb29
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/makedeb b/scripts/makedeb
new file mode 100755
index 000000000..336ff25d1
--- /dev/null
+++ b/scripts/makedeb
@@ -0,0 +1,29 @@
+#!/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
+
+# 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/x86_64/demo.b=/usr/local/share/xmake/xmake \
+ /tmp/xmake.sh=/usr/local/bin/xmake
+
+