Module submission - pysol

duncan.gibson@xs4all.nl duncan.gibson at xs4all.nl
Fri Jun 1 23:53:27 CEST 2007


module name       : pysol
suggested section : games
update (y/n)      : y
bugfix (y/n)      : n
security (y/n)    : n

Updated from 4.81 to 4.82.  Updated broken download URLs.
Changed installation to download and use Python source instead
of pre-compiled binary that was coupled to Python-2.4 and hence
out of date, and for which no clear build instructions existed.

Pysol is no longer maintained, but the original author responded
to a request for help by saying to avoid the binary version and
use the source, just as Debian and G*ntoo have done.

Duncan / engelsman

-------------- next part --------------
--- pysol/BUILD	2006-10-23 00:28:49.000000000 +0200
+++ pysol/BUILD	2007-06-01 22:31:10.000000000 +0200
@@ -1,11 +1,10 @@
 (
 
   cp $SCRIPT_DIRECTORY/Makefile $SOURCE_DIRECTORY &&
-  cp $SOURCE_CACHE/$SOURCE2 $SOURCE_DIRECTORY &&
-  bunzip2 $SOURCE2 &&
+
+  (cd $SOURCE_DIRECTORY/src; sh $SCRIPT_DIRECTORY/pysol_kludge.sh) &&
 
   prepare_install                    &&
-  make    install                    &&
-  install pysol_24.pyc /usr/share/games/pysol/4.81/
+  make    install
 
 ) > $C_FIFO 2>&1
--- pysol/DETAILS	2006-10-23 00:28:49.000000000 +0200
+++ pysol/DETAILS	2007-06-01 23:07:32.000000000 +0200
@@ -1,12 +1,14 @@
           MODULE=pysol
          VERSION=4.82
           SOURCE=$MODULE-$VERSION.tar.bz2
-         SOURCE2=pysol_24.pyc.bz2
+         SOURCE2=$MODULE-$VERSION-src.tar.bz2
+#        SOURCE3=$MODULE-compile.sh
       SOURCE_URL=http://www.gophernet.org/pysol/
-     SOURCE2_URL=http://download.lunar-linux.org/lunar/mirrors/
-        WEB_SITE=http://www.oberhumer.com/opensource/pysol
+     SOURCE2_URL=http://www.gophernet.org/pysol/
+#    SOURCE3_URL=http://www.gophernet.org/projects/
+        WEB_SITE=http://www.oberhumer.com/opensource/pysol/
          ENTERED=20020318
-         UPDATED=20031005
+         UPDATED=20070529
            SHORT="Large collection of card games."
 cat << EOF
 
--- pysol/Makefile	2006-10-23 00:28:49.000000000 +0200
+++ pysol/Makefile	2007-06-01 22:28:21.000000000 +0200
@@ -5,7 +5,7 @@
 SHELL = /bin/sh
 
 PACKAGE = pysol
-VERSION = 4.81
+VERSION = 4.82
 
 srcdir = .
 top_srcdir = $(srcdir)
@@ -33,8 +33,8 @@
 install: install-bin install-data install-man install-icon
 
 install-bin: pysol
-	mkdir -p $(bindir)
-	sed -e 's|@prefix@|$(prefix)|' -e 's|@pkgdatadir@|$(pkgdatadir)|' < $< > $(bindir)/pysol
+	echo cd $(pkgdatadir)/src > $(bindir)/pysol
+	echo python pysol.py '$*' >> $(bindir)/pysol
 	chmod a+rx,go-w $(bindir)/pysol
 
 install-data:
@@ -42,6 +42,7 @@
 	mkdir -p $(pkgdatadir)
 	cp -dR -p data/* $(pkgdatadir)/
 	chmod -R a+r $(pkgdatadir)
+	cp -R -p src $(pkgdatadir)
 
 install-man: pysol.6
 	mkdir -p $(mandir)/man6
--- pysol/PRE_BUILD	1970-01-01 01:00:00.000000000 +0100
+++ pysol/PRE_BUILD	2007-05-30 22:47:54.000000000 +0200
@@ -0,0 +1,4 @@
+
+mk_source_dir $SOURCE_DIRECTORY		&&
+unpack $SOURCE				&&
+unpack $SOURCE2
--- pysol/pysol_kludge.sh	1970-01-01 01:00:00.000000000 +0100
+++ pysol/pysol_kludge.sh	2007-06-01 22:39:50.000000000 +0200
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# once upon a time there was a pysol_compile.sh file available for download
+# from http://www.gophernet.org/projects/pysol_compile.sh, and this tweaked
+# the source files and created a single compiled python file that could be
+# used instead of installing the sources properly.
+#
+# this script attempts to do even less. tweak the source files as needed.
+
+# make failure to load the soundserver non-fatal
+# whitespace is important!
+sed '/^import pysolsoundserver/s/.*/try:\
+    import pysolsoundserver\
+except ImportError:\
+    pysolsoundserver = None/' < pysolaudio.py > pysolaudio.py.tmp
+mv pysolaudio.py.tmp pysolaudio.py
+
+# make sure it doesn't try to load the non-existant freecellsolver
+sed '/^class FreeCellSolverWrapper:/s/.*/pysolfreecellsolver = None\
+&/' < hint.py > hint.py.tmp
+mv hint.py.tmp hint.py
+
+# I've tweaked the Makefile to install the sources and to create an even
+# more # minimal pysol calling script than the original...
-------------- next part --------------
lvu submit pysol 2a2ed0e1479c8b8e1be8c449720aadf0  -
2.6.21.3 2.6.12 gcc-4.1.2 glibc-2.3.6


More information about the Lunar mailing list