From: Joe on
Very simple port. All the files are in the port's files directory.
When I do "make install" i get message "Need an operator"

The Makefile follows

PORTNAME= qjail
PORTVERSION= 1.0
CATEGORIES= sysutils
MASTER_SITES= # none, All the files are in this ports files directory
DISTFILES= # none

MAINTAINER= qjail(a)a1poweruser.com
COMMENT= A jail utility to deploy large numbers of jails quickly.

LICENSE= BSD

NO_BUILD= yes

do-install:
${CP} /etc/rc.d/jail /etc/rc.d/jail.original
${CP} ${FILESDIR}jail /etc/rc.d/
${CP} ${FILESDIR}/qjail ${LOCALBASE}/usr/local/bin/
${CP} ${FILESDIR}/qjail.sh ${LOCALBASE}/usr/local/etc/rc.d/
${CP} ${FILESDIR}/qjail-conf.sample ${LOCALBASE}/usr/local/etc/
${CP} ${FILESDIR}/qjail.8 ${LOCALBASE}/usr/local/man/man8/
${CP} ${FILESDIR}/qjail-intro.8 ${LOCALBASE}/usr/local/man/man8/
${CP} ${FILESDIR}/qjail-conf.8 ${LOCALBASE}/usr/local/man/man8/
${MKDIR} ${LOCALBASE}/usr/local/share/examples/qjail

${CP} -R -p ${FILESDIR}/examples
${LOCALBASE}/usr/local/share/examples/qjail/

${CHMOD} 0755 ${LOCALBASE}/etc/rc.d/jail
${CHMOD} 0755 ${LOCALBASE}/usr/local/bin/qjail
${CHMOD} 0755 ${LOCALBASE}/usr/local/etc/rc.d/qjail.sh
post-install:
${CAT} ${PKGMESSAGE}

..include <bsd.port.mk>

This is patterned after the bsdstats port Makefile.

Thanks for you help
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Janne Snabb on
On Fri, 16 Jul 2010, Joe wrote:

> Very simple port. All the files are in the port's files directory.
> When I do "make install" i get message "Need an operator"

This is really FAQ. Google search for "makefile need an operator",
first result points to this message which explains the issue:

http://lists.freebsd.org/pipermail/freebsd-ports/2008-January/046334.html

BTW, your cut'n'pasted Makefile was so mangled that it would be
difficult to help you with a real problem without spending considerable
amount of time unmangling it first.

--
Janne Snabb / EPIPE Communications
snabb(a)epipe.com - http://epipe.com/
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Ashish SHUKLA on
Joe writes:
> Very simple port. All the files are in the port's files directory.
> When I do "make install" i get message "Need an operator"

> The Makefile follows

> PORTNAME= qjail
> PORTVERSION= 1.0
> CATEGORIES= sysutils
> MASTER_SITES= # none, All the files are in this ports files directory
> DISTFILES= # none

> MAINTAINER= qjail(a)a1poweruser.com
> COMMENT= A jail utility to deploy large numbers of jails quickly.

> LICENSE= BSD

> NO_BUILD= yes

> do-install:
> ${CP} /etc/rc.d/jail /etc/rc.d/jail.original
> ${CP} ${FILESDIR}jail /etc/rc.d/
> ${CP} ${FILESDIR}/qjail ${LOCALBASE}/usr/local/bin/
> ${CP} ${FILESDIR}/qjail.sh ${LOCALBASE}/usr/local/etc/rc.d/
> ${CP} ${FILESDIR}/qjail-conf.sample ${LOCALBASE}/usr/local/etc/
> ${CP} ${FILESDIR}/qjail.8 ${LOCALBASE}/usr/local/man/man8/
> ${CP} ${FILESDIR}/qjail-intro.8 ${LOCALBASE}/usr/local/man/man8/
> ${CP} ${FILESDIR}/qjail-conf.8 ${LOCALBASE}/usr/local/man/man8/
> ${MKDIR} ${LOCALBASE}/usr/local/share/examples/qjail

> ${CP} -R -p ${FILESDIR}/examples
> ${LOCALBASE}/usr/local/share/examples/qjail/

> ${CHMOD} 0755 ${LOCALBASE}/etc/rc.d/jail
> ${CHMOD} 0755 ${LOCALBASE}/usr/local/bin/qjail
> ${CHMOD} 0755 ${LOCALBASE}/usr/local/etc/rc.d/qjail.sh

