Some tweaks for devel/cvsweb:

* The /icons directory is Apache-specific and will probably go away,
  so install CVSweb's icons under the document root.

* If you want to set up a chroot, manually running all those mkdir
  and cp commands is silly.  I have reformatted the README so that
  you can feed it directly to sh(1).  Also, the instructions/script
  are now correct for platforms where the kernel and application
  architecture have different names, e.g., macppc-powerpc.


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/cvsweb/Makefile,v
retrieving revision 1.46
diff -u -p -r1.46 Makefile
--- Makefile    7 Apr 2013 20:07:24 -0000       1.46
+++ Makefile    31 May 2013 21:28:07 -0000
@@ -1,9 +1,9 @@
 # $OpenBSD: Makefile,v 1.46 2013/04/07 20:07:24 naddy Exp $
 
-COMMENT=       WWW CGI script to browse CVS repository trees
+COMMENT=       CGI script to browse CVS repository trees
 
 DISTNAME=      cvsweb-2.0.6
-REVISION =     13
+REVISION =     14
 CATEGORIES=    devel www
 HOMEPAGE=      http://www.freebsd.org/projects/cvsweb.html
 
@@ -37,9 +37,9 @@ do-install:
 .for file in ${CONFFILES}
        ${INSTALL_DATA} ${WRKSRC}/${file} ${CONFDIR}/cvsweb/${file}.dist
 .endfor
-       ${INSTALL_DATA_DIR} ${PREFIX}/icons/cvsweb
+       ${INSTALL_DATA_DIR} ${PREFIX}/htdocs/icons/cvsweb
 .for file in ${ICONS}
-       ${INSTALL_DATA} ${WRKSRC}/icons/${file} ${PREFIX}/icons/cvsweb/${file}
+       ${INSTALL_DATA} ${WRKSRC}/icons/${file} ${PREFIX}/htdocs/icons/cvsweb/
 .endfor
 
 .include <bsd.port.mk>
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/cvsweb/pkg/PLIST,v
retrieving revision 1.6
diff -u -p -r1.6 PLIST
--- pkg/PLIST   13 Nov 2010 09:24:52 -0000      1.6
+++ pkg/PLIST   31 May 2013 21:28:07 -0000
@@ -7,12 +7,13 @@ conf/cvsweb/cvsweb.conf-openbsd.dist
 conf/cvsweb/cvsweb.conf-ruby.dist
 conf/cvsweb/cvsweb.conf.dist
 @sample ${CONFDIR}/cvsweb/cvsweb.conf
-icons/cvsweb/
-icons/cvsweb/back.gif
-icons/cvsweb/dir.gif
-icons/cvsweb/miniback.gif
-icons/cvsweb/minidir.gif
-icons/cvsweb/minitext.gif
-icons/cvsweb/text.gif
+htdocs/icons/
+htdocs/icons/cvsweb/
+htdocs/icons/cvsweb/back.gif
+htdocs/icons/cvsweb/dir.gif
+htdocs/icons/cvsweb/miniback.gif
+htdocs/icons/cvsweb/minidir.gif
+htdocs/icons/cvsweb/minitext.gif
+htdocs/icons/cvsweb/text.gif
 @cwd ${LOCALBASE}/share/doc/pkg-readmes
 ${FULLPKGNAME}
