tech-pkg archive

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

Re: wanderer

Am 14.01.2016 um 01:44 schrieb Marina Brown:
> Hi All:
> I have just added wip/wanderer. When people have time could you take a
> look at it to see if it is ok. It's been a long time since i have done a
> BSD package (12 years).

Hi Marina,

in the Makefile, the do-build target looks pretty complicated. Please
use the SUBST framework (mk/ to make this simpler. It should
look approximately like this:

SUBST_CLASSES+= wanderer
SUBST_STAGE.wanderer= pre-build
SUBST_FILES.wanderer= wand_head.h
SUBST_SED.wanderer= -e
SUBST_SED.wanderer+= -e
SUBST_SED.wanderer+= -e "s,\#include <ncurses.h>,\#include <curses.h>,"

SUBST_STAGE.wand-mk= pre-build
SUBST_FILES.wand-mk= Makefile
SUBST_SED.wand-mk= -e 's|${DESTDIR}||'
SUBST_SED.wand-mk+= -e "s,/usr/local/,${PREFIX}/,"

(Though the DESTDIR line may be unnecessary, since ${DESTDIR} is usually
the empty string.)

After this refactoring, you don't need to define the do-build target
anymore. It was unprecise anyway, since you didn't setup the usual build
environment in which all the tools are defined and the compiler is
wrapped. (Keyword: MAKE_ENV)

Instead of INSTALLATION_DIRS you can just define AUTO_MKDIRS=yes, which
will take care of creating all the directories.

The echo lines in do-install are unnecessary.

The ${CHOWN} line uses hard-coded user and group names. There is
GAMES_USER and GAMES_GROUP for this purpose. Run "make help
topic=games_user" for more information.

You should not use ${CP} in the install phase, since that does not
overwrite read-only files. Using "${INSTALL} -o ${GAMES_USER} -g
${GAMES_GROUP} -m 2555" is shorter and more correct.

The INSTALL_DATA command already takes care of the file permissions, so
you should not specify them.

The line including should be the very last line of the
package Makefile. Every line that comes after that one must be
documented, since it is very unusual.

The DISTNAME must contain a version number of the package. "dev" is not
an appropriate version number. Also, wanderer-dev.tgz must have a
version number. Otherwise you won't be able to upload another version,
since the name of the distfile cannot be re-used.

PKGREVISION is not the official version number of the package, but a
pkgsrc-internal version suffix. You should not define it.

That's quite a lot, but since you asked, I answered. :)


Home | Main Index | Thread Index | Old Index