Changes in scripts (added Makefile), changed make_pkg

git-svn-id: https://callirhoe.googlecode.com/svn/branches/phantome@223 81c8bb96-aa45-f2e2-0eef-c4fa4a15c6df
This commit is contained in:
ph4ntome@gmail.com 2014-11-06 11:45:50 +00:00
parent 6d6977b9df
commit b50ae0a592
2 changed files with 13 additions and 13 deletions

10
scripts/Makefile Normal file
View File

@ -0,0 +1,10 @@
DESTDIR=/usr
install: install-package
install-package:
mkdir -p $(DESTDIR)/bin
mkdir -p $(DESTDIR)/share/callirhoe/holidays
install -m755 callirhoe $(DESTDIR)/bin/callirhoe
install -m755 calmagick $(DESTDIR)/bin/calmagick
install -m644 holidays/* $(DESTDIR)/share/callirhoe/holidays/

View File

@ -31,24 +31,14 @@ create_calmagick_package() {
DIR=`mktemp -d -t callirhoe.XXX`
tar c lib/{__init__,geom}.py | tar x -C "$DIR"
cp calmagick.py "$DIR/__main__.py"
make_python_zip calmagick "$DIR"
}
create_makefile() {
cat << END > Makefile
install:
install -Dm755 callirhoe \$(DESTDIR)/bin/callirhoe
install -Dm755 calmagick \$(DESTDIR)/bin/calmagick
END
find holidays/* -printf "\tinstall -Dm644 %p \$(DESTDIR)/share/callirhoe/%p\n" >> Makefile
}
set -e
cp Makefile ../
cd ..
create_callirhoe_package
create_calmagick_package
[[ "`uname`" != "Darwin" ]] && create_makefile