summaryrefslogtreecommitdiffstats
path: root/databases/wfb2sql
diff options
context:
space:
mode:
authorseanc <seanc@FreeBSD.org>2003-08-21 09:32:49 +0000
committerseanc <seanc@FreeBSD.org>2003-08-21 09:32:49 +0000
commit826601c6774398db09b3f0f4db0eb630b523f383 (patch)
treef22c12bb91bd401210b3a6d0bd05b5ffeccca612 /databases/wfb2sql
parent68e58b568d51a410650725078c5709474ab67265 (diff)
downloadFreeBSD-ports-826601c6774398db09b3f0f4db0eb630b523f383.zip
FreeBSD-ports-826601c6774398db09b3f0f4db0eb630b523f383.tar.gz
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.
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 0000000..b70f56a
--- /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 0000000..a4af80e
--- /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 0000000..925197d
--- /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 0000000..e8116a1
--- /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 0000000..a164734
--- /dev/null
+++ b/databases/wfb2sql/pkg-plist
@@ -0,0 +1 @@
+@comment Automatically generated plist
OpenPOWER on IntegriCloud