On Fri, Jan 05, 2018 at 07:01:01AM +0000, Anthony J. Bentley wrote:
> Hi,
> 
> I use cgit a lot on OpenBSD. Having to google the manpage is a frequent
> annoyance. This diff adds it to the package.
> 
> Using LOCALBASE for it seems kind of weird, but the package already uses
> it for the pkg-readme, so...

That's because the default PREFIX is not the usual one.

> ok?

See below.

> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/www/cgit/Makefile,v
> retrieving revision 1.22
> diff -u -p -r1.22 Makefile
> --- Makefile  22 Mar 2017 20:23:52 -0000      1.22
> +++ Makefile  5 Jan 2018 06:53:09 -0000
> @@ -4,6 +4,7 @@ COMMENT =     web frontend for git repositor
>  
>  DISTNAME =   cgit-1.1
>  CATEGORIES = www devel
> +REVISION =   0
>  
>  DISTFILES =  ${DISTNAME}.tar.gz:0 \
>               git-2.10.2.tar.gz:1
> @@ -17,16 +18,20 @@ PERMIT_PACKAGE_CDROM =    Yes
>  
>  USE_GMAKE =  yes
>  
> +BUILD_DEPENDS =      textproc/asciidoc
>  LIB_DEPENDS =        converters/libiconv
>  
>  PREFIX =     ${VARBASE}/www
>  MAKE_FLAGS +=        V=1 NO_GETTEXT=1 NO_LUA=1 LDFLAGS+='${STATIC} 
> -L${LOCALBASE}/lib'
>  
> +ALL_TARGET = all doc-man
> +
>  post-extract:
>       rmdir ${WRKSRC}/git
>       mv ${WRKDIR}/git-* ${WRKSRC}/git
>  
>  post-install:
>       mv ${PREFIX}/htdocs ${PREFIX}/cgit
> +     ${INSTALL_MAN} ${WRKBUILD}/cgitrc.5 ${WRKINST}${LOCALBASE}/man/man5
>  
>  .include <bsd.port.mk>
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/www/cgit/pkg/PLIST,v
> retrieving revision 1.3
> diff -u -p -r1.3 PLIST
> --- pkg/PLIST 5 Apr 2015 22:07:59 -0000       1.3
> +++ pkg/PLIST 5 Jan 2018 06:53:09 -0000
> @@ -9,3 +9,5 @@ cgit/favicon.ico
>  cgit/robots.txt
>  @cwd ${LOCALBASE}/share/doc/pkg-readmes
>  ${FULLPKGNAME}
> +@cwd ${LOCALBASE}/man/man5
> +@man cgitrc.5

Here you should just be able to do (untested):

@cwd ${LOCALBASE}
share/doc/pkg-readmes/${FULLPKGNAME}
man/man5/cgitrc.5

-- 
Antoine

Reply via email to