Fri Aug 18 22:20:49 2023 UTC ()
Rework the www/viewvc package some:
Put the preferences under PKG_SYSCONFDIR
Pre-set pkgsrc-dependend viewvc.conf entries
Lose the MESSAGE, it was pointless
Install the docs
(hauke)
diff -r1.1 -r0 pkgsrc/www/viewvc/MESSAGE
diff -r1.43 -r1.44 pkgsrc/www/viewvc/Makefile
diff -r1.6 -r1.7 pkgsrc/www/viewvc/PLIST
diff -r1.22 -r1.23 pkgsrc/www/viewvc/distinfo
diff -r1.5 -r0 pkgsrc/www/viewvc/patches/patch-aa
diff -r1.5 -r0 pkgsrc/www/viewvc/patches/patch-ab
diff -r0 -r1.1 pkgsrc/www/viewvc/patches/patch-conf_viewvc.conf.dist
diff -r0 -r1.1 pkgsrc/www/viewvc/patches/patch-lib_viewvc.py
diff -r0 -r1.1 pkgsrc/www/viewvc/patches/patch-viewvc-install
Sat Aug 19 07:20:49 2023
Mon Jun 26 19:41:19 2023
pkgsrc/www/viewvc/MESSAGE,v
anoncvs not yet been updated
Sat Aug 19 07:20:49 2023
Mon Jun 26 19:41:19 2023
pkgsrc/www/viewvc/patches/patch-aa,v
anoncvs not yet been updated
Sat Aug 19 07:20:49 2023
Mon Jun 26 19:41:19 2023
pkgsrc/www/viewvc/patches/patch-ab,v
anoncvs not yet been updated
--- pkgsrc/www/viewvc/Makefile 2023/08/17 21:26:49 1.43
+++ pkgsrc/www/viewvc/Makefile 2023/08/18 22:20:49 1.44
| @@ -1,68 +1,85 @@ | | | @@ -1,68 +1,85 @@ |
1 | # $NetBSD: Makefile,v 1.43 2023/08/17 21:26:49 hauke Exp $ | | 1 | # $NetBSD: Makefile,v 1.44 2023/08/18 22:20:49 hauke Exp $ |
2 | | | 2 | |
3 | DISTNAME= viewvc-1.2.3 | | 3 | DISTNAME= viewvc-1.2.3 |
4 | PKGREVISION= 1 | | 4 | PKGREVISION= 2 |
5 | CATEGORIES= devel www | | 5 | CATEGORIES= devel www |
6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=viewvc/} | | 6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=viewvc/} |
7 | | | 7 | |
8 | MAINTAINER= pkgsrc-users@NetBSD.org | | 8 | MAINTAINER= pkgsrc-users@NetBSD.org |
9 | HOMEPAGE= http://www.viewvc.org/ | | 9 | HOMEPAGE= https://www.viewvc.org/ |
10 | COMMENT= Viewing the content of CVS/SVN repositories with a Webbrowser | | 10 | COMMENT= Viewing the content of CVS/SVN repositories with a Webbrowser |
11 | LICENSE= 2-clause-bsd | | 11 | LICENSE= 2-clause-bsd |
12 | | | 12 | |
13 | REPLACE_PYTHON= viewvc-install bin/* bin/cgi/*.cgi lib/*.py | | 13 | REPLACE_PYTHON= viewvc-install bin/* bin/cgi/*.cgi lib/*.py |
14 | # https://github.com/viewvc/viewvc/issues/138 | | 14 | # https://github.com/viewvc/viewvc/issues/138 |
15 | PYTHON_VERSIONS_ACCEPTED= 27 # not yet ported as of 1.1.27 | | 15 | PYTHON_VERSIONS_ACCEPTED= 27 # not yet ported as of 1.2.3 |
16 | | | 16 | |
17 | .if !exists(/usr/bin/rlog) | | 17 | .if exists(/usr/bin/rlog) |
18 | DEPENDS+= rcs-[0-9]*:../../devel/rcs | | 18 | RCSPATH= /usr/bin |
19 | RCS_PKG= YES | | | |
20 | .else | | 19 | .else |
21 | RCS_PKG= NO | | 20 | DEPENDS+= rcs-[0-9]*:../../devel/rcs |
| | | 21 | RCSPATH= ${PREFIX}/bin |
22 | .endif | | 22 | .endif |
23 | | | 23 | |
24 | NO_BUILD= YES | | 24 | NO_BUILD= YES |
| | | 25 | |
| | | 26 | DOCDIR= share/doc/viewvc |
| | | 27 | EGDIR= share/examples/viewvc |
25 | VIEWVCDIR= share/viewvc | | 28 | VIEWVCDIR= share/viewvc |
26 | PLIST_SUBST+= VIEWVCDIR=${VIEWVCDIR:Q} | | | |
27 | | | 29 | |
28 | CONF_FILES= ${PREFIX}/share/examples/viewvc/viewvc.conf \ | | 30 | CFGFILES= cvsgraph.conf mimetypes.conf viewvc.conf |
29 | ${PREFIX}/${VIEWVCDIR:Q}/viewvc.conf | | 31 | DOCFILES= CHANGES INSTALL \ |
30 | CONF_FILES+= ${PREFIX}/share/examples/viewvc/cvsgraph.conf \ | | 32 | docs/template-authoring-guide.html \ |
31 | ${PREFIX}/${VIEWVCDIR:Q}/cvsgraph.conf | | 33 | docs/upgrading-howto.html \ |
| | | 34 | docs/url-reference.html |
| | | 35 | |
| | | 36 | PKG_SYSCONFSUBDIR= viewvc |
| | | 37 | |
| | | 38 | .for cfg in ${CFGFILES} |
| | | 39 | CONF_FILES+= ${EGDIR}/${cfg} ${PKG_SYSCONFDIR}/${cfg} |
| | | 40 | .endfor |
| | | 41 | |
| | | 42 | PLIST_SUBST+= VIEWVCDIR=${VIEWVCDIR:Q} |
| | | 43 | |
| | | 44 | PRINT_PLIST_AWK+= { gsub(/^${VIEWVCDIR:S|/|\\/|g}/, "$${VIEWVCDIR}"); } |
32 | | | 45 | |
33 | .include "options.mk" | | 46 | .include "options.mk" |
34 | | | 47 | |
| | | 48 | SUBST_CLASSES+= paths |
| | | 49 | SUBST_STAGE.paths= pre-configure |
| | | 50 | SUBST_MESSAGE.paths= Fixing pkgsrc paths. |
| | | 51 | SUBST_FILES.paths+= lib/viewvc.py |
| | | 52 | SUBST_FILES.paths+= viewvc-install |
| | | 53 | SUBST_VARS.paths= PREFIX PKG_SYSCONFDIR |
| | | 54 | |
| | | 55 | DIFF= ${TOOLS_PATH.diff} |
| | | 56 | |
35 | SUBST_CLASSES+= conf | | 57 | SUBST_CLASSES+= conf |
36 | SUBST_STAGE.conf= pre-configure | | 58 | SUBST_STAGE.conf= pre-configure |
37 | SUBST_MESSAGE.conf= Fixing configuration files. | | 59 | SUBST_MESSAGE.conf= Fixing configuration files. |
38 | SUBST_FILES.conf= conf/viewvc.conf.dist | | 60 | SUBST_FILES.conf= conf/viewvc.conf.dist |
39 | SUBST_VARS.conf= PREFIX PKG_SYSCONFDIR | | 61 | SUBST_VARS.conf= PREFIX PKG_SYSCONFBASE PKG_SYSCONFDIR |
40 | SUBST_VARS.conf+= VIEWVCDIR PHP_OPT CVSGRAPH_OPT | | 62 | SUBST_VARS.conf+= VIEWVCDIR DIFF RCSPATH CVSGRAPH_OPT |
41 | .if defined(RCS_PKG) && ${RCS_PKG} == "YES" | | | |
42 | SUBST_SED.conf+= -e "s|@RCS_PREFIX@|${PREFIX}|g" | | | |
43 | .else | | | |
44 | SUBST_SED.conf+= -e "s|@RCS_PREFIX@|/usr|g" | | | |
45 | .endif | | | |
46 | | | 63 | |
47 | CHECK_PORTABILITY_SKIP= tools/make-release | | 64 | CHECK_PORTABILITY_SKIP= tools/make-release |
48 | | | 65 | |
49 | INSTALLATION_DIRS= share/examples/viewvc | | 66 | INSTALLATION_DIRS= ${DOCDIR} ${EGDIR} |
50 | | | 67 | |
51 | do-install: | | 68 | do-install: |
52 | (cd ${WRKSRC} && \ | | 69 | (cd ${WRKSRC} && ${PYTHONBIN} viewvc-install \ |
53 | ${PYTHONBIN} \ | | 70 | --prefix=${PREFIX}/${VIEWVCDIR} --destdir=${DESTDIR}) |
54 | viewvc-install --prefix=${PREFIX}/${VIEWVCDIR} --destdir=${DESTDIR}) | | 71 | .for cfg in ${CFGFILES} |
55 | | | 72 | ${INSTALL_DATA} ${WRKSRC}/conf/${cfg}.dist \ |
56 | ${INSTALL_DATA} ${WRKSRC}/conf/viewvc.conf.dist \ | | 73 | ${DESTDIR}${PREFIX}/${EGDIR}/${cfg} |
57 | ${DESTDIR}${PREFIX}/share/examples/viewvc/viewvc.conf | | 74 | .endfor |
58 | ${INSTALL_DATA} ${WRKSRC}/conf/cvsgraph.conf.dist \ | | 75 | .for doc in ${DOCFILES} |
59 | ${DESTDIR}${PREFIX}/share/examples/viewvc/cvsgraph.conf | | 76 | ${INSTALL_DATA} ${WRKSRC}/${doc} \ |
| | | 77 | ${DESTDIR}${PREFIX}/${DOCDIR}/${doc:T} |
| | | 78 | .endfor |
60 | | | 79 | |
61 | post-install: | | 80 | post-install: |
62 | ${CHMOD} ${SHAREMODE} \ | | 81 | ( cd ${DESTDIR}/${PREFIX}/${VIEWVCDIR}/bin/mod_python ; \ |
63 | ${DESTDIR}/${PREFIX}/share/viewvc/bin/mod_python/.htaccess | | 82 | ${CHMOD} ${SHAREMODE} .htaccess *.py) |
64 | ${CHMOD} ${SHAREMODE} \ | | | |
65 | ${DESTDIR}/${PREFIX}/share/viewvc/bin/mod_python/*.py | | | |
66 | | | 83 | |
67 | .include "../../lang/python/application.mk" | | 84 | .include "../../lang/python/application.mk" |
68 | .include "../../mk/bsd.pkg.mk" | | 85 | .include "../../mk/bsd.pkg.mk" |
--- pkgsrc/www/viewvc/PLIST 2020/03/17 22:14:15 1.6
+++ pkgsrc/www/viewvc/PLIST 2023/08/18 22:20:49 1.7
| @@ -1,15 +1,21 @@ | | | @@ -1,15 +1,21 @@ |
1 | @comment $NetBSD: PLIST,v 1.6 2020/03/17 22:14:15 wiz Exp $ | | 1 | @comment $NetBSD: PLIST,v 1.7 2023/08/18 22:20:49 hauke Exp $ |
| | | 2 | share/doc/viewvc/CHANGES |
| | | 3 | share/doc/viewvc/INSTALL |
| | | 4 | share/doc/viewvc/template-authoring-guide.html |
| | | 5 | share/doc/viewvc/upgrading-howto.html |
| | | 6 | share/doc/viewvc/url-reference.html |
2 | share/examples/viewvc/cvsgraph.conf | | 7 | share/examples/viewvc/cvsgraph.conf |
| | | 8 | share/examples/viewvc/mimetypes.conf |
3 | share/examples/viewvc/viewvc.conf | | 9 | share/examples/viewvc/viewvc.conf |
4 | ${VIEWVCDIR}/bin/cgi/viewvc.cgi | | 10 | ${VIEWVCDIR}/bin/cgi/viewvc.cgi |
5 | ${VIEWVCDIR}/bin/cvsdbadmin | | 11 | ${VIEWVCDIR}/bin/cvsdbadmin |
6 | ${VIEWVCDIR}/bin/loginfo-handler | | 12 | ${VIEWVCDIR}/bin/loginfo-handler |
7 | ${VIEWVCDIR}/bin/make-database | | 13 | ${VIEWVCDIR}/bin/make-database |
8 | ${VIEWVCDIR}/bin/mod_python/.htaccess | | 14 | ${VIEWVCDIR}/bin/mod_python/.htaccess |
9 | ${VIEWVCDIR}/bin/mod_python/handler.py | | 15 | ${VIEWVCDIR}/bin/mod_python/handler.py |
10 | ${VIEWVCDIR}/bin/mod_python/viewvc.py | | 16 | ${VIEWVCDIR}/bin/mod_python/viewvc.py |
11 | ${VIEWVCDIR}/bin/standalone.py | | 17 | ${VIEWVCDIR}/bin/standalone.py |
12 | ${VIEWVCDIR}/bin/svndbadmin | | 18 | ${VIEWVCDIR}/bin/svndbadmin |
13 | ${VIEWVCDIR}/bin/wsgi/viewvc.fcgi | | 19 | ${VIEWVCDIR}/bin/wsgi/viewvc.fcgi |
14 | ${VIEWVCDIR}/bin/wsgi/viewvc.wsgi | | 20 | ${VIEWVCDIR}/bin/wsgi/viewvc.wsgi |
15 | ${VIEWVCDIR}/lib/accept.py | | 21 | ${VIEWVCDIR}/lib/accept.py |
--- pkgsrc/www/viewvc/distinfo 2023/08/17 21:26:49 1.22
+++ pkgsrc/www/viewvc/distinfo 2023/08/18 22:20:49 1.23
| @@ -1,7 +1,8 @@ | | | @@ -1,7 +1,8 @@ |
1 | $NetBSD: distinfo,v 1.22 2023/08/17 21:26:49 hauke Exp $ | | 1 | $NetBSD: distinfo,v 1.23 2023/08/18 22:20:49 hauke Exp $ |
2 | | | 2 | |
3 | BLAKE2s (viewvc-1.2.3.tar.gz) = 4efe844e1fedca51c40245d61c96e951b30db0fb9081e54230459a508be19144 | | 3 | BLAKE2s (viewvc-1.2.3.tar.gz) = 4efe844e1fedca51c40245d61c96e951b30db0fb9081e54230459a508be19144 |
4 | SHA512 (viewvc-1.2.3.tar.gz) = dd5fd1d01629e7e6894e3bd244579a3581883ffb18f66e4ca44b911a5bc41810fcdd1176bfdbf0b88c943780b61c1af2a35c4dd8d757b9e10ff00d560eee0a0f | | 4 | SHA512 (viewvc-1.2.3.tar.gz) = dd5fd1d01629e7e6894e3bd244579a3581883ffb18f66e4ca44b911a5bc41810fcdd1176bfdbf0b88c943780b61c1af2a35c4dd8d757b9e10ff00d560eee0a0f |
5 | Size (viewvc-1.2.3.tar.gz) = 361272 bytes | | 5 | Size (viewvc-1.2.3.tar.gz) = 361272 bytes |
6 | SHA1 (patch-aa) = ff0a6e52ea66c838ba3ab7b1d055c27bf561a376 | | 6 | SHA1 (patch-conf_viewvc.conf.dist) = 44d16cc79e02bac4639a61235b6685ab8c56c26d |
7 | SHA1 (patch-ab) = 5be3c5eb60e58341510a96c5a2cab230beec956e | | 7 | SHA1 (patch-lib_viewvc.py) = d6ba030b22b4284d36edec3f482394b97f30c19a |
| | | 8 | SHA1 (patch-viewvc-install) = e05fa7219d8a55b0359336b2f08cef20c4bf6cfa |
$NetBSD: patch-conf_viewvc.conf.dist,v 1.1 2023/08/18 22:20:49 hauke Exp $
Make paths adaptable for pkgsrc installation.
--- conf/viewvc.conf.dist.orig 2023-01-04 14:48:34.000000000 +0000
+++ conf/viewvc.conf.dist
@@ -218,7 +218,8 @@
## /etc/mime.types,
## /usr/local/apache2/conf/mime.types
##
-#mime_types_files = mimetypes.conf
+#mime_types_files = @PKG_SYSCONFDIR@/mimetypes.conf,
+# @PKG_SYSCONFBASE@/httpd/mime.types
## address: The address of the local repository maintainer. (This
## option is provided only as a convenience for ViewVC installations
@@ -312,7 +313,7 @@
## Example:
## rcs_dir = /usr/bin/
##
-#rcs_dir =
+rcs_dir = @RCSPATH@/
## cvsnt: Location of cvsnt program. ViewVC can use CVSNT (www.cvsnt.org)
## instead of the RCS utilities to retrieve information from CVS
@@ -334,7 +335,7 @@
## Example:
## diff = /usr/bin/diff
##
-#diff =
+diff = @DIFF@
## cvsgraph: Location of the CvsGraph program, a graphical CVS version
## graph generator (see options.use_cvsgraph).
@@ -342,7 +343,7 @@
## Example:
## cvsgraph = /usr/local/bin/cvsgraph
##
-#cvsgraph =
+cvsgraph = @PREFIX@/bin/cvsgraph
##---------------------------------------------------------------------------
@@ -662,7 +663,7 @@
## template_dir = templates/default
## template_dir = /opt/custom-viewvc-templates/templates
#
-#template_dir = templates/default
+template_dir = @PREFIX@/@VIEWVCDIR@/templates/default
## docroot: Web path to a directory that contains ViewVC static files
## (stylesheets, images, etc.) If set, static files will get
@@ -753,13 +754,13 @@
## use_cvsgraph: Use CvsGraph to offer visual graphs of CVS revision history.
##
-#use_cvsgraph = 0
+use_cvsgraph = @CVSGRAPH_OPT@
## cvsgraph_conf: Location of the customized cvsgraph configuration file.
## May be specified as an absolute path or as a path relative to this
## configuration file.
##
-#cvsgraph_conf = cvsgraph.conf
+cvsgraph_conf = @PKG_SYSCONFDIR@/cvsgraph.conf
## allowed_cvsgraph_useropts: A list of settings used for cvsgraph's
## user-modifiable behavior which can be changed in the graph display.
$NetBSD: patch-lib_viewvc.py,v 1.1 2023/08/18 22:20:49 hauke Exp $
Look for config file under PKG_SYSCONFDIR
--- lib/viewvc.py.orig 2023-01-04 14:48:34.000000000 +0000
+++ lib/viewvc.py
@@ -5158,6 +5158,7 @@ def load_config(pathname=None, server=No
# default.
pathname = (env_pathname
or pathname
+ or "@PKG_SYSCONFDIR@/viewvc.conf"
or os.path.join(os.path.dirname(os.path.dirname(__file__)),
"viewvc.conf"))
$NetBSD: patch-viewvc-install,v 1.1 2023/08/18 22:20:49 hauke Exp $
Let pkgsrc machinery take care of config files
--- viewvc-install.orig 2023-01-04 14:48:34.000000000 +0000
+++ viewvc-install
@@ -56,12 +56,6 @@ FILE_INFO_LIST = [
("bin/cvsdbadmin", "bin/cvsdbadmin", 0755, 1, 0, 0),
("bin/svndbadmin", "bin/svndbadmin", 0755, 1, 0, 0),
("bin/make-database", "bin/make-database", 0755, 1, 0, 0),
- ("conf/viewvc.conf.dist", "viewvc.conf.dist", 0644, 0, 0, 0),
- ("conf/viewvc.conf.dist", "viewvc.conf", 0644, 0, 1, 0),
- ("conf/cvsgraph.conf.dist", "cvsgraph.conf.dist", 0644, 0, 0, 0),
- ("conf/cvsgraph.conf.dist", "cvsgraph.conf", 0644, 0, 1, 0),
- ("conf/mimetypes.conf.dist", "mimetypes.conf.dist", 0644, 0, 0, 0),
- ("conf/mimetypes.conf.dist", "mimetypes.conf", 0644, 0, 1, 0),
]
if sys.platform == "win32":
FILE_INFO_LIST.extend([
@@ -128,7 +122,7 @@ def replace_paths(contents):
shbang = '#!' + sys.executable
contents = re.sub('^#![^\n]*', _escape(shbang), contents)
contents = replace_var(contents, 'LIBRARY_DIR', 'lib')
- contents = replace_var(contents, 'CONF_PATHNAME', 'viewvc.conf')
+ contents = replace_var(contents, 'CONF_PATHNAME', '@PKG_SYSCONFDIR@/viewvc.conf')
return contents