Bug 183369 - [maintainer-update] Add STAGE support for www/cgit
Summary: [maintainer-update] Add STAGE support for www/cgit
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: William Grzybowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-27 17:00 UTC by Kevin Zheng
Modified: 2013-10-27 20:50 UTC (History)
0 users

See Also:


Attachments
file.diff (1.67 KB, patch)
2013-10-27 17:00 UTC, Kevin Zheng
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Zheng 2013-10-27 17:00:00 UTC
Give www/cgit STAGE support. The empty directory in "/var/cache/cgit" is required, but I'm not sure that this patch deals with it properly.

Tested to work on Redports.

Fix: Apply the attached patch.

Patch attached with submission follows:
Comment 1 William Grzybowski freebsd_committer freebsd_triage 2013-10-27 17:02:53 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wg

I'll take it.
Comment 2 William Grzybowski freebsd_committer freebsd_triage 2013-10-27 20:39:58 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-10-27 20:40:04 UTC
Author: wg
Date: Sun Oct 27 20:39:56 2013
New Revision: 331804
URL: http://svnweb.freebsd.org/changeset/ports/331804

Log:
  devel/cgit: allow staging
  
  - Allow staging [1] (based on)
  - Add DOCS option
  - Remove useless options.mk
  
  PR:		ports/183369
  Submitted by:	Kevin Zheng <kevinz5000 gmail.com> (maintainer)

Modified:
  head/devel/cgit/Makefile
  head/devel/cgit/pkg-plist

Modified: head/devel/cgit/Makefile
==============================================================================
--- head/devel/cgit/Makefile	Sun Oct 27 20:27:20 2013	(r331803)
+++ head/devel/cgit/Makefile	Sun Oct 27 20:39:56 2013	(r331804)
@@ -29,8 +29,8 @@ SUB_FILES=	pkg-message
 SUB_LIST+=	PORTNAME=${PORTNAME}
 PLIST_SUB+=	PORTNAME=${PORTNAME} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
 
-NO_STAGE=	yes
-.include <bsd.port.options.mk>
+OPTIONS_DEFINE=	DOCS
+
 .include <bsd.port.pre.mk>
 
 post-extract:
@@ -50,12 +50,7 @@ post-patch:
 .endif
 
 post-install:
-	@${MKDIR} /var/cache/${PORTNAME}
-	@${CHOWN} ${WWWOWN}:${WWWGRP} /var/cache/${PORTNAME}
-	@${CAT} ${PKGMESSAGE}
-.if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}rc.5.txt ${DOCSDIR}/
-.endif
+	@${MKDIR} ${STAGEDIR}/${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}rc.5.txt ${STAGEDIR}/${DOCSDIR}/
 
 .include <bsd.port.post.mk>

Modified: head/devel/cgit/pkg-plist
==============================================================================
--- head/devel/cgit/pkg-plist	Sun Oct 27 20:27:20 2013	(r331803)
+++ head/devel/cgit/pkg-plist	Sun Oct 27 20:39:56 2013	(r331804)
@@ -1,8 +1,6 @@
 %%WWWDIR%%/cgit.cgi
 %%WWWDIR%%/cgit.css
 %%WWWDIR%%/cgit.png
-%%PORTDOCS%%%%DOCSDIR%%/cgitrc.5.txt
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
 lib/cgit/filters/about-formatting.sh
 lib/cgit/filters/commit-links.sh
 lib/cgit/filters/html-converters/man2html
@@ -13,6 +11,8 @@ lib/cgit/filters/html-converters/rst2htm
 lib/cgit/filters/html-converters/txt2html
 lib/cgit/filters/syntax-highlighting.py
 lib/cgit/filters/syntax-highlighting.sh
+%%PORTDOCS%%%%DOCSDIR%%/cgitrc.5.txt
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
 @dirrm lib/cgit/filters/html-converters/resources
 @dirrm lib/cgit/filters/html-converters
 @dirrm lib/cgit/filters
@@ -20,4 +20,3 @@ lib/cgit/filters/syntax-highlighting.sh
 @dirrm %%WWWDIR%%
 @exec mkdir -p /var/cache/%%PORTNAME%%
 @exec chown %%WWWOWN%%:%%WWWGRP%% /var/cache/%%PORTNAME%%
-@unexec rmdir /var/cache/%%PORTNAME%% 2>/dev/null || true
_______________________________________________
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"