Bug 187798 - [maintainer update] mail/sgwi port cleanup and add staging
Summary: [maintainer update] mail/sgwi port cleanup and add staging
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Rene Ladan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-20 21:00 UTC by Lukasz Wasikowski
Modified: 2014-04-06 16:20 UTC (History)
0 users

See Also:


Attachments
file.diff (6.17 KB, patch)
2014-03-20 21:00 UTC, Lukasz Wasikowski
no flags Details | Diff
sgwi-1.1.6-staging.diff (5.79 KB, patch)
2014-03-20 21:13 UTC, Lukasz Wasikowski
no flags Details | Diff
sgwi-1.1.6-staging.diff (5.79 KB, patch)
2014-03-20 21:16 UTC, Lukasz Wasikowski
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lukasz Wasikowski 2014-03-20 21:00:00 UTC
Port cleanup:

- add stage support
- add second mirror to MASTER_SITES
- rename files/patch-.htaccess to files/patch-.htaccess.sample
- rename files/patch-.htpasswd to files/patch-.htpasswd.sample

Fix: Patch attached with submission follows:
Comment 1 Lukasz Wasikowski 2014-03-20 21:13:36 UTC
Original patch included some unnecessary comments which can (and should)
be removed. Proper patch is attached to this message.

-- 
best regards,
Lukasz Wasikowski
Comment 2 Lukasz Wasikowski 2014-03-20 21:16:10 UTC
Original patch included some unnecessary comments which can (and should)
be removed. Proper patch is attached to this message.

-- 
best regards,
Lukasz Wasikowski
Comment 3 Rene Ladan freebsd_committer freebsd_triage 2014-04-06 16:14:33 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rene

Take
Comment 4 dfilter service freebsd_committer freebsd_triage 2014-04-06 16:15:56 UTC
Author: rene
Date: Sun Apr  6 15:15:52 2014
New Revision: 350365
URL: http://svnweb.freebsd.org/changeset/ports/350365
QAT: https://qat.redports.org/buildarchive/r350365/

Log:
  - Stage support
  - Add a second MASTER_SITE
  - Suffix patch and resulting files for .htaccess and .htpasswd with ".sample"
  
  PR:		ports/187798
  Submitted by:	Lukasz Wasikowski <lukasz@wasikowski.net> (maintainer)

Added:
  head/mail/sgwi/files/patch-.htaccess.sample   (contents, props changed)
  head/mail/sgwi/files/patch-.htpasswd.sample   (contents, props changed)
Deleted:
  head/mail/sgwi/files/patch-.htaccess
  head/mail/sgwi/files/patch-.htpasswd
Modified:
  head/mail/sgwi/Makefile
  head/mail/sgwi/files/pkg-install.in
  head/mail/sgwi/pkg-plist

Modified: head/mail/sgwi/Makefile
==============================================================================
--- head/mail/sgwi/Makefile	Sun Apr  6 15:11:09 2014	(r350364)
+++ head/mail/sgwi/Makefile	Sun Apr  6 15:15:52 2014	(r350365)
@@ -4,7 +4,8 @@
 PORTNAME=	sgwi
 PORTVERSION=	1.1.6
 CATEGORIES=	mail www
-MASTER_SITES=	http://www.vanheusden.com/sgwi/
+MASTER_SITES=	http://www.vanheusden.com/sgwi/ \
+		http://lukasz.wasikowski.net/files/
 DISTNAME=	sqlgreywebinterface-${PORTVERSION}
 EXTRACT_SUFX=	.tgz
 
@@ -25,7 +26,6 @@ PGSQL_DESC=	PostgreSQL back-end (use pgs
 
 OPTIONS_DEFAULT=MYSQL
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MMYSQL}
@@ -42,31 +42,14 @@ post-patch:
 		${FIND} ${WRKSRC} -name '*.orig' -delete
 
 do-install:
