mirror of
https://github.com/oDinZu/callirhoe.git
synced 2025-02-23 00:02:16 -05:00
proposed new version of scripts:
using mktemp for temp dir fixed deps for calmagick writing to stdout in make_resources_list git-svn-id: https://callirhoe.googlecode.com/svn/branches/phantome@200 81c8bb96-aa45-f2e2-0eef-c4fa4a15c6df
This commit is contained in:
parent
5370e100f7
commit
d7446bde8a
44
make_pkg.new
Executable file
44
make_pkg.new
Executable file
@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
make_archive() {
|
||||
base="$1"
|
||||
tempdir="$2"
|
||||
curdir=`pwd`
|
||||
cd $tempdir
|
||||
zip -q -r $curdir/$base.zip *
|
||||
cd $curdir
|
||||
rm -rf $tempdir
|
||||
echo '#!/usr/bin/env python2.7' | cat - $base.zip > $base
|
||||
chmod 755 $base
|
||||
rm -f $base.zip
|
||||
}
|
||||
|
||||
|
||||
# Create Callirhoe package
|
||||
DIR=`mktemp -d -t callirhoe`
|
||||
# TODO: do we need .pyc files? (my guess is yes, how do we force creation?)
|
||||
cp -R geom lang layouts lib style "$DIR"
|
||||
cp callirhoe.py "$DIR/__main__.py"
|
||||
./make_resources_list > "$DIR/lib/resources.py"
|
||||
|
||||
make_archive callirhoe "$DIR"
|
||||
|
||||
# Create Calmagick package
|
||||
DIR=`mktemp -d -t callirhoe`
|
||||
mkdir "$DIR/lib"
|
||||
cp lib/__init__.py lib/geom.py "$DIR/lib"
|
||||
cp calmagick.py "$DIR/__main__.py"
|
||||
|
||||
make_archive calmagick "$DIR"
|
||||
|
||||
# Create Makefile
|
||||
cat << END > Makefile
|
||||
prefix=/usr
|
||||
|
||||
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
|
11
make_resources_list.new
Executable file
11
make_resources_list.new
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python2.7
|
||||
import glob
|
||||
|
||||
res = dict()
|
||||
|
||||
for x in ['lang', 'style', 'layouts', 'geom']:
|
||||
res[x] = glob.glob('%s/*.py' % x)
|
||||
|
||||
print 'resource_list = {}'
|
||||
for x in res.keys():
|
||||
print 'resource_list["%s"] = %s' % (x, str(res[x]))
|
Loading…
x
Reference in New Issue
Block a user