From 826601c6774398db09b3f0f4db0eb630b523f383 Mon Sep 17 00:00:00 2001 From: seanc Date: Thu, 21 Aug 2003 09:32:49 +0000 Subject: 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. --- databases/wfb2sql/Makefile | 39 +++++++++++++++++++++++++++++++++++++++ databases/wfb2sql/distinfo | 1 + databases/wfb2sql/pkg-descr | 8 ++++++++ databases/wfb2sql/pkg-message | 31 +++++++++++++++++++++++++++++++ databases/wfb2sql/pkg-plist | 1 + 5 files changed, 80 insertions(+) create mode 100644 databases/wfb2sql/Makefile create mode 100644 databases/wfb2sql/distinfo create mode 100644 databases/wfb2sql/pkg-descr create mode 100644 databases/wfb2sql/pkg-message create mode 100644 databases/wfb2sql/pkg-plist (limited to 'databases/wfb2sql') 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 +# +# $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 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!: .