summaryrefslogtreecommitdiff
path: root/databases/wfb2sql
diff options
context:
space:
mode:
authorSean Chittenden <seanc@FreeBSD.org>2003-08-21 09:32:49 +0000
committerSean Chittenden <seanc@FreeBSD.org>2003-08-21 09:32:49 +0000
commit894d7971992f705a1710124ebfe6710ff77e0bac (patch)
tree320b768bbb7566a9c2ee4c99f13e6fb4d4dc1214 /databases/wfb2sql
parentunbreak databases/gauche-gdbm (diff)
Add nifty little script that parses the CIA's World Factbook and
converts it into SQL for PostgreSQL, DB2, or MySQL. Includes referential constraints for PostgreSQL and DB2. Useful for those wanting to populate a database with dummy data that isn't completely fake or people who make frequent use of the data.
Notes
Notes: svn path=/head/; revision=87438
Diffstat (limited to 'databases/wfb2sql')
-rw-r--r--databases/wfb2sql/Makefile39
-rw-r--r--databases/wfb2sql/distinfo1
-rw-r--r--databases/wfb2sql/pkg-descr8
-rw-r--r--databases/wfb2sql/pkg-message31
-rw-r--r--databases/wfb2sql/pkg-plist1
5 files changed, 80 insertions, 0 deletions
diff --git a/databases/wfb2sql/Makefile b/databases/wfb2sql/Makefile
new file mode 100644
index 000000000000..b70f56a3e3b3
--- /dev/null
+++ b/databases/wfb2sql/Makefile
@@ -0,0 +1,39 @@
+# New ports collection makefile for: wfb2sql
+# Date created: August 21st, 2003
+# Whom: Sean Chittenden <seanc@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= wfb2sql
+PORTVERSION= 0.5
+CATEGORIES= databases perl5
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
+
+MAINTAINER= seanc@FreeBSD.org
+COMMENT= CIA World Fact Book to SQL Conversion Utility
+
+BUILD_DEPENDS= ${SITE_PERL}/Getopt/Long.pm:${PORTSDIR}/devel/p5-Getopt-Long \
+ ${SITE_PERL}/Pod/Usage.pm:${PORTSDIR}/textproc/p5-PodParser \
+ ${SITE_PERL}/Config/General.pm:${PORTSDIR}/devel/p5-Config-General
+RUN_DEPENDS= ${BUILD_DEPENDS}
+
+NO_BUILD= YES
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/wfb2sql ${LOCALBASE}/bin/wfb2sql
+ @${ECHO} "bin/wfb2sql" >> ${TMPPLIST}
+
+ ${MKDIR} ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/wfb2sqlrc ${EXAMPLESDIR}/wfb2sqlrc
+ @${ECHO} "share/examples/${PORTNAME}/wfb2sqlrc" >> ${TMPPLIST}
+ @${ECHO} "@dirrm share/examples/${PORTNAME}" >> ${TMPPLIST}
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/wfb2sql.html ${DOCSDIR}
+ @${ECHO} "share/doc/${PORTNAME}/wfb2sql.html" >> ${TMPPLIST}
+ @${ECHO} "@dirrm share/doc/${PORTNAME}/" >> ${TMPPLIST}
+.endif
+
+.include <bsd.port.mk>
diff --git a/databases/wfb2sql/distinfo b/databases/wfb2sql/distinfo
new file mode 100644
index 000000000000..a4af80e91b67
--- /dev/null
+++ b/databases/wfb2sql/distinfo
@@ -0,0 +1 @@
+MD5 (wfb2sql-0.5.tar.gz) = 77b091bd8bd46d1a6dce8a4e780cbf30
diff --git a/databases/wfb2sql/pkg-descr b/databases/wfb2sql/pkg-descr
new file mode 100644
index 000000000000..925197da7157
--- /dev/null
+++ b/databases/wfb2sql/pkg-descr
@@ -0,0 +1,8 @@
+For those either needing a dummy PostgreSQL database full of real
+facts and data, or those who make frequent use of the CIA's World Fact
+Book, this is the port for you: wfb2sql converts the WFB into SQL
+inserts. Act now and get your copy of the WFB for free now! The
+WFB is a public domain document that may disappear as fast as you do
+after the black helicopters lock in on your location!!!!
+
+WWW: http://wfb2sql.sf.net/
diff --git a/databases/wfb2sql/pkg-message b/databases/wfb2sql/pkg-message
new file mode 100644
index 000000000000..e8116a170a95
--- /dev/null
+++ b/databases/wfb2sql/pkg-message
@@ -0,0 +1,31 @@
+Before being able to run wfb2sql, you need to obtain a copy of the
+CIA's World Fact Book. A copy of the WFB can be found here:
+
+*) http://www.cia.gov/cia/download.html
+
+The WFB's homepage can be found:
+
+*) http://www.cia.gov/cia/publications/factbook/
+
+Example usage:
+
+% wfb2sql --man
+% wfb2sql --database=postgresql --directory=$PWD/factbook | psql factbook
+
+NOTE: wfb2sql inserts data into the wfb schema!
+
+ ______________________________________
+ / BEWARE OF BLACK HELICOPTERS AFTER \
+ \ DOWNLOADING YOUR COPY OF THE WFB!!! /
+ --------------------------------------
+ \
+ \
+ .::!!!!!!!:.
+ .!!!!!:. .:!!!!!!!!!!!!
+ ~~~~!!!!!!. .:!!!!!!!!!UWWW$$$
+ :$$NWX!!: .:!!!!!!XUWW$$$$$$$$$P
+ $$$$$##WX!: .<!!!!UW$$$$" $$$$$$$$#
+ $$$$$ $$$UX :!!UW$$$$$$$$$ 4$$$$$*
+ ^$$$B $$$$\ $$$$$$$$$$$$ d$$R"
+ "*$bd$$$$ '*$$$$$$$$$$$o+#"
+ """" """""""
diff --git a/databases/wfb2sql/pkg-plist b/databases/wfb2sql/pkg-plist
new file mode 100644
index 000000000000..a164734b562c
--- /dev/null
+++ b/databases/wfb2sql/pkg-plist
@@ -0,0 +1 @@
+@comment Automatically generated plist