John,

See my comments below ...

Paul

John Leser wrote:
> 
> http://cr.opensolaris.org/~jleser/nano-2009.02.21
> 
> There was also one small change: I'm not including the file
> /usr/share/info/dir in the common package prototype.
>>
>> I working on porting the package nano.  Nano is a simple 
>> terminal-based text editor.
>>
>> Can I get some help reviewing the integration into sfwnv?  Thanks in 
>> advance.
>>
>> Webrev is here:

==== Start of Comments ====

1. usr/src/cmd/nano/METADATA
    Add the missing fields, see ...
    http://wikis.sun.com/display/SFWNotes/Package+writing+guidelines

2. usr/src/cmd/nano/Makefile.sfw
    Extract the VER= info from the METADATA, see recent
    integrations for examples.

    Roland Mainz wrote:
    > use "env - ..." and not "env ..." in the Makefiles to
    > make sure "configure"&&"make" only see the env variables
    > they should really get (and not pick-up any random
    > env variable)
    > use either $(SHELL) or /usr/bin/bash for "configure"
    > calls (so we know which one is used and "configure"
    > doesn't pick one itself)

    Change the following so that it uses the predefined
    --prefix= value from Makefile.master, and also use the
    CONFIGURE_OPTIONS method of setting and using configure
    options ...
     60             ./configure --prefix=$(PREFIX) \
     61                 --enable-color \
     62                 --enable-multibuffer \
     63                 --enable-nanorc \
     64                 --enable-utf8 \
     65                 --disable-iberty \
     66                 get_wch=getwch)
    So something like ...
     CONFIGURE_OPTIONS += --enable-color
     CONFIGURE_OPTIONS += --enable-multibuffer
       etc
     ....
     ....
     ./configure $(CONFIGURE_OPTIONS)

    Does this do anything for your pkg build ? ..
      51        MANSCRIPT=../../../sunman-stability

    Do you actually need this line? if not delete it ...
      36    @find . -name core -exec rm -f {} \;
    If you do, why does it 'core' dump?

    Change /usr/ccs/bin/make to $(CCSMAKE)

3. CDDL HEADER and file tops (various files)
    Change so that they conform to that in ...
"http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/prototypes/";

4. usr/src/cmd/nano/install-sfw
    Change as ..
    Roland Mainz wrote:
    > use /usr/bin/ksh93 or /usr/bin/bash for install-sfw*
    > and add a $ set -o errexit # at the beginning and
    > replace ". ${SRC}/tools/install.subr" with
    > "source ${SRC}/tools/install.subr" (the idea is to
    > catch failures in the script and abort it at that point,
    > right now the script will just continue)

    I can't see where this script is invoked from your
    Makefile.sfw ?

    Pass the VERS= info in from your Makefile.sfw (extracted
    from METADATA) as an environment var or as an option.

    Use the _install macro to install the files rather than
    with 'rm, cp, chmod & chown'

    These should already be in Targetdirs, so you don't
    need to create them here ...
     35 mkdir -p ${ROOTBINDIR}
     36 mkdir -p ${ROOTMAN1DIR}
     37 mkdir -p ${ROOTMAN5DIR}
     38 mkdir -p ${ROOTINFODIR}

5. usr/src/pkgdefs/SUNWgnu-nano/Makefile
    You have your own 'depend' file, so delete this line ..
      28 DATAFILES = depend

6. usr/src/pkgdefs/SUNWgnu-nano/depend
    This looks like the default 'depend' file. Have you
    checked you have no other dependencies for this pkg
    with the dependency checker script (from gate)?
    If you have none then delete this file (and ignore
    comment (5)), otherwise add the additional dependencies.

    Move Copyright lines to after the CDDL HEADER END
    header and correct year.

7. usr/src/pkgdefs/SUNWgnu-nano/prototype_com
    Do you really need the write permission bit set on the
    files installed in /usr, if not remove it.

8. usr/src/pkgdefs/SUNWgnu-nano/prototype_i386
      & usr/src/pkgdefs/SUNWgnu-nano/prototype_sparc
    Cosmetic: add the missing pkg name comment lines, see ..
"http://src.opensolaris.org/source/xref/sfw/usr/src/pkgdefs/SUNWmeld/prototype_i386";

==== End of comments ======
-- 
----------------------------------------------------------------------
Paul Cunningham
Software Engineer
Tadpole Business Unit

Reply via email to