aboutsummaryrefslogtreecommitdiff
path: root/games/glest/files
diff options
context:
space:
mode:
authorJose Alonso Cardenas Marquez <acm@FreeBSD.org>2007-09-06 01:29:03 +0000
committerJose Alonso Cardenas Marquez <acm@FreeBSD.org>2007-09-06 01:29:03 +0000
commit565266d4808723401340b255d9b1d637833c9f14 (patch)
tree9e18e42d82838215284d973c8dec678a82948034 /games/glest/files
parentb6be0df0df4da2b494d26fc2feae1fd3a7b623f5 (diff)
downloadports-565266d4808723401340b255d9b1d637833c9f14.tar.gz
ports-565266d4808723401340b255d9b1d637833c9f14.zip
Notes
Diffstat (limited to 'games/glest/files')
-rw-r--r--games/glest/files/glest-wrapper.in24
-rw-r--r--games/glest/files/pkg-message.in10
2 files changed, 32 insertions, 2 deletions
diff --git a/games/glest/files/glest-wrapper.in b/games/glest/files/glest-wrapper.in
index aba5d39bc502..964fcb7a808d 100644
--- a/games/glest/files/glest-wrapper.in
+++ b/games/glest/files/glest-wrapper.in
@@ -1,4 +1,24 @@
#!/bin/sh
-cd %%PREFIX%%/lib/glest || exit 1
-exec ./glest "$@"
+# The executable needs to be run from its data directory, and needs to store
+# configuration in it. We therefore mirror the data directory hierarchy in
+# ~/.glest, and create symlinks to the data files.
+
+if [ -d ~/.glest ]
+then
+ echo "Using existing ~/.glest directory."
+else
+ echo "Creating ~/.glest directory."
+ cd %%DATADIR%% || exit 1
+ find * -type d -exec mkdir -p ~/.glest/{} \;
+ find * -type f -exec ln -s %%DATADIR%%/{} ~/.glest/{} \; 2>/dev/null
+ mkdir -p ~/.glest/screens
+ mkdir -p ~/.glest/shaders/standard
+ touch ~/.glest/glest.log
+ rm ~/.glest/glest.ini ~/.glest/configuration.xml ~/.glest/glest
+ cp -f %%DATADIR%%/configuration.xml ~/.glest/
+ cp -f %%DATADIR%%/glest.ini ~/.glest/
+fi
+
+cd ~/.glest || exit 1
+exec %%DATADIR%%/glest "$@"
diff --git a/games/glest/files/pkg-message.in b/games/glest/files/pkg-message.in
new file mode 100644
index 000000000000..6cda4f748b37
--- /dev/null
+++ b/games/glest/files/pkg-message.in
@@ -0,0 +1,10 @@
+###############################################################################
+
+The glest game was installed
+
+1) You can see the glest configuration files into your ~/.glest directory
+2) If you have problems to run glest, please you should remove your ~/glest
+ directory and try again
+3) Enjoy it ;)
+
+###############################################################################