DBD-PostgreSQLパッケージがなかったので、頑張った記録の巻

季節外れのSmalltalkをはじめました。(冷やし中華風)
と冗談はさておき、真剣に取り組みを開始しました。
いろいろと都合もあって、邪道と言われようと、GNU Smalltalkを使うことになりそうなので、
そちらを調査開始。
とりあえず、DBにアクセスできないと困るので、そのあたりで、DBIがよさげということで、
使おうとおもったら、エラーがでるので、なんでだ??とおもったら、DBD-PostgreSQL.starがないでやんの。。。

■環境
Scientific Linux 6.1(x86_64)
GNU Smalltalk 3.2.4(ソースコンパイル configureオプションなし)

でソースコンパイルでインストールすると、

/usr/local/share/smalltalk/

にstar(smalltalk archive)パッケージができるんだけど、確認すると。。。

ls /usr/local/share/smalltalk/

Announcements.star
BLOXBrowser.star
Blox.star
BloxGTK.star
CParser.star
Cairo.star
ClassPublisher.star
Compiler.star
Complex.star
Continuations.star
DBD-MySQL.star
DBD-SQLite.star
DBI.star
DebugTools.star
DhbNumericalMethods.star
Digest.star
GDBM.star
GNUPlot.star
GTK.star
Glorp.star
I18N.star
Iconv.star
Java.star
Magritte-Seaside.star
Magritte.star
NCurses.star
NetClients.star
OpenGL.star
Parser.star
ProfileTools.star
ROE.star
SUnit.star
SandstoneDb.star
Seaside-Core.star
Seaside-Development.star
Seaside-Examples.star
Seaside.star
Sockets.star
Sport.star
Swazoo.star
VFSAddOns.star
VisualGST.star
WebServer.star
XML-DOM.star
XML-Expat.star
XML-ParserTests.star
XML-PullParser.star
XML-SAXDriver.star
XML-SAXParser.star
XML-XMLNodeBuilder.star
XML-XMLParser.star
XPath.star
XSL.star
ZLib.star
examples
kernel
packages.xml
scripts
unsupported

と見事にありませぬ。。。ぐぬぬ。。。と調べてたら、「gst-package」なるものでPackageを作ると。。。
http://www.gnu.org/software/smalltalk/manual/html_node/Packages.html 参照

Usage:
    gst-package [OPTION]... ARGS...

Operation modes:
        --install               make or install STAR packages (default)
        --uninstall             remove the packages mentioned in the FILES
        --dist                  copy files instead of creating STAR files.
        --prepare               create configure.ac or Makefile.am
        --list-files PKG        just output the list of files in the package
        --list-packages         just output the list of packages in the files

        --download, --update    download package from smalltalk.gnu.org or
                                from its specified URL

	--help                  display this message and exit
	--version               print version information and exit

Common suboptions:
    -n, --dry-run               print commands without running them
	--srcdir DIR            look for non-built files in directory DIR
	--distdir DIR	        for --dist, place files in directory DIR
	--destdir DIR	        prefix the destination directory with DIR
        --target-directory DIR  install the files in DIR (unused for --dist)
    -I, --image-file=FILE       load into the specified image
        --kernel-dir=PATH       use the specified kernel directory
    -v, --verbose               print extra information while processing

--install suboptions:
	--test                  run unit tests after merging
	--load                  also load the Smalltalk files in the image

--list-files suboptions:
	--load                  only list files that are filed in when loading
	--test                  with --load, also include unit test files
	--vpath			Omit path to srcdir for files that are there

--dist suboptions:
        --all-files             Process all files, not just non-built ones
        --copy                  Do not create symbolic links

All operation modes except --download (or its synonym --update) accept
paths to package.xml files or .star files, including remote URLs.
--download and --update accept names of packages, which will be searched
in the current system or on smalltalk.gnu.org)
or URLs to package.xml or .star files.

Except in uninstall and list files mode, gst-package requires write
access to the GNU Smalltalk image directory, and merges the XML package
files on the command line with that file.

The default target directory is /usr/local/var/lib/smalltalk

とりあえず、元ソースの中のpackagesからDBD-PostgreSQLのpackage.xmlを適用してみる。

gst-package /root/smalltalk-3.2.4/packages/dbd-postgresql/package.xml 
mkdir /tmp/gstar-fydO0l
mkdir /tmp/gstar-fydO0l/DBD-PostgreSQL
ln -s -f /root/smalltalk-3.2.4/packages/dbd-postgresql/Connection.st /tmp/gstar-fydO0l/DBD-PostgreSQL/Connection.st
ln -s -f /root/smalltalk-3.2.4/packages/dbd-postgresql/ResultSet.st /tmp/gstar-fydO0l/DBD-PostgreSQL/ResultSet.st
ln -s -f /root/smalltalk-3.2.4/packages/dbd-postgresql/Row.st /tmp/gstar-fydO0l/DBD-PostgreSQL/Row.st
ln -s -f /root/smalltalk-3.2.4/packages/dbd-postgresql/ColumnInfo.st /tmp/gstar-fydO0l/DBD-PostgreSQL/ColumnInfo.st
ln -s -f /root/smalltalk-3.2.4/packages/dbd-postgresql/Table.st /tmp/gstar-fydO0l/DBD-PostgreSQL/Table.st
ln -s -f /root/smalltalk-3.2.4/packages/dbd-postgresql/TableColumnInfo.st /tmp/gstar-fydO0l/DBD-PostgreSQL/TableColumnInfo.st
ln -s -f /root/smalltalk-3.2.4/packages/dbd-postgresql/FieldConverter.st /tmp/gstar-fydO0l/DBD-PostgreSQL/FieldConverter.st
rm -f /usr/local/var/lib/smalltalk/DBD-PostgreSQL.star
cd /tmp/gstar-fydO0l/DBD-PostgreSQL && zip -n .st:.xml -qr /usr/local/var/lib/smalltalk/DBD-PostgreSQL.star .

最初、/usr/local/share/smalltalk/ 配下にDBD-PostgreSQL.starがなくて、えーー!!ってなったんだけど、

「gst-package --help に The default target directory is /usr/local/var/lib/smalltalk」と記載があって、
確かに、/usr/local/var/lib/smalltalk/ 配下にありました!!

ls /usr/local/var/lib/smalltalk/ 

DBD-PostgreSQL.star
gst.im

gst.imってなんぞや。。。