From owner-freebsd-ports@FreeBSD.ORG Fri May 30 04:18:30 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A69FA7C4 for ; Fri, 30 May 2014 04:18:30 +0000 (UTC) Received: from exprod7og112.obsmtp.com (exprod7og112.obsmtp.com [64.18.2.177]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 451D72AAF for ; Fri, 30 May 2014 04:18:29 +0000 (UTC) Received: from mail-ob0-f173.google.com ([209.85.214.173]) (using TLSv1) by exprod7ob112.postini.com ([64.18.6.12]) with SMTP ID DSNKU4gGlPXc9SdacFwBMvp2S8qQnvLqE8Q6@postini.com; Thu, 29 May 2014 21:18:30 PDT Received: by mail-ob0-f173.google.com with SMTP id wm4so1299211obc.32 for ; Thu, 29 May 2014 21:18:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:content-type; bh=tgqniY6HTArap8jo2FC08+5u+Xq/gu1h41d24YUlvGI=; b=h16kFw9RC5X1xoaXI+nl+gB9djBom9puBzqE0L4LdM6+4b8z3gl8kT0yi25caypKjv 7VcCLSslv/2ZXUgEQgEKkilHBxVXFrheUbd6hmmYJuqIhbv4M7xwxRrhbt3Z9TxELRhY 8p670UkbK6icpMSTSi/PhSCAkEWoPIgmzQIo7ui3dr7uVTHkPjaVTawJPmFZNqreUyTJ UC3Ut4NpWx58EMQH1mtJGRd/ISPDBVGv1DwTDkQwPIqEgmYS4Bhq2sYA4rIbppl/5Sqw qkEov3aUiCtXn3oTwHJN6By67cpKFx/YQMb3BdHTN5l8b8J2XoSyLI8Ijst5ARdue4RX pI0g== X-Gm-Message-State: ALoCoQmHyVAQtkrkNyZQSgnzjLiEkbWlEsZ6wOwPMkkSFjZtXreny+yCD70cLEIzfJ7HuIXEIFoejS6ekvYUPD2FrZzsZjmndBk1j+CFsx5fmB8bXukqB5Ua6s1Fu4FOsNKw6W8T9UcjirMk8cZ2CPZ+D8ibSY0y4g== X-Received: by 10.182.213.168 with SMTP id nt8mr13450603obc.7.1401423508279; Thu, 29 May 2014 21:18:28 -0700 (PDT) X-Received: by 10.182.213.168 with SMTP id nt8mr13450589obc.7.1401423508156; Thu, 29 May 2014 21:18:28 -0700 (PDT) From: Raghu HB References: <5385AFFA.7050206@sorbs.net> <5386E901.5090803@gmx.de> In-Reply-To: <5386E901.5090803@gmx.de> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQEHFrZKH5N2lWAujW66X3MxzX+hKAFvKOugARV3G4gBp3R7ZZzH6iPw Date: Fri, 30 May 2014 09:48:27 +0530 Message-ID: <6667825af05f6ed0e9e5cc649b18477f@mail.gmail.com> Subject: RE: Creating new port To: olli hauer , freebsd-ports Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2014 04:18:30 -0000 Olli and Michelle, Thanks a lot, this is what I was looking for (example for the port creation), I referred simple sysutils/tw_cli port and created new port and package. Below are the steps I followed. STEP1: Created a test port directory /usr/ports/sysutils/testport STEP2: Created Makefile with below content. -------------------------------------------------------------------------- ---------------------------------------------------------------- # $FreeBSD$ PORTNAME= testport PORTVERSION= 2.1 CATEGORIES= sysutils MASTER_SITES= ftp://support.com DISTNAME= testport-2.1 MAINTAINER= youremail@example.com COMMENT= test ONLY_FOR_ARCHS= amd64 WRKSRC= ${WRKDIR} NO_BUILD= yes .include do-install: @${MKDIR} ${PREFIX}/sbin/test/ ${INSTALL_PROGRAM} ${WRKSRC}/${DISTNAME}/bin/test/testbinary ${PREFIX}/sbin/test/ deinstall: @${RMDIR} ${PREFIX}/sbin/test .include -------------------------------------------------------------------------- ---------------------------------------------------------------- STEP3: Created the tar file testport-2.1.tar.gz and placed the tar file in /usr/ports/distfiles ./ testport-2.1 ./ testport-2.1/bin ./ testport-2.1/bin/test ./ testport-2.1/bin/test/testbinary STEP4: Change the directory to /usr/ports/sysutils/testport and run the command : make makesum STEP5: Run the command "make package" I can see that the port is created and installed. STEP6: try uninstall the port: "make deinstall" STEP7: Create the package from the port using the below commands and verify the package. pkg_create -b testport-2.1 pkg_add -f testport-2.1.tbz pkg_delete testport-2.1 As I mentioned above I created a test package and which is working fine. Please suggest if any changes needed or if something is wrong in above steps. Now I would say I will create a package for my new application "finalpackage.tbz". I would like to know if I can ship the "finalpackage.tbz" file to customer to use the package on their system for new application? or it has to be registered with FreeBSD community? Please guide us with the future steps to release the application to customer. -----Original Message----- From: olli hauer [mailto:ohauer@gmx.de] Sent: Thursday, May 29, 2014 1:30 PM To: freebsd-ports Cc: Raghu HB Subject: Re: Creating new port On 2014-05-28 12:01, 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 > 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@avagotech.com > COMMENT= MRMonitor > .include > ---------------------------------------------------------- > > > 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@avagotech.com > COMMENT= MRMonitor > .include > ---------------------------------------------------------- > > > 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@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/ > Reading the make-error log it looks like `make' is called recursive. In case the the port does not compile anything try to add the keyword NO_BUILD=yes into the port Makefile and use a 'do-install:' target. e.g. COMMENT= ... NO_BUILD= yes do-install: ${INSTALL} ${WRKSRC}/${ARCH}/mrmonitor ${STAGEDIR}${LOCALBASE}/bin ${INSTALL_SCRIPT} ${WRKSRC}/scripts/$scriptXX ${STAGEDIR}${LOCALBASE}/bin ... .include If you could provide your full Makefile and a link to the distfile I'm sure the port can be finished in short time. As a hint look at the simple sysutils/tw_cli port -- Regards, olli