Creating new port

Raghu HB raghu.hb at avagotech.com
Wed May 28 10:53:01 UTC 2014


Thanks Michelle,

I copied the files in /usr/ports/sysutils/mrmonitor and ran the below
commands I encountered the same issue.

root@:/usr/ports/sysutils/mrmonitor # make distinfo
make: don't know how to make distinfo. Stop
root@:/usr/ports/sysutils/mrmonitor # make makesum
===>  Found saved configuration for mrmonitor-1.1
root@:/usr/ports/sysutils/mrmonitor # make package
===>  Found saved configuration for mrmonitor-1.1

I need to understand below things which is not explained in hand book.

1. Detailed steps for creating new port
2. Sample example for creating new port which nowhere available in the web
3. I have 10 files in a directory, I just need to create a package out of
that and provide the package to customers they can install it.
4. I do not have to build anything I just need to create the port for
binaries.


I have searched enough in the web nowhere I found the answer...
I think providing the files in tar format and script to deploy the files
will be more easier than this complicated port and packages.

Thanks,
Raghu


-----Original Message-----
From: Michelle Sullivan [mailto:michelle at sorbs.net]
Sent: Wednesday, May 28, 2014 3:55 PM
To: Raghu HB
Cc: FreeBSD Ports ML
Subject: Re: Creating new port

Raghu HB wrote:
> Thanks Michelle for quick response.
>
>
> First I would like to explain what is the application and how I am
> trying to create port.
>
> We have some command line utilities to run on FreeBSD (Storage
> controller software).
> The installer should contain few binaries and scripts which will be
> deployed on FreeBSD OS.
> The binaries are pre-compiled and scripts will be used to
>

This is likely to cause issues for starters...  You will need to
precompile for each arch and release..

The Makefile will go in (probably) /usr/ports/sysutils/mrmonitor

The distribution should be tarred and compressed, put the tarball in
/usr/ports/distfiles and run "make distinfo", this will then create the
distinfo file.

If you are distributing all architects and releases in the same tarball,
you should then look at the makefile in the tarball and if you're using
precompiled with multiple arch's/releases create a configure script and
makefile to work out which binary to select.

The Makefile in the ports tree can then be configured as per the porters
handbook to stage and install the binaries. (use make makeplist to have a
'helper' script to create the pkg-plist file for you (will most likely
need editing))

If you are distributing a different tarball for each binary you can
configure the ports Makefile to select which tarball to download (Porters
Handbook will give you clues on how to do this)...

After all this has been done, configure the MASTER_SITES for where the
port can be downloaded from as the port will not be shipped in the ports
tree (apart from in CDROM/DVD if you configure the port to be allowed)

You might also want to look at the licensing options - also detailed in
the porters handbook.

Porters Handbook is here:
http://www.freebsd.org/doc/en/books/porters-handbook/

Regards,

Michelle
> start/stop/restart the services or daemons.
>
> Created below directory structure "/usr/ports/distfiles/":
>
> ./mrmonitor-1.1
> ./mrmonitor-1.1/bin
> ./mrmonitor-1.1/bin/mrmonitor
> ./mrmonitor-1.1/bin/mrmonitor/testmonitor
> ./mrmonitor-1.1/Makefile
>
> I created a tar.gz file which contains the above directory structure
> with the name mrmonitor-1.1.tar.gz.
>
> The Makefile contents:
> ----------------------------------------------------------
> # $FreeBSD$
> PORTNAME=       mrmonitor
> PORTVERSION=    1.1
> CATEGORIES=     misc
> MASTER_SITES=
>
> MAINTAINER=    Raghu.hb at avagotech.com
> COMMENT=       MRMonitor
> .include <bsd.port.mk>
> ----------------------------------------------------------
>
>
> Created a home directory /home/Raghu, Created 3 new files Makefile,
> pkg-descr
>
> The Makefile contents:
> ----------------------------------------------------------
> # $FreeBSD$
> PORTNAME=       mrmonitor
> PORTVERSION=    1.1
> CATEGORIES=     misc
> MASTER_SITES=
>
> MAINTAINER=    Raghu.hb at avagotech.com
> COMMENT=       MRMonitor
> .include <bsd.port.mk>
> ----------------------------------------------------------
>
>
> pkg-descr
>
> ----------------------------------------------------------
> This is MRMonitor port
> ----------------------------------------------------------
>
> pkg-plist
> ----------------------------------------------------------
> bin/mrmonitor
> bin/mrmonitor/testmonitor
> @dirrm bin/mrmonitor
> ----------------------------------------------------------
>
>
>
> Now I run the command make makesum which is successful, then I ran the
> command make package I got the errors (attached the error  messages) .
>
> May be I am doing something wrong in some basic configuration, please
> correct me.
>
>
> Thanks,
> Raghu
>
> -----Original Message-----
> From: Michelle Sullivan [mailto:michelle at sorbs.net]
> Sent: Wednesday, May 28, 2014 3:14 PM
> To: Raghu HB
> Cc: FreeBSD Ports ML
> Subject: Re: Creating new port
>
> Raghu HB wrote:
>
>> Hello,
>>
>>
>>
>> I am new to FreeBSD and I am in a process of creating new port for
>> one of the application.
>>
>> I have gone through the steps in handbook and I tried to create new
>> port but I am not successful.
>>
>>
>>
>> I would request you to send one sample example to create new port
>> with all the steps explained would be a great help.
>>
>>
>>
>
> What's the application, can you send me your Makefile so far and what
> errors you're getting?
>
> And I'll try and take a look.
>
> Michelle
>
> --
> Michelle Sullivan
> http://www.mhix.org/
>


--
Michelle Sullivan
http://www.mhix.org/


More information about the freebsd-ports mailing list