aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt
diff options
context:
space:
mode:
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/portscout/Makefile78
-rw-r--r--ports-mgmt/portscout/distinfo9
-rw-r--r--ports-mgmt/portscout/pkg-descr8
-rw-r--r--ports-mgmt/portscout/pkg-plist21
4 files changed, 71 insertions, 45 deletions
diff --git a/ports-mgmt/portscout/Makefile b/ports-mgmt/portscout/Makefile
index e4faa2292b50..174771f72eee 100644
--- a/ports-mgmt/portscout/Makefile
+++ b/ports-mgmt/portscout/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= portscout
-PORTVERSION= 0.7.4
-PORTREVISION= 2
+PORTVERSION= 0.8
CATEGORIES= ports-mgmt
MASTER_SITES= http://mirror.inerd.com/FreeBSD/distfiles/${PORTNAME}/ \
http://www.atarininja.org/~wxs/distfiles/ \
@@ -16,66 +15,68 @@ MASTER_SITES= http://mirror.inerd.com/FreeBSD/distfiles/${PORTNAME}/ \
MAINTAINER= shaun@FreeBSD.org
COMMENT= A tool to scan for new versions of FreeBSD ports
+OPTIONS= SQLITE3 "Use SQLite backend instead of PostgreSQL" off
+
NO_BUILD= yes
USE_PERL5= yes
-PORTDOCS= README
+PORTDOCS= UPDATING portscout-portconfig.txt xml-datasrc-example.xml
-PATCHFILES= portscout-0.7.4-fixsql.diff
-PATCH_SITES= ${MASTER_SITES}
+MAN1= portscout.1
RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI \
${SITE_PERL}/Proc/Queue.pm:${PORTSDIR}/devel/p5-Proc-Queue \
${SITE_PERL}/Net/FTP.pm:${PORTSDIR}/net/p5-Net \
+ ${SITE_PERL}/URI.pm:${PORTSDIR}/net/p5-URI \
+ ${SITE_PERL}/XML/XPath.pm:${PORTSDIR}/textproc/p5-XML-XPath \
${SITE_PERL}/MIME/Lite.pm:${PORTSDIR}/mail/p5-MIME-Lite \
${SITE_PERL}/LWP.pm:${PORTSDIR}/www/p5-libwww
-.if defined(WITH_MYSQL) || defined(WITH_SQLITE3)
-WITHOUT_PGSQL= true
-BROKEN= MySQL/SQLite3 is not supported yet; portscout will not work with it
-.endif
-
-.if !defined(WITHOUT_PGSQL)
-USE_PGSQL= yes
-RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/Pg.pm:${PORTSDIR}/databases/p5-DBD-Pg
-.elif defined(WITH_MYSQL)
-USE_MYSQL= yes
-RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql${MYSQL_VER:S/323//}
-EXTRA_PATCHES+= ${WRKSRC}/patches/mysql.diff
-.elif defined(WITH_SQLITE3)
+.if defined(WITH_SQLITE3)
USE_SQLITE= 3
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/SQLite.pm:${PORTSDIR}/databases/p5-DBD-SQLite
-EXTRA_PATCHES+= ${WRKSRC}/patches/sqlite3.diff
+.elif !defined(WITHOUT_PGSQL)
+USE_PGSQL= yes
+RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/Pg.pm:${PORTSDIR}/databases/p5-DBD-Pg
.endif
pre-everything::
-.if defined(WITH_MYSQL) || defined(WITH_SQLITE3)
+.if defined(WITH_SQLITE3)
@${ECHO_MSG} "+-------------------------------------------------------------+"
- @${ECHO_MSG} "| Warning! portscout has only been tested with PostgreSQL. |"
- @${ECHO_MSG} "| The author makes no guarantee that anything else will work, |"
- @${ECHO_MSG} "| but always welcomes success/bug reports, and/or patches. |"
+ @${ECHO_MSG} "| Warning! although SQLite is supported, portscout will only |"
+ @${ECHO_MSG} "| operate in non-forking mode with this database backend. It |"
+ @${ECHO_MSG} "| is therefore recommended only for use with light workloads. |"
@${ECHO_MSG} "+-------------------------------------------------------------+"
.endif
post-patch:
-.if defined(WITH_MYSQL)
- @${REINPLACE_CMD} 's/DBI:Pg/DBI:mysql/g' ${WRKSRC}/portscout.conf
-.elif defined(WITH_SQLITE3)
- @${REINPLACE_CMD} 's/DBI:Pg/DBI:SQLite/g' ${WRKSRC}/portscout.conf
+.if defined(WITH_SQLITE3)
+ @${REINPLACE_CMD} 's/^\([^#]*DBI:Pg.*\)$$/#\1/g' ${WRKSRC}/portscout.conf
+ @${REINPLACE_CMD} 's/^#\(.*DBI:SQLite.*\)$$/\1/g' ${WRKSRC}/portscout.conf
.endif
@${REINPLACE_CMD} -e "s#^\(templates .*\)/etc#\1/share#" \
-e "s#^prefix\( *= *\).*#prefix\1${PREFIX}#" \
${WRKSRC}/portscout.conf
@${REINPLACE_CMD} -e "s#^\(.*PREFIX.*=> *\)'.*'#\1'${PREFIX}'#" \
- ${WRKSRC}/portscout.pl
- @${REINPLACE_CMD} -e "s#portscout\.pl#portscout#" \
- ${WRKSRC}/README
+ ${WRKSRC}/Portscout/Const.pm
+ @${MV} ${WRKSRC}/docs/*.* ${WRKSRC}
do-install:
@${MKDIR} ${SITE_PERL}/Portscout
- ${INSTALL_SCRIPT} ${WRKSRC}/portscout.pl ${PREFIX}/bin/portscout
+ @${MKDIR} ${SITE_PERL}/Portscout/DataSrc
+ @${MKDIR} ${SITE_PERL}/Portscout/SiteHandler
+ @${MKDIR} ${SITE_PERL}/Portscout/SQL
+ ${INSTALL_SCRIPT} ${WRKSRC}/Portscout/*.pm ${SITE_PERL}/Portscout/
+ ${INSTALL_SCRIPT} ${WRKSRC}/Portscout/DataSrc/*.pm ${SITE_PERL}/Portscout/DataSrc/
+ ${INSTALL_SCRIPT} ${WRKSRC}/Portscout/SiteHandler/*.pm ${SITE_PERL}/Portscout/SiteHandler/
+ ${INSTALL_SCRIPT} ${WRKSRC}/Portscout/SQL/*.pm ${SITE_PERL}/Portscout/SQL/
${INSTALL_SCRIPT} ${WRKSRC}/Portscout.pm ${SITE_PERL}/Portscout.pm
- ${INSTALL_SCRIPT} ${WRKSRC}/Portscout/Template.pm ${SITE_PERL}/Portscout
+ ${INSTALL_SCRIPT} ${WRKSRC}/portscout.pl ${PREFIX}/bin/portscout
+
+ ${INSTALL_DATA} ${WRKSRC}/portscout.pod ${SITE_PERL}
+
+ pod2man ${WRKSRC}/portscout.pod ${WRKSRC}/portscout.1
+ ${INSTALL_MAN} ${WRKSRC}/portscout.1 ${MAN1PREFIX}/man/man1/
@${MKDIR} ${DATADIR}/templates
cd ${WRKSRC}/templates \
@@ -92,7 +93,18 @@ post-install:
fi
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${DOCSDIR}
+. for f in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+. endfor
+.endif
+
+test:
+ ${PERL} ${WRKSRC}/t/00-use.t
+ ${PERL} ${WRKSRC}/t/01-vercompare.t
+.if defined(WITH_SQLITE3)
+ ${PERL} ${WRKSRC}/t/10-sqlite.t
+#.else
+# ${PERL} ${WRKSRC}/10-postgresql.t
.endif
.include <bsd.port.mk>
diff --git a/ports-mgmt/portscout/distinfo b/ports-mgmt/portscout/distinfo
index 8ae4766a7313..e282857cf80a 100644
--- a/ports-mgmt/portscout/distinfo
+++ b/ports-mgmt/portscout/distinfo
@@ -1,6 +1,3 @@
-MD5 (portscout-0.7.4.tar.gz) = 57c26a9e823960a26d78d3912f876f3c
-SHA256 (portscout-0.7.4.tar.gz) = 2cc9a6dc79d27e33bfa60cd62f4d9a5fb4879d4f9442aac243fdf27cfdc98427
-SIZE (portscout-0.7.4.tar.gz) = 31717
-MD5 (portscout-0.7.4-fixsql.diff) = f1026d77fdc0d299e25e472ded6ebd4b
-SHA256 (portscout-0.7.4-fixsql.diff) = c3e0395953b96579dda79e9b9a0d3a942f18bbbb633fe48d3461945f919c26ce
-SIZE (portscout-0.7.4-fixsql.diff) = 647
+MD5 (portscout-0.8.tar.gz) = 1e770ad9f577d1c9061ca0f1f45b803a
+SHA256 (portscout-0.8.tar.gz) = a8ac91132e038691418448bf8984cf113eb759ad772ff9bdb1a9ac6f0b4342d3
+SIZE (portscout-0.8.tar.gz) = 52847
diff --git a/ports-mgmt/portscout/pkg-descr b/ports-mgmt/portscout/pkg-descr
index 9df9a5e9312b..fd322551511c 100644
--- a/ports-mgmt/portscout/pkg-descr
+++ b/ports-mgmt/portscout/pkg-descr
@@ -1,5 +1,7 @@
portscout is a tool which looks for new versions of software in the
-FreeBSD ports tree, and potentially other software repositories.
+FreeBSD ports tree, and potentially other software repositories. It
+is also possible to provide an arbitrary list of software in a simple
+XML format.
Various factors make this task a bit more difficult than it might
initially seem. In particular, the array of weird and wonderful
@@ -13,8 +15,4 @@ with the CPU-heavy rapidly-expanding FreeBSD ports system.
In addition to all this, it is possible to generate nice HTML reports
and send reminder mails to interested parties.
-Regularly updated results can be found at:
- http://beta.inerd.com/portscout/
-
-
WWW: http://www.inerd.com/software/portscout/
diff --git a/ports-mgmt/portscout/pkg-plist b/ports-mgmt/portscout/pkg-plist
index 80f164858227..5a33672ff8f4 100644
--- a/ports-mgmt/portscout/pkg-plist
+++ b/ports-mgmt/portscout/pkg-plist
@@ -6,13 +6,32 @@ etc/portscout.conf.sample
%%DATADIR%%/templates/maintainer.html
%%DATADIR%%/templates/reminder.mail
%%DATADIR%%/templates/restricted-ports.html
-%%DATADIR%%/sql/mysql_init.sql
%%DATADIR%%/sql/pgsql_init.sql
%%DATADIR%%/sql/pgsql_destroy.sql
%%DATADIR%%/sql/pgsql_upgrade_0.7.1_to_0.7.2.sql
%%DATADIR%%/sql/pgsql_upgrade_0.7.3_to_0.7.4.sql
+%%DATADIR%%/sql/pgsql_upgrade_0.7.4_to_0.8.sql
+%%DATADIR%%/sql/sqlite_init.sql
+%%DATADIR%%/sql/sqlite_destroy.sql
+%%SITE_PERL%%/Portscout/SQL/SQLite.pm
+%%SITE_PERL%%/Portscout/SQL/Pg.pm
+%%SITE_PERL%%/Portscout/SiteHandler/SourceForge.pm
+%%SITE_PERL%%/Portscout/DataSrc/Ports.pm
+%%SITE_PERL%%/Portscout/DataSrc/XML.pm
+%%SITE_PERL%%/Portscout/SiteHandler.pm
+%%SITE_PERL%%/Portscout/SQL.pm
+%%SITE_PERL%%/Portscout/Make.pm
+%%SITE_PERL%%/Portscout/Const.pm
+%%SITE_PERL%%/Portscout/DataSrc.pm
%%SITE_PERL%%/Portscout/Template.pm
+%%SITE_PERL%%/Portscout/Util.pm
+%%SITE_PERL%%/Portscout/API.pm
+%%SITE_PERL%%/Portscout/Config.pm
%%SITE_PERL%%/Portscout.pm
+%%SITE_PERL%%/portscout.pod
+@dirrm %%SITE_PERL%%/Portscout/SQL
+@dirrm %%SITE_PERL%%/Portscout/SiteHandler
+@dirrm %%SITE_PERL%%/Portscout/DataSrc
@dirrm %%SITE_PERL%%/Portscout
@dirrm %%DATADIR%%/templates
@dirrm %%DATADIR%%/sql