Index: pkg/README
===================================================================
RCS file: /cvs/ports/devel/cvsweb/pkg/README,v
retrieving revision 1.5
diff -u -p -r1.5 README
--- pkg/README  7 Apr 2013 20:07:24 -0000       1.5
+++ pkg/README  31 May 2013 21:28:07 -0000
@@ -1,99 +1,101 @@
-$OpenBSD: README,v 1.5 2013/04/07 20:07:24 naddy Exp $
-
-+-----------------------------------------------------------------------
-| Running ${FULLPKGNAME} on OpenBSD
-+-----------------------------------------------------------------------
-
-# Author: Jolan Luff <jo...@openbsd.org>
-
-In order to make CVSweb operate in a chroot environment, it is
-necessary to copy all of the relevant tools, libraries, and perl modules
-that CVSweb employs into /var/www.
-
-First, create the basic directory structure:
-
-$ cd /var/www
-# mkdir tmp usr
-# chown www:www tmp    (needs to be writeable for the www user)
-
-$ cd /var/www/usr
-# mkdir -p {bin,lib,libdata/perl5,libexec}
-
-$ cd /var/www/usr/libdata/perl5
-# mkdir -p {File,IPC,Time,warnings,`machine`-openbsd/5.16.3/auto/Fcntl,unicore}
-
-The "annotate" function requires this empty file:
-
-NOTE: You can create an actual null device instead, but that will
-not work if the filesystem is mounted with the nodev option, and
-it is not required for cvsweb.
-
-$ cd /var/www/dev
-# touch null
-
-Now, the required binaries:
-
-$ cd /var/www/usr/bin
-# cp -p /usr/bin/{co,cvs,diff,perl,rcsdiff,rlog,uname} .
-
-Next, the libraries that the binaries are linked to:
-
-NOTE: Wildcards will, of course, copy any old, unused libraries that are
-lurking around (for example, from an upgrade):
-
-$ cd /var/www/usr/lib
-# cp -p /usr/lib/lib{c,crypto,gssapi,krb5,m,perl,pthread,util,z}.so* .
-
-Now, the run-time link-editor:
-
-$ cd /var/www/usr/libexec
-# cp -p /usr/libexec/ld.so .
-
-And finally, the perl modules:
-
-$ cd /var/www/usr/libdata/perl5
-# cp -p /usr/libdata/perl5/{Carp,Exporter,Symbol,base,integer}.pm .
-# cp -p /usr/libdata/perl5/{strict,warnings,vars,constant,utf8}.pm .
-# cp -p /usr/libdata/perl5/utf8_heavy.pl .
-# cp -p /usr/libdata/perl5/unicore/Heavy.pl ./unicore/
-# cp -p /usr/libdata/perl5/File/Basename.pm ./File/
-# cp -p /usr/libdata/perl5/IPC/Open{2,3}.pm ./IPC/
-# cp -p /usr/libdata/perl5/Time/Local.pm ./Time/
-# cp -p /usr/libdata/perl5/warnings/register.pm ./warnings/
-# cp -p /usr/libdata/perl5/XSLoader.pm .
-
-$ cd /var/www/usr/libdata/perl5/`machine`-openbsd/5.16.3
-# cp -p /usr/libdata/perl5/`machine`-openbsd/5.16.3/{Config,Cwd}.pm .
-# cp -p /usr/libdata/perl5/`machine`-openbsd/5.16.3/Config_{git,heavy}.pl .
-# cp -p /usr/libdata/perl5/`machine`-openbsd/5.16.3/DynaLoader.pm .
-# cp -p /usr/libdata/perl5/`machine`-openbsd/5.16.3/Fcntl.pm .
-# cp -p /usr/libdata/perl5/`machine`-openbsd/5.16.3/auto/Fcntl/Fcntl.{bs,so} \
+# $OpenBSD: README,v 1.5 2013/04/07 20:07:24 naddy Exp $
+# 
+# +-----------------------------------------------------------------------
+# | Running ${FULLPKGNAME} on OpenBSD
+# +-----------------------------------------------------------------------
+#
+# Original author: Jolan Luff <jo...@openbsd.org>
+#
+# In order to make CVSweb operate in a chroot environment, it is
+# necessary to copy all of the relevant tools, libraries, and perl modules
+# that CVSweb employs into /var/www.
+#
+# NOTE: You can run this README directly with sh(1).
+#
+# First, create the basic directory structure:
+
+cd /var/www
+mkdir tmp usr
+chown www:www tmp      # needs to be writeable for the www user
+
+cd /var/www/usr
+mkdir -p bin lib libdata/perl5 libexec
+
+cd /var/www/usr/libdata/perl5
+mkdir -p File IPC Time warnings `arch -s`-openbsd/5.16.3/auto/Fcntl unicore
+
+# The "annotate" function requires this empty file:
+#
+# NOTE: You can create an actual null device instead, but that will
+# not work if the filesystem is mounted with the nodev option, and
+# it is not required for cvsweb.
+
+cd /var/www/dev
+touch null
+
+# Now, the required binaries:
+
+cd /var/www/usr/bin
+cp -p /usr/bin/{co,cvs,diff,perl,rcsdiff,rlog,uname} .
+
+# Next, the libraries that the binaries are linked to:
+#
+# NOTE: Wildcards will, of course, copy any old, unused libraries that are
+# lurking around (for example, from an upgrade):
+
+cd /var/www/usr/lib
+cp -p /usr/lib/lib{c,crypto,gssapi,krb5,m,perl,pthread,util,z}.so* .
+
+# Now, the run-time link-editor:
+
+cd /var/www/usr/libexec
+cp -p /usr/libexec/ld.so .
+
+# And finally, the perl modules:
+
+cd /var/www/usr/libdata/perl5
+cp -p /usr/libdata/perl5/{Carp,Exporter,Symbol,base,integer}.pm .
+cp -p /usr/libdata/perl5/{strict,warnings,vars,constant,utf8}.pm .
+cp -p /usr/libdata/perl5/utf8_heavy.pl .
+cp -p /usr/libdata/perl5/unicore/Heavy.pl ./unicore/
+cp -p /usr/libdata/perl5/File/Basename.pm ./File/
+cp -p /usr/libdata/perl5/IPC/Open{2,3}.pm ./IPC/
+cp -p /usr/libdata/perl5/Time/Local.pm ./Time/
+cp -p /usr/libdata/perl5/warnings/register.pm ./warnings/
+cp -p /usr/libdata/perl5/XSLoader.pm .
+
+cd /var/www/usr/libdata/perl5/`arch -s`-openbsd/5.16.3
+cp -p /usr/libdata/perl5/`arch -s`-openbsd/5.16.3/{Config,Cwd}.pm .
+cp -p /usr/libdata/perl5/`arch -s`-openbsd/5.16.3/Config_{git,heavy}.pl .
+cp -p /usr/libdata/perl5/`arch -s`-openbsd/5.16.3/DynaLoader.pm .
+cp -p /usr/libdata/perl5/`arch -s`-openbsd/5.16.3/Fcntl.pm .
+cp -p /usr/libdata/perl5/`arch -s`-openbsd/5.16.3/auto/Fcntl/Fcntl.{bs,so} \
     ./auto/Fcntl/
 