You need TAB characters before before '$' character in above lines. Read the
manual page of 'make' for details on its syntax, and also read Porters
Handbook[1].

And when sending Makefiles for review, its better to attach them instead of
copy-pasting inline.

References:
[1] http://www.freebsd.org/doc/en/books/porters-handbook/

HTH
--
Ashish SHUKLA | GPG: F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0
freebsd.org!ashish | http://people.freebsd.org/~ashish/

“The future is not google-able.” (William Gibson, 2004-02-05)
From: Anonymous on
Joe <joeb_722(a)comclark.com> writes:

[...]
> do-install:
> ${CP} /etc/rc.d/jail /etc/rc.d/jail.original
> ${CP} ${FILESDIR}jail /etc/rc.d/
> ${CP} ${FILESDIR}/qjail ${LOCALBASE}/usr/local/bin/
> ${CP} ${FILESDIR}/qjail.sh ${LOCALBASE}/usr/local/etc/rc.d/
> ${CP} ${FILESDIR}/qjail-conf.sample ${LOCALBASE}/usr/local/etc/
> ${CP} ${FILESDIR}/qjail.8 ${LOCALBASE}/usr/local/man/man8/
> ${CP} ${FILESDIR}/qjail-intro.8 ${LOCALBASE}/usr/local/man/man8/
> ${CP} ${FILESDIR}/qjail-conf.8 ${LOCALBASE}/usr/local/man/man8/
> ${MKDIR} ${LOCALBASE}/usr/local/share/examples/qjail
>
> ${CP} -R -p ${FILESDIR}/examples
> ${LOCALBASE}/usr/local/share/examples/qjail/
>
> ${CHMOD} 0755 ${LOCALBASE}/etc/rc.d/jail
> ${CHMOD} 0755 ${LOCALBASE}/usr/local/bin/qjail
> ${CHMOD} 0755 ${LOCALBASE}/usr/local/etc/rc.d/qjail.sh
> post-install:
> ${CAT} ${PKGMESSAGE}
>
> .include <bsd.port.mk>
>
> This is patterned after the bsdstats port Makefile.

sysutils/bsdstats is a bad example[1]. It uses cp(1) over install(1),
sets mode to a constant rather than BINMODE and installs into LOCALBASE,
not PREFIX.

[1] I tried to fix some in ports/146257.
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Joe on
Anonymous wrote:
> Joe <joeb_722(a)comclark.com> writes:
>
> [...]
>> do-install:
>> ${CP} /etc/rc.d/jail /etc/rc.d/jail.original
>> ${CP} ${FILESDIR}jail /etc/rc.d/
>> ${CP} ${FILESDIR}/qjail ${LOCALBASE}/usr/local/bin/
>> ${CP} ${FILESDIR}/qjail.sh ${LOCALBASE}/usr/local/etc/rc.d/
>> ${CP} ${FILESDIR}/qjail-conf.sample ${LOCALBASE}/usr/local/etc/
>> ${CP} ${FILESDIR}/qjail.8 ${LOCALBASE}/usr/local/man/man8/
>> ${CP} ${FILESDIR}/qjail-intro.8 ${LOCALBASE}/usr/local/man/man8/
>> ${CP} ${FILESDIR}/qjail-conf.8 ${LOCALBASE}/usr/local/man/man8/
>> ${MKDIR} ${LOCALBASE}/usr/local/share/examples/qjail
>>
>> ${CP} -R -p ${FILESDIR}/examples
>> ${LOCALBASE}/usr/local/share/examples/qjail/
>>
>> ${CHMOD} 0755 ${LOCALBASE}/etc/rc.d/jail
>> ${CHMOD} 0755 ${LOCALBASE}/usr/local/bin/qjail
>> ${CHMOD} 0755 ${LOCALBASE}/usr/local/etc/rc.d/qjail.sh
>> post-install:
>> ${CAT} ${PKGMESSAGE}
>>
>> .include <bsd.port.mk>
>>
>> This is patterned after the bsdstats port Makefile.
>
> sysutils/bsdstats is a bad example[1]. It uses cp(1) over install(1),
> sets mode to a constant rather than BINMODE and installs into LOCALBASE,
> not PREFIX.
>
> [1] I tried to fix some in ports/146257.
>

The above is my port source in a net shell.
What i really want is to have just the scripts sources to be fetched
from remote site
on "make install" of the port.

Can anyone recommend, based on the above Makefile, some ports I should
look at as being
a good example of a port makefile for small amount of files that require
no compiling, that I could use as a template?

_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"