summaryrefslogtreecommitdiff
path: root/www/rnews
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-09-14 10:19:15 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-09-14 10:19:15 +0000
commit7ff9f19c75dd52d7135cd1c809225220cf5bed08 (patch)
treeb090c3930750ce57eefe8d405d98a2bd56838550 /www/rnews
parentBackout previous commit, since bsd.port.mk rev. 1.584 has been reverted. (diff)
- Update to 0.80
- Pass maintainership to submitter Submitted by: Aron Schlesinger (as@bsdgroup.de) via irc
Notes
Notes: svn path=/head/; revision=199481
Diffstat (limited to 'www/rnews')
-rw-r--r--www/rnews/Makefile88
-rw-r--r--www/rnews/distinfo6
-rw-r--r--www/rnews/files/patch-inc-db.php11
-rw-r--r--www/rnews/files/pkg-message.in21
-rw-r--r--www/rnews/pkg-message17
-rw-r--r--www/rnews/pkg-plist95
6 files changed, 141 insertions, 97 deletions
diff --git a/www/rnews/Makefile b/www/rnews/Makefile
index e450ec68e309..285240f08bb7 100644
--- a/www/rnews/Makefile
+++ b/www/rnews/Makefile
@@ -6,49 +6,75 @@
#
PORTNAME= rnews
-PORTVERSION= 0.72
+PORTVERSION= 0.80
CATEGORIES= www
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
-MASTER_SITE_SUBDIR= ${PORTNAME}
+MASTER_SITES= SF
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= as@bsdgroup.de
COMMENT= A server-side rss aggregator written in php with mysql
-USE_PHP= yes
+NO_BUILD= yes
-USE_MYSQL= yes
+WWWDIR?= ${PREFIX}/www/${PORTNAME}
-NO_BUILD= yes
-MYPORTDOCS= CHANGELOG INSTALL LICENSE README magpierss/AUTHORS \
- magpierss/CHANGES magpierss/ChangeLog magpierss/INSTALL \
- magpierss/NEWS magpierss/README magpierss/TROUBLESHOOTING
+SUB_FILES= pkg-message
+
+OPTIONS= GD "Enable Graphic (GD) support" ON \
+ MYSQLSERVER "Use MySQL-Server on localhost" OFF
.include <bsd.port.pre.mk>
-post-patch:
- @${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
+USE_PHP= mysql mbstring pcre xml iconv
+USE_MYSQL= yes
+IGNORE_WITH_MYSQL= 323 40
+
+.if !defined(WITHOUT_GD)
+USE_PHP+= gd
+.endif
+
+.if !defined(WITHOUT_MYSQLSERVER)
+RUN_DEPENDS+= ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql${MYSQL_VER}-server
+.endif
+
+.if !defined(NOPORTDOCS)
+PORTDOCS= CHANGELOG INSTALL README UPGRADE
+.endif
do-install:
- @${MKDIR} ${PREFIX}/www/rnews
+ @${FIND} -s ${WRKSRC} -type d | ${SED} -e 's,^${WRKSRC},${WWWDIR},' \
+ | ${XARGS} ${MKDIR}
+ ${INSTALL_DATA} -v ${WRKSRC}/*.php ${WWWDIR}
+ ${INSTALL_DATA} ${WRKSRC}/rnews-side.css ${WWWDIR}
+ ${INSTALL_DATA} ${WRKSRC}/ajax.js ${WWWDIR}
+ ${INSTALL_DATA} ${WRKSRC}/.htaccess ${WWWDIR}
+ ${INSTALL_DATA} -v ${WRKSRC}/img/*.gif ${WWWDIR}/img
+ ${INSTALL_DATA} ${WRKSRC}/img/xml.png ${WWWDIR}/img
+ ( ${FIND} ${WRKSRC}/inc -name '*.php' -not -name config_user.php; ${ECHO} ${WWWDIR}/inc ) \
+ | ${XARGS} ${INSTALL_DATA} -v
+ ${INSTALL_DATA} ${WRKSRC}/inc/.htaccess ${WWWDIR}/inc
+ ${INSTALL_DATA} -v ${WRKSRC}/magpierss/*.inc ${WWWDIR}/magpierss
+ ${INSTALL_DATA} ${WRKSRC}/magpierss/extlib/Snoopy.class.inc ${WWWDIR}/magpierss/extlib
+ @${CHOWN} ${WWWOWN} ${WWWDIR}/magpierss/cache
+ @${CHOWN} ${WWWOWN} ${WWWDIR}/img/feeds
+.if !exists(${WWWDIR}/inc/config_user.php)
+ @${TOUCH} ${WWWDIR}/inc/config_user.php
+ @${CHOWN} ${WWWOWN} ${WWWDIR}/inc/config_user.php
+.endif
.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}/magpierss
-. for FILE in ${MYPORTDOCS}
- @${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}/${FILE}
-. endfor
+ ${MKDIR} ${DOCSDIR}
+. for FILE in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
+. endfor
.endif
- ${MKDIR} ${PREFIX}/www/rnews
- ${MKDIR} ${PREFIX}/www/rnews/magpierss-0.5.2
- cd ${PREFIX}/www/rnews && ${LN} -s magpierss-0.5.2 magpierss
- ${MKDIR} ${PREFIX}/www/rnews/magpierss/cache
- ${INSTALL_DATA} -v ${WRKSRC}/*.png ${PREFIX}/www/rnews
- ${INSTALL_DATA} -v ${WRKSRC}/*.php ${PREFIX}/www/rnews
- ${INSTALL_DATA} -v ${WRKSRC}/*.inc ${PREFIX}/www/rnews
- ${INSTALL_DATA} -v ${WRKSRC}/magpierss/*.inc ${PREFIX}/www/rnews/magpierss
- ${INSTALL_DATA} -v ${WRKSRC}/magpierss/cookbook ${PREFIX}/www/rnews/magpierss
- ${CP} -Rv ${WRKSRC}/magpierss/extlib ${PREFIX}/www/rnews/magpierss
- ${CP} -Rv ${WRKSRC}/magpierss/htdocs ${PREFIX}/www/rnews/magpierss
- ${CP} -Rv ${WRKSRC}/magpierss/scripts ${PREFIX}/www/rnews/magpierss
- @${CHOWN} ${WWWOWN}:${WWWGRP} ${PREFIX}/www/rnews/magpierss/cache
- @${SED} "s,%%PREFIX%%,${PREFIX},g" ${PKGMESSAGE}
+ @${CAT} ${PKGMESSAGE}
+
+create-plist:
+ @${FIND} -s ${WRKSRC} \( -name "*.php" -o -name "*.inc" -o -name "*.js" -o -name "*.css" \
+ -o -name "*.gif" -o -name "*.png" -o -name ".htaccess" \) -and -not -name config_user.php \
+ | ${SED} -e 's,^${WRKSRC},%%WWWDIR%%,' > ${PLIST}
+ @${ECHO_CMD} '@exec ${TOUCH} %D/%%WWWDIR%%/inc/config_user.php;${CHOWN} ${WWWOWN} %D/%%WWWDIR%%/inc/config_user.php' >> ${PLIST}
+ @${ECHO_CMD} '@unexec if [ ! -s %D/%%WWWDIR%%/inc/config_user.php ];then ${RM} -f %D/%%WWWDIR%%/inc/config_user.php;fi' >> ${PLIST}
+ @${FIND} -ds ${WRKSRC} -type d \
+ | ${SED} -e 's,^${WRKSRC},@dirrm %%WWWDIR%%,' >> ${PLIST}
.include <bsd.port.post.mk>
diff --git a/www/rnews/distinfo b/www/rnews/distinfo
index 706392073990..ae565d69a24a 100644
--- a/www/rnews/distinfo
+++ b/www/rnews/distinfo
@@ -1,3 +1,3 @@
-MD5 (rnews-0.72.tar.gz) = d0e2613f3606ace49f8b57f2c7768f7b
-SHA256 (rnews-0.72.tar.gz) = b14d475ddd66b16a11fbca9418cb206c9421a62042f25938eb95917cbb3161a5
-SIZE (rnews-0.72.tar.gz) = 60534
+MD5 (rnews-0.80.tar.gz) = 9f29378bb4c7b38a27d9ab29f85fdbf3
+SHA256 (rnews-0.80.tar.gz) = dfc2fda9818b7bc5a83fc1372b98aafd8edf782b72e92282e1ca17e47655b435
+SIZE (rnews-0.80.tar.gz) = 64237
diff --git a/www/rnews/files/patch-inc-db.php b/www/rnews/files/patch-inc-db.php
new file mode 100644
index 000000000000..e24ed3473943
--- /dev/null
+++ b/www/rnews/files/patch-inc-db.php
@@ -0,0 +1,11 @@
+--- inc/db.php.orig Fri Sep 14 06:25:32 2007
++++ inc/db.php Fri Sep 14 06:36:13 2007
+@@ -50,7 +50,7 @@
+ if (mysql_select_db(DB_DATABASE)) {
+ $rc = TRUE;
+ } else {
+- $rc = mysql_create_db(DB_DATABASE);
++ $rc = mysql_query('CREATE DATABASE ' . DB_DATABASE);
+ }
+ mysql_close();
+ return $rc;
diff --git a/www/rnews/files/pkg-message.in b/www/rnews/files/pkg-message.in
new file mode 100644
index 000000000000..550a62486d6f
--- /dev/null
+++ b/www/rnews/files/pkg-message.in
@@ -0,0 +1,21 @@
+
+===============================================================
+Rnews has been installed into:
+
+ %%WWWDIR%%
+
+You will probably want to add an alias to your httpd.conf file,
+somethinglike this:
+
+ Alias /rnews "%%WWWDIR%%"
+
+and restart httpd.
+
+To finish the installation, open:
+ http://<hostname>/rnews/install.php
+
+update:
+ The DB schema has changed in several ways! For more
+ information see: %%DOCSDIR%%/UPGRADE
+===============================================================
+
diff --git a/www/rnews/pkg-message b/www/rnews/pkg-message
deleted file mode 100644
index 8b96ebd626df..000000000000
--- a/www/rnews/pkg-message
+++ /dev/null
@@ -1,17 +0,0 @@
-===============================================================
-Rnews is now installed. You may have to follow this steps to
-make it work correctly.
-
-1: edit rnews_config.php to suit your site's configuration
-2: create a database with the name you gave in rnews_config.inc
- $ mysql -u root
- mysql> CREATE DATABASE rnews_db;
- mysql> quit
-3: go to http://your.site/some/dir/rnews/
- by default, the DocumentRoot variable of your httpd.conf
- must be "%%PREFIX%%/www/"
-
-If the configuration was done correctly, and php is able to
-connect to the mysql server, you should be able to create a new
-account and start adding rss sources!
-===============================================================
diff --git a/www/rnews/pkg-plist b/www/rnews/pkg-plist
index eb6f2f63b623..e1990658b971 100644
--- a/www/rnews/pkg-plist
+++ b/www/rnews/pkg-plist
@@ -1,46 +1,49 @@
-%%DOCSDIR%%/CHANGELOG
-%%DOCSDIR%%/INSTALL
-%%DOCSDIR%%/LICENSE
-%%DOCSDIR%%/README
-%%DOCSDIR%%/magpierss/AUTHORS
-%%DOCSDIR%%/magpierss/CHANGES
-%%DOCSDIR%%/magpierss/ChangeLog
-%%DOCSDIR%%/magpierss/INSTALL
-%%DOCSDIR%%/magpierss/NEWS
-%%DOCSDIR%%/magpierss/README
-%%DOCSDIR%%/magpierss/TROUBLESHOOTING
-www/rnews/auth.php
-www/rnews/default_icon.png
-www/rnews/foot.php
-www/rnews/functions.inc
-www/rnews/head.php
-www/rnews/index.php
-www/rnews/magpierss
-www/rnews/magpierss-0.5.2/cookbook
-www/rnews/magpierss-0.5.2/extlib/Snoopy.class.inc
-www/rnews/magpierss-0.5.2/htdocs/cookbook.html
-www/rnews/magpierss-0.5.2/htdocs/index.html
-www/rnews/magpierss-0.5.2/rss_cache.inc
-www/rnews/magpierss-0.5.2/rss_fetch.inc
-www/rnews/magpierss-0.5.2/rss_parse.inc
-www/rnews/magpierss-0.5.2/rss_utils.inc
-www/rnews/magpierss-0.5.2/scripts/README
-www/rnews/magpierss-0.5.2/scripts/magpie_debug.php
-www/rnews/magpierss-0.5.2/scripts/magpie_simple.php
-www/rnews/magpierss-0.5.2/scripts/magpie_slashbox.php
-www/rnews/magpierss-0.5.2/scripts/simple_smarty.php
-www/rnews/magpierss-0.5.2/scripts/smarty_plugin/modifier.rss_date_parse.php
-www/rnews/magpierss-0.5.2/scripts/templates/simple.smarty
-www/rnews/prefs.php
-www/rnews/redirect.php
-www/rnews/rnews_config.php
-@dirrm www/rnews/magpierss-0.5.2/scripts/templates
-@dirrm www/rnews/magpierss-0.5.2/scripts/smarty_plugin
-@dirrm www/rnews/magpierss-0.5.2/scripts
-@dirrm www/rnews/magpierss-0.5.2/htdocs
-@dirrm www/rnews/magpierss-0.5.2/extlib
-@dirrm www/rnews/magpierss-0.5.2/cache
-@dirrm www/rnews/magpierss-0.5.2
-@dirrm www/rnews
-@dirrm %%DOCSDIR%%/magpierss
-@dirrm %%DOCSDIR%%
+%%WWWDIR%%/.htaccess
+%%WWWDIR%%/add.php
+%%WWWDIR%%/add_user.php
+%%WWWDIR%%/ajax.js
+%%WWWDIR%%/ajax.php
+%%WWWDIR%%/auth.php
+%%WWWDIR%%/export.php
+%%WWWDIR%%/foot.php
+%%WWWDIR%%/img/add.gif
+%%WWWDIR%%/img/edit.gif
+%%WWWDIR%%/img/info.gif
+%%WWWDIR%%/img/mark.gif
+%%WWWDIR%%/img/markall.gif
+%%WWWDIR%%/img/more.gif
+%%WWWDIR%%/img/update.gif
+%%WWWDIR%%/img/x.gif
+%%WWWDIR%%/img/xml.png
+%%WWWDIR%%/inc/.htaccess
+%%WWWDIR%%/inc/cat.php
+%%WWWDIR%%/inc/config.php
+%%WWWDIR%%/inc/db.php
+%%WWWDIR%%/inc/feed.php
+%%WWWDIR%%/inc/feedlink.php
+%%WWWDIR%%/inc/functions.php
+%%WWWDIR%%/inc/kses.php
+%%WWWDIR%%/inc/opml.php
+%%WWWDIR%%/inc/output.php
+%%WWWDIR%%/inc/rss.php
+%%WWWDIR%%/inc/security.php
+%%WWWDIR%%/inc/user.php
+%%WWWDIR%%/index.php
+%%WWWDIR%%/install.php
+%%WWWDIR%%/magpierss/extlib/Snoopy.class.inc
+%%WWWDIR%%/magpierss/rss_cache.inc
+%%WWWDIR%%/magpierss/rss_fetch.inc
+%%WWWDIR%%/magpierss/rss_parse.inc
+%%WWWDIR%%/magpierss/rss_utils.inc
+%%WWWDIR%%/prefs.php
+%%WWWDIR%%/redirect.php
+%%WWWDIR%%/rnews-side.css
+@exec /usr/bin/touch %D/%%WWWDIR%%/inc/config_user.php;/usr/sbin/chown www %D/%%WWWDIR%%/inc/config_user.php
+@unexec if [ ! -s %D/%%WWWDIR%%/inc/config_user.php ];then /bin/rm -f %D/%%WWWDIR%%/inc/config_user.php;fi
+@dirrm %%WWWDIR%%/img/feeds
+@dirrm %%WWWDIR%%/img
+@dirrm %%WWWDIR%%/inc
+@dirrm %%WWWDIR%%/magpierss/cache
+@dirrm %%WWWDIR%%/magpierss/extlib
+@dirrm %%WWWDIR%%/magpierss
+@dirrm %%WWWDIR%%