-Editing cvsweb and cvsweb.conf
-------------------------------
-
-The cvsweb program itself and cvsweb.conf both assume Apache is not
-running in a chroot environment, so we need to change some default paths
-so they are relative to /var/www.
-
-In /var/www/cgi-bin/cvsweb:
-
-for ("$mydir/cvsweb.conf", '/var/www/conf/cvsweb/cvsweb.conf') {
-for ("$mydir/cvsweb.conf", '/conf/cvsweb/cvsweb.conf') {
-
-In /var/www/conf/cvsweb/cvsweb.conf:
-
-Change CVSrepositories to reflect the location of the directories which
-contain CVSROOT.  This example shows a local repository NFS mounted over
-loopback into /var/www/cvs, since the directory must be relative to
-/var/www, we use /cvs.
-
-@CVSrepositories = (
-       'local'   => ['Local Repository', '/home/cvs'],       (default)
-       'local'   => ['Local Repository', '/cvs'],            (chroot)
-
-And the same idea for $mimetypes:
-
-$mime_types = '/var/www/conf/mime.types';                     (default)
-$mime_types = '/conf/mime.types';                             (chroot)
+# Editing cvsweb and cvsweb.conf
+# ------------------------------
+#
+# The cvsweb program itself and cvsweb.conf both assume Apache is not
+# running in a chroot environment, so we need to change some default paths
+# so they are relative to /var/www.
+#
+# In /var/www/cgi-bin/cvsweb:
+#
+# for ("$mydir/cvsweb.conf", '/var/www/conf/cvsweb/cvsweb.conf') {
+# for ("$mydir/cvsweb.conf", '/conf/cvsweb/cvsweb.conf') {
+# 
+# In /var/www/conf/cvsweb/cvsweb.conf:
+# 
+# Change CVSrepositories to reflect the location of the directories which
+# contain CVSROOT.  This example shows a local repository NFS mounted over
+# loopback into /var/www/cvs, since the directory must be relative to
+# /var/www, we use /cvs.
+#
+# @CVSrepositories = (
+#      'local'   => ['Local Repository', '/home/cvs'],       (default)
+#      'local'   => ['Local Repository', '/cvs'],            (chroot)
+#
+# And the same idea for $mimetypes:
+#
+# $mime_types = '/var/www/conf/mime.types';                   (default)
+# $mime_types = '/conf/mime.types';                           (chroot)

-- 
Christian "naddy" Weisgerber                          na...@mips.inka.de

Reply via email to