-		@[ ! -f ${WRKSRC}/.htpasswd ] || ${MV} ${WRKSRC}/.htpasswd ${WRKSRC}/.htpasswd.sample
-		@[ ! -f ${WRKSRC}/.htaccess ] || ${MV} ${WRKSRC}/.htaccess ${WRKSRC}/.htaccess.sample
-		@[ ! -f ${WRKSRC}/includes/config.inc.php ] || ${MV} ${WRKSRC}/includes/config.inc.php ${WRKSRC}/includes/config.inc.php.sample
-		@${MKDIR} ${WWWDIR}
-		@${MKDIR} ${WWWDIR}/includes
-		${INSTALL_DATA} ${WRKSRC}/*.php ${WWWDIR}
-		${INSTALL_DATA} ${WRKSRC}/*.txt ${WWWDIR}
-		${INSTALL_DATA} ${WRKSRC}/*.css ${WWWDIR}
-		${INSTALL_DATA} ${WRKSRC}/.ht* ${WWWDIR}
-		${INSTALL_DATA} ${WRKSRC}/includes/*.sample ${WWWDIR}/includes/
-		${INSTALL_DATA} ${WRKSRC}/includes/*.php ${WWWDIR}/includes/
-		@if [ -f ${WWWDIR}/config.inc.php ]; then \
-			${MV} ${WWWDIR}/config.inc.php ${WWWDIR}/includes/config.inc.php; \
-		fi
-		@[ -f ${WWWDIR}/includes/config.inc.php ] || \
-			${CP} ${WWWDIR}/includes/config.inc.php.sample ${WWWDIR}/includes/config.inc.php
-		@[ -f ${WWWDIR}/.htpasswd ] || \
-			${CP} ${WWWDIR}/.htpasswd.sample ${WWWDIR}/.htpasswd
-		@[ -f ${WWWDIR}/.htaccess ] || \
-			${CP} ${WWWDIR}/.htaccess.sample ${WWWDIR}/.htaccess
-
-post-install:
-		@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}/
-		@${CHOWN} root ${WWWDIR}/.ht* ${WWWDIR}/includes/config.inc.php*
-		@${CHMOD} -R 0640 ${WWWDIR}/*.php ${WWWDIR}/*.txt ${WWWDIR}/*.css ${WWWDIR}/.ht* ${WWWDIR}/includes/*.php ${WWWDIR}/includes/*.sample
-		@${CAT} ${PKGMESSAGE}
+		@${MV} ${WRKSRC}/includes/config.inc.php ${WRKSRC}/includes/config.inc.php.sample
+		@${MKDIR} ${STAGEDIR}${WWWDIR}
+		@${MKDIR} ${STAGEDIR}${WWWDIR}/includes
+		${INSTALL_DATA} ${WRKSRC}/*.php ${STAGEDIR}${WWWDIR}
+		${INSTALL_DATA} ${WRKSRC}/*.txt ${STAGEDIR}${WWWDIR}
+		${INSTALL_DATA} ${WRKSRC}/*.css ${STAGEDIR}${WWWDIR}
+		${INSTALL_DATA} ${WRKSRC}/.ht* ${STAGEDIR}${WWWDIR}
+		${INSTALL_DATA} ${WRKSRC}/includes/*.sample ${STAGEDIR}${WWWDIR}/includes/
+		${INSTALL_DATA} ${WRKSRC}/includes/*.php ${STAGEDIR}${WWWDIR}/includes/
 
 .include <bsd.port.mk>

Added: head/mail/sgwi/files/patch-.htaccess.sample
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/sgwi/files/patch-.htaccess.sample	Sun Apr  6 15:15:52 2014	(r350365)
@@ -0,0 +1,11 @@
+--- /dev/null	2008-03-11 22:05:01.000000000 +0100
++++ .htaccess.sample	2008-03-11 22:03:36.000000000 +0100
+@@ -0,0 +1,8 @@
++AuthUserFile /usr/local/www/sgwi/.htpasswd
++AuthGroupFile /dev/null
++AuthName "sgwi Admin"
++AuthType Basic
++
++<limit GET POST>
++require valid-user
++</limit>

Added: head/mail/sgwi/files/patch-.htpasswd.sample
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/sgwi/files/patch-.htpasswd.sample	Sun Apr  6 15:15:52 2014	(r350365)
@@ -0,0 +1,4 @@
+--- /dev/null	2008-03-11 22:05:01.000000000 +0100
++++ .htpasswd.sample	2008-03-11 22:02:21.000000000 +0100
+@@ -0,0 +1 @@
++admin:1Cm2R1zl5.LII

Modified: head/mail/sgwi/files/pkg-install.in
==============================================================================
--- head/mail/sgwi/files/pkg-install.in	Sun Apr  6 15:11:09 2014	(r350364)
+++ head/mail/sgwi/files/pkg-install.in	Sun Apr  6 15:15:52 2014	(r350365)
@@ -7,6 +7,7 @@ WWWGRP=%%WWWGRP%%
 if [ "$2" != "POST-INSTALL" ]; then
 	exit 0
 else
-	/usr/sbin/chown ${WWWOWN}:${WWWGRP} ${WWWDIR}/includes/
-	/usr/bin/chgrp ${WWWGRP} ${WWWDIR}/.ht* ${WWWDIR}/includes/config.inc.php
+	/usr/sbin/chown -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
+	/usr/sbin/chown root:${WWWGRP} ${WWWDIR}/.ht* ${WWWDIR}/includes/config.inc.php*
+	/bin/chmod -R 0640 ${STAGEDIR}${WWWDIR}/*.php ${STAGEDIR}${WWWDIR}/*.txt ${STAGEDIR}${WWWDIR}/*.css ${STAGEDIR}${WWWDIR}/.ht* ${STAGEDIR}${WWWDIR}/includes/*.php ${STAGEDIR}${WWWDIR}/includes/*.sample
 fi

Modified: head/mail/sgwi/pkg-plist
==============================================================================
--- head/mail/sgwi/pkg-plist	Sun Apr  6 15:11:09 2014	(r350364)
+++ head/mail/sgwi/pkg-plist	Sun Apr  6 15:15:52 2014	(r350365)
@@ -7,6 +7,7 @@ www/sgwi/.htpasswd.sample
 www/sgwi/awl.php
 www/sgwi/connect.php
 www/sgwi/includes/awl.inc.php
+@exec [ -f %D/www/sgwi/config.inc.php ] && mv -f %D/www/sgwi/config.inc.php %D/www/sgwi/includes/config.inc.php
 @unexec if cmp -s %D/www/sgwi/includes/config.inc.php %D/www/sgwi/includes/config.inc.php.sample; then rm -f %D/www/sgwi/includes/config.inc.php; fi
 www/sgwi/includes/config.inc.php.sample
 @exec [ -f %B/config.inc.php ] || cp %B/%f %B/config.inc.php
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Rene Ladan freebsd_committer freebsd_triage 2014-04-06 16:16:41 UTC
State Changed
From-To: open->closed

Committed, thanks