aboutsummaryrefslogtreecommitdiff
path: root/www/phprecipebook
diff options
context:
space:
mode:
authorBeech Rintoul <beech@FreeBSD.org>2007-12-12 09:11:24 +0000
committerBeech Rintoul <beech@FreeBSD.org>2007-12-12 09:11:24 +0000
commit65a4605c65f58a4194fa0590bbf6f9975a85db13 (patch)
tree4b170207eab54db7b2187378dc9fe17660b67e8e /www/phprecipebook
parent6b6fb34f83331cdd32da5c54f0546e869597911a (diff)
downloadports-65a4605c65f58a4194fa0590bbf6f9975a85db13.tar.gz
ports-65a4605c65f58a4194fa0590bbf6f9975a85db13.zip
- New port phprecipebook-2.38
- Small php/webapp to manage recipes and generate shopping lists. PR: ports/116708 Submitted by: Guido Falsi <mad@madpilot.net> (maintainer) Approved by: linimon (mentor)
Notes
Notes: svn path=/head/; revision=203205
Diffstat (limited to 'www/phprecipebook')
-rw-r--r--www/phprecipebook/Makefile60
-rw-r--r--www/phprecipebook/distinfo3
-rw-r--r--www/phprecipebook/files/patch-sql-recipedb.mysql20
-rw-r--r--www/phprecipebook/files/pkg-message.in9
-rw-r--r--www/phprecipebook/pkg-descr8
5 files changed, 100 insertions, 0 deletions
diff --git a/www/phprecipebook/Makefile b/www/phprecipebook/Makefile
new file mode 100644
index 000000000000..05c20394da56
--- /dev/null
+++ b/www/phprecipebook/Makefile
@@ -0,0 +1,60 @@
+# New ports collection makefile for: phprecipebook
+# Date created: 27 September 2007
+# Whom: Guido Falsi <mad@madpilot.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= phprecipebook
+PORTVERSION= 2.38
+CATEGORIES= www deskutils
+MASTER_SITES= SF
+
+MAINTAINER= mad@madpilot.net
+COMMENT= Small php webapp to manage your recipes
+
+NO_BUILD= yes
+USE_PHP= xml
+WANT_PHP_WEB= yes
+RECIPEDIR?= www/phprecipebook
+SUB_FILES= pkg-message
+
+OPTIONS= PGSQL "Use PostgreSQL instead of MySQL" off \
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_PGSQL)
+USE_PHP+= pgsql
+USE_PGSQL= yes
+.else
+USE_PHP+= mysql
+USE_MYSQL= yes
+.endif
+
+post-extract:
+ @${CHMOD} -R u+w ${WRKSRC}
+
+do-install:
+ @${MV} ${WRKSRC}/custom_inc.php ${WRKSRC}/custom_inc.php.sample
+ @cd ${WRKSRC} && ${COPYTREE_SHARE} . ${PREFIX}/${RECIPEDIR}
+ @if [ ! -f ${PREFIX}/${RECIPEDIR}/custom_inc.php ]; then \
+ ${CP} ${PREFIX}/${RECIPEDIR}/custom_inc.php.sample \
+ ${PREFIX}/${RECIPEDIR}/custom_inc.php ; fi
+ @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${RECIPEDIR}
+
+post-install:
+ @${ECHO} "@unexec if cmp -s %D/${RECIPEDIR}/custom_inc.php.sample \
+ %D/${RECIPEDIR}/custom_inc.php; \
+ then rm -f %D/${RECIPEDIR}/custom_inc.php; fi" >> ${TMPPLIST}
+ @${ECHO} "${RECIPEDIR}/custom_inc.php.sample" >> ${TMPPLIST}
+ @${ECHO} "@exec if [ ! -f %D/${RECIPEDIR}/custom_inc.php ] ; \
+ then cp -p %D/%F %B/custom_inc.php; fi" >> ${TMPPLIST}
+ @${ECHO} "@exec mkdir -p %D/${RECIPEDIR}/modules/settings" >> ${TMPPLIST}
+ @${FIND} ${WRKSRC}/${file} -not -type d -not -name 'custom_inc.php*' \
+ | ${SED} -ne 's,^${WRKSRC},${RECIPEDIR},p' >> ${TMPPLIST}
+ @${FIND} -d ${WRKSRC}/${file} -type d \
+ | ${SED} -ne 's,^${WRKSRC},@dirrm ${RECIPEDIR},p' >> ${TMPPLIST}
+ @${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${RECIPEDIR}' >> ${TMPPLIST}
+ @${SED} -e 's|%%RECIPEDIR%%|${PREFIX}/${RECIPEDIR}|' ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/www/phprecipebook/distinfo b/www/phprecipebook/distinfo
new file mode 100644
index 000000000000..db206bc737be
--- /dev/null
+++ b/www/phprecipebook/distinfo
@@ -0,0 +1,3 @@
+MD5 (phprecipebook-2.38.tar.gz) = 864ae8fb66213c2796fdd4b7a58a053d
+SHA256 (phprecipebook-2.38.tar.gz) = c05d53f849ef84a0b6690c6d20e3f703e215a7ef0a0b1990354ffe14bd34d2b3
+SIZE (phprecipebook-2.38.tar.gz) = 556970
diff --git a/www/phprecipebook/files/patch-sql-recipedb.mysql b/www/phprecipebook/files/patch-sql-recipedb.mysql
new file mode 100644
index 000000000000..ed978aa1bd3c
--- /dev/null
+++ b/www/phprecipebook/files/patch-sql-recipedb.mysql
@@ -0,0 +1,20 @@
+--- sql/recipedb.mysql.orig 2007-03-31 20:22:08.000000000 +0200
++++ sql/recipedb.mysql 2007-09-27 17:10:02.000000000 +0200
+@@ -154,7 +154,7 @@
+ PRIMARY KEY (meal_id));
+
+ CREATE TABLE recipe_mealplans (
+- mplan_date DATE NOT NULL DEFAULT 'now()',
++ mplan_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+ mplan_meal INT NOT NULL REFERENCES recipe_meals(meal_id) ON DELETE CASCADE,
+ mplan_recipe INT NOT NULL REFERENCES recipe_recipes(recipe_id) ON DELETE CASCADE,
+ mplan_servings INT NOT NULL DEFAULT 0,
+@@ -164,7 +164,7 @@
+ CREATE TABLE recipe_reviews (
+ review_recipe INT NOT NULL REFERENCES recipe_recipes(recipe_id) ON DELETE CASCADE,
+ review_comments VARCHAR(255) NOT NULL,
+- review_date TIMESTAMP DEFAULT 'now()',
++ review_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+ review_owner VARCHAR(32) NOT NULL REFERENCES security_users(user_login) ON DELETE SET NULL ON UPDATE CASCADE,
+ PRIMARY KEY (review_recipe,review_comments,review_owner));
+
diff --git a/www/phprecipebook/files/pkg-message.in b/www/phprecipebook/files/pkg-message.in
new file mode 100644
index 000000000000..8d894eb100b8
--- /dev/null
+++ b/www/phprecipebook/files/pkg-message.in
@@ -0,0 +1,9 @@
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+Please read:
+
+%%RECIPEDIR%%/docs/INSTALL.UNIX
+
+If you are upgrading then read this too:
+
+%%RECIPEDIR%%/docs/UPGRADE.TXT
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
diff --git a/www/phprecipebook/pkg-descr b/www/phprecipebook/pkg-descr
new file mode 100644
index 000000000000..fbfd99568fb6
--- /dev/null
+++ b/www/phprecipebook/pkg-descr
@@ -0,0 +1,8 @@
+This projects purpose is to provide a convenient way to construct
+a weekly shopping list from a known list of recipes. The user can
+view, add, search and modify recipes like any decent web based
+cookbook. This cookbook provides the extra functionality to add
+recipes to a shopping list. The shopping list then can be saved or
+printed out.
+
+WWW: http://phprecipebook.sourceforge.net/