implement bin install for non debian linux

This commit is contained in:
SANO Masatoshi 2021-05-15 19:15:26 +09:00
parent 3b81b80ddb
commit 4964e70ad4
2 changed files with 11 additions and 8 deletions

View file

@ -133,7 +133,7 @@ pack:
$(MKDIR_P) $(PACK)/lisp
cp $(LISPS:%=lisp/%) $(PACK)/lisp
$(MKDIR_P) $(PACK)/patch
cp $(roslisppatch_DATA) $(PACK)/patch
cp $(dist_roslisppatch_DATA) $(PACK)/patch
$(MKDIR_P) $(PACK)/man
cp $(MDS:%.md=documents/man/%.1) $(PACK)/man
echo "prefix = /usr/local" > $(PACK)/Makefile
@ -143,7 +143,7 @@ pack:
echo " mkdir -p $$""(prefix)/etc/roswell/patch" >> $(PACK)/Makefile
echo " install -c bin/ros$(EXEEXT) $$""(prefix)/bin" >> $(PACK)/Makefile
echo " install -c -m 644 $(LISPS:%=lisp/%) $$""(prefix)/etc/roswell" >> $(PACK)/Makefile
echo " install -c -m 644 $(roslisppatch_DATA) $$""(prefix)/etc/roswell/patch" >> $(PACK)/Makefile
echo " install -c -m 644 $(dist_roslisppatch_DATA) $$""(prefix)/etc/roswell/patch" >> $(PACK)/Makefile
echo "" >> $(PACK)/Makefile
echo "uninstall:" >> $(PACK)/Makefile
echo " rm -rf $$""(prefix)/etc/roswell" >> $(PACK)/Makefile

View file

@ -137,13 +137,16 @@ install_roswell_bin () {
cp /tmp/roswell/ros.exe $ROSWELL_INSTALL_DIR/bin
cp -r /tmp/roswell/lisp $ROSWELL_INSTALL_DIR/bin/lisp
fi
elif uname -s |grep Linux >/dev/null && uname -m |grep x86_64 >/dev/null && which dpkg >/dev/null; then
if ! [ -w "$ROSWELL_INSTALL_DIR" ]; then
if [ $ROSWELL_BRANCH = release ]; then
fetch "https://github.com/roswell/roswell/releases/download/v$ROSWELL_RELEASE_VERSION/roswell_$ROSWELL_RELEASE_VERSION-1_amd64.deb" /tmp/roswell.deb
elif uname -s |grep Linux >/dev/null && uname -m |grep x86_64 >/dev/null; then
if [ "$ROSWELL_INSTALL_DIR" = "/usr/local" ]; then
FILE=roswell_static-$ROSWELL_RELEASE_VERSION-`uname -s`-`uname -m`
if [ $ROSWELL_BRANCH = release ]; then
fetch "https://github.com/roswell/roswell/releases/download/v$ROSWELL_RELEASE_VERSION/$FILE.tar.bz2" /tmp/$FILE.tar.bz2
fi
if [ -f /tmp/roswell.deb ]; then
$SUDO dpkg -i /tmp/roswell.deb
if [ -f /tmp/$FILE.tar.bz2 ]; then
extract -j /tmp/$FILE.tar.bz2 /tmp/roswell;make -C /tmp/roswell install
rm -rf /tmp/$FILE.tar.bz2
rm -rf /tmp/roswell
fi
fi
elif [ `uname` = "FreeBSD" ]; then