Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Sep 2007 12:38:16 +0200 (CEST)
From:      Guido Falsi <mad@madpilot.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/116708: New port: www/phprecipebook: Little web app to manage recipes
Message-ID:  <200709281038.l8SAcGbG057821@wedge.madpilot.net>
Resent-Message-ID: <200709281230.l8SCU2px094644@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         116708
>Category:       ports
>Synopsis:       New port: www/phprecipebook: Little web app to manage recipes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 28 12:30:02 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Guido Falsi
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
none
>Environment:
System: FreeBSD wedge.madpilot.net 6.2-STABLE FreeBSD 6.2-STABLE #38: Thu Jul 26 12:01:23 CEST 2007 root@wedge.madpilot.net:/usr/obj/usr/src/sys/WEDGE i386

>Description:

Created a little port for this php app. It's a recipe manager with access control and come shopping list functions.

I took the base port structure from the mediawiki port.

>How-To-Repeat:

>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	phprecipebook
#	phprecipebook/Makefile
#	phprecipebook/files
#	phprecipebook/files/patch-sql-recipedb.mysql
#	phprecipebook/distinfo
#	phprecipebook/pkg-descr
#	phprecipebook/pkg-message
#
echo c - phprecipebook
mkdir -p phprecipebook > /dev/null 2>&1
echo x - phprecipebook/Makefile
sed 's/^X//' >phprecipebook/Makefile << 'END-of-phprecipebook/Makefile'
X# New ports collection makefile for:   phprecipebook
X# Date created:        27 September 2007
X# Whom:                Guido Falsi <mad@madpilot.net>
X#
X# $FreeBSD$
X#
X
XPORTNAME=		phprecipebook
XPORTVERSION=		2.38
XCATEGORIES=		www deskutils
XMASTER_SITES=		${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	${PORTNAME}
X
XMAINTAINER=		mad@madpilot.net
XCOMMENT=		Small php webapp to manage your recipes
X
XNO_BUILD=		yes
XUSE_PHP=		xml
XWANT_PHP_WEB=		yes
XPHPRECIPEBOOKDIR?=	www/phprecipebook
X
XOPTIONS=		PGSQL "Use PostgreSQL instead of MySQL" off \
X
X.include <bsd.port.pre.mk>
X
X.if defined(WITH_PGSQL)
XUSE_PHP+=		pgsql
XUSE_PGSQL=		yes
X.else
XUSE_PHP+=		mysql
XUSE_MYSQL=		yes
X.endif
X
Xpost-extract:
X	@${CHMOD} -R u+w ${WRKSRC}
X
Xdo-install:
X	@${MKDIR} ${PREFIX}/${PHPRECIPEBOOKDIR}
X	@if [ -f ${WRKSRC}/custom_inc.php ]; then \
X		${MV} ${WRKSRC}/custom_inc.php ${WRKSRC}/custom_inc.php.sample ; \
X	fi
X	${CP} -r ${WRKSRC}/ ${PREFIX}/${PHPRECIPEBOOKDIR}
X	@if [ ! -f ${PREFIX}/${PHPRECIPEBOOKDIR}/custom_inc.php ]; then \
X		${CP} ${PREFIX}/${PHPRECIPEBOOKDIR}/custom_inc.php.sample ${PREFIX}/${PHPRECIPEBOOKDIR}/custom_inc.php ; \
X	fi
X	${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${PHPRECIPEBOOKDIR}
X
Xpost-install:
X	@${ECHO} "@unexec if cmp -s %D/${PHPRECIPEBOOKDIR}/custom_inc.php.sample %D/${PHPRECIPEBOOKDIR}/custom_inc.php; then rm -f %D/${PHPRECIPEBOOKDIR}/custom_inc.php; fi" >> ${TMPPLIST}
X	@${ECHO} "${PHPRECIPEBOOKDIR}/custom_inc.php.sample" >> ${TMPPLIST}
X	@${ECHO} "@exec if [ ! -f %D/${PHPRECIPEBOOKDIR}/custom_inc.php ] ; then cp -p %D/%F %B/custom_inc.php; fi" >> ${TMPPLIST}
X	@${ECHO} "@exec mkdir -p %D/${PHPRECIPEBOOKDIR}/modules/settings" >> ${TMPPLIST}
X	@${FIND} ${WRKSRC}/${file} -not -type d -not -name 'custom_inc.php*' \
X		| ${SED} -ne 's,^${WRKSRC},${PHPRECIPEBOOKDIR},p' >> ${TMPPLIST}
X	@${FIND} -d ${WRKSRC}/${file} -type d \
X		| ${SED} -ne 's,^${WRKSRC},@dirrm ${PHPRECIPEBOOKDIR},p' >> ${TMPPLIST}
X	@${SED} -e 's|%%PHPRECIPEBOOKDIR%%|${PREFIX}/${PHPRECIPEBOOKDIR}|' ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
END-of-phprecipebook/Makefile
echo c - phprecipebook/files
mkdir -p phprecipebook/files > /dev/null 2>&1
echo x - phprecipebook/files/patch-sql-recipedb.mysql
sed 's/^X//' >phprecipebook/files/patch-sql-recipedb.mysql << 'END-of-phprecipebook/files/patch-sql-recipedb.mysql'
X--- sql/recipedb.mysql.orig	2007-03-31 20:22:08.000000000 +0200
X+++ sql/recipedb.mysql	2007-09-27 17:10:02.000000000 +0200
X@@ -154,7 +154,7 @@
X 	PRIMARY KEY (meal_id));
X 
X CREATE TABLE recipe_mealplans (
X-	mplan_date DATE NOT NULL DEFAULT 'now()',
X+	mplan_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
X 	mplan_meal INT NOT NULL REFERENCES recipe_meals(meal_id) ON DELETE CASCADE,
X 	mplan_recipe INT NOT NULL REFERENCES recipe_recipes(recipe_id) ON DELETE CASCADE,
X 	mplan_servings INT NOT NULL DEFAULT 0,
X@@ -164,7 +164,7 @@
X CREATE TABLE recipe_reviews (
X 	review_recipe INT NOT NULL REFERENCES recipe_recipes(recipe_id) ON DELETE CASCADE,
X 	review_comments VARCHAR(255) NOT NULL,
X-	review_date TIMESTAMP DEFAULT 'now()',
X+	review_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
X 	review_owner VARCHAR(32) NOT NULL REFERENCES security_users(user_login) ON DELETE SET NULL ON UPDATE CASCADE,
X 	PRIMARY KEY (review_recipe,review_comments,review_owner));
X 
END-of-phprecipebook/files/patch-sql-recipedb.mysql
echo x - phprecipebook/distinfo
sed 's/^X//' >phprecipebook/distinfo << 'END-of-phprecipebook/distinfo'
XMD5 (phprecipebook-2.38.tar.gz) = 864ae8fb66213c2796fdd4b7a58a053d
XSHA256 (phprecipebook-2.38.tar.gz) = c05d53f849ef84a0b6690c6d20e3f703e215a7ef0a0b1990354ffe14bd34d2b3
XSIZE (phprecipebook-2.38.tar.gz) = 556970
END-of-phprecipebook/distinfo
echo x - phprecipebook/pkg-descr
sed 's/^X//' >phprecipebook/pkg-descr << 'END-of-phprecipebook/pkg-descr'
XThis projects purpose is to provide a convenient way to construct
Xa weekly shopping list from a known list of recipes. The user can
Xview, add, search and modify recipes like any decent web based
Xcookbook. This cookbook provides the extra functionality to add
Xrecipes to a shopping list. The shopping list then can be saved or
Xprinted out.
X
XWWW: http://phprecipebook.sourceforge.net/
END-of-phprecipebook/pkg-descr
echo x - phprecipebook/pkg-message
sed 's/^X//' >phprecipebook/pkg-message << 'END-of-phprecipebook/pkg-message'
X
X        **** NOTE ****
X
XPlease read:
X
X%%PHPRECIPEBOOKDIR%%/docs/INSTALL.UNIX
X
XIf you are upgrading then read this too:
X
X%%PHPRECIPEBOOKDIR%%/docs/UPGRADE.TXT
END-of-phprecipebook/pkg-message
exit

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709281038.l8SAcGbG057821>