pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mailgraph package



Am 01.10.2019 um 11:48 schrieb Frédéric Fauberteau:
> # $NetBSD: Makefile,v 1.25 2019/08/11 13:21:29 wiz Exp $
>
> DISTNAME=    mailgraph-1.14
> PKGREVISION=    6
> CATEGORIES=    mail

Somehow your mail client replaced the tabs with spaces. If that's also
in the original Makefile, just run pkglint -F.

> MASTER_SITES=    http://mailgraph.schweikert.ch/pub/
> MASTER_SITES+=    http://mailgraph.schweikert.ch/pub/old

I wonder why pkglint didn't complain about a MASTER_SITES that is
missing the trailing slash. It should definitely not end with a letter
since that would produce /pub/oldmailgraph-1.14.tar.gz without an
intermediate slash.

Ah I see, the "must end with a slash" check is only there for
MASTER_SITES in the form of ${MASTER_SITE_APACHE:=subdir/}.

There's an automatic https redirect on the host. Therefore you should
change the URLs to use https as well. This is something that pkglint
doesn't check because it never accesses the internet.

> MAINTAINER=    kim%tac.nyc.ny.us@localhost
> HOMEPAGE=    http://mailgraph.schweikert.ch/
> COMMENT=    RRDtool frontend for mail statistics
> LICENSE=    gnu-gpl-v2
>
> DEPENDS+=    rrdtool>=1:../../databases/rrdtool
> DEPENDS+=    p5-File-Tail-[0-9]*:../../misc/p5-File-Tail
>
> USE_TOOLS+=    perl:run
> NO_BUILD=    yes
>
> REPLACE_PERL+=    mailgraph.cgi mailgraph.pl
>
> BUILD_DEFS+=    VARBASE
>
> OWN_DIRS+=    ${VARBASE}/db/mailgraph
>
> RCD_SCRIPTS=    mailgraph
>
> SUBST_CLASSES+=        var
> SUBST_STAGE.var=    pre-configure
> SUBST_FILES.var=    mailgraph.cgi mailgraph.pl
> SUBST_VARS.var=        VARBASE
> SUBST_MESSAGE.var=    Fixing hardcoded /var.

I prefer to put SUBST_MESSAGE further up, so that it serves as a summary
of the whole block. The documentation in mk/subst.mk mentions it after
SUBST_STAGE. The order there is fully intentional and is strictly
chronological. First, SUBST_STAGE determines the stage in which the
substitution happens, and then SUBST_MESSAGE is shown. That's also the
order that packages should follow.

> AUTO_MKDIRS=        yes
> INSTALLATION_DIRS+=    libexec/cgi-bin
> INSTALLATION_DIRS+=    sbin
> INSTALLATION_DIRS+=    share/doc/mailgraph
> INSTALLATION_DIRS+=    share/mailgraph

The first 3 INSTALLATION_DIRS lines are redundant since these
directories are mentioned in the PLIST and AUTO_MKDIRS is defined.
There's no pkglint check for this yet, I'll add one.

The last INSTALLATION_DIRS line is probably unnecessary. The package
doesn't install anything there, and empty directories are not packaged.


Home | Main Index | Thread Index | Old Index