Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jun 2015 13:44:24 +0800
From:      "Euan Thoms" <euan@potensol.com>
Cc:        "Chris H" <bsd-lists@bsdforge.com>, freebsd-ports@freebsd.org
Subject:   =?utf-8?q?Re:_New_port_with_USES=3Dgmake_will_not_stage?=
Message-ID:  <72b3-55792000-1f-6b8b4580@197501871>
In-Reply-To: <72b3-55791e00-1b-6b8b4580@197501805>

next in thread | previous in thread | raw e-mail | index | archive | help
 
On Thursday, June 11, 2015 13:33 SGT, "Euan Thoms" <euan@potensol.com> =
wrote: 
 
>  
> On Thursday, June 11, 2015 13:18 SGT, "Chris H" <bsd-lists@bsdforge.c=
om> wrote: 
>  
> > On Thu, 11 Jun 2015 11:33:03 +0800 "Euan Thoms" <euan@potensol.com>=
 wrote
> > 
> > > I'm making a port for OpenSIPS. It builds successfully, but the e=
ven with
> > > just "make" it installs files to the system instead of to stage (=
i.e. to
> > > /usr/local/... instead of /usr/ports/net/opensips/work/stage/usr/=
local/...).
> > > 
> > > I am using gmake and gcc since that's what's required for OpenSIP=
S.
> > > 
> > > I've done a similar port before and the FreeBSD ports macros do t=
he staging
> > > for me. However, even when I tell gmake the DESTDIR=3D${STAGEDIR}=
 in do-build
> > > and do-install, a "make" just installs the files to /usr/local/..=
. .
> > > 
> > > I can't find any documentation on how to ensure building uses sta=
ging.
> > > OpenSIPS doesn't have a configure script AFAIK. It has it's own m=
enuconfig
> > > which normally generates a Makefile.conf. The only thing useful i=
n there is
> > > PREFIX=3D , but that is to specify the final destination paths (a=
lso used in
> > > linking I guess). My port passes the compile flags in MAKE=5FARGS=
 instead of
> > > using a Makefile.conf file. 
> > Kind of a tough call w/o any real information -- your Makefile, the=
 source
> > location? :)
> 
> Sorry about that.
> 
> Source file is here: http://opensips.org/pub/opensips/1.11.5/opensips=
-1.11.5-latest=5Fsrc.tar.gz
> 
> here is my Makefile contents:
> 
> # cat Makefile
> # Created by: Euan Thoms <euan@potensol.com>
> # $FreeBSD$
> 
> PORTNAME=3D               opensips1-lts
> PORTVERSION=3D            1.11.5
> CATEGORIES=3D             net
> MASTER=5FSITES=3D           http://opensips.org/pub/opensips/1.11.5/
=

> DISTNAME=3D               opensips-${PORTVERSION}-latest=5Fsrc
> 
> MAINTAINER=3D             euan@potensol.com
> COMMENT=3D                OpenSIPS (Open SIP Server) is a mature Open=
 Source implementation of a SIP server.
> 
> LICENSE=3D                GPLv2
> LIB=5FDEPENDS=3D            libxml2.so:${PORTSDIR}/textproc/libxml2 \=

>                         libmemcached.so:${PORTSDIR}/databases/libmemc=
ached
> 
> BUILD=5FDEPENDS=3D          python:${PORTSDIR}/lang/python
> 
> WRKSRC=3D                 ${WRKDIR}/opensips-${PORTVERSION}-tls
> 
> OPTIONS=5FDEFINE=3D         LDAP MYSQL PGSQL MEMCACHED
> OPTIONS=5FDEFAULT=3D        LDAP PGSQL MEMCACHED
> OPTIONS=5FSUB=3D yes
> 
> LDAP=5FDESC=3D              Build with LDAP support
> MYSQL=5FDESC=3D             Build with MySQL support
> PGSQL=5FDESC=3D             Build with PostgreSQL support
> MEMCACHED=5FDESC=3D         Build with memcached support
> 
> USES=3D                   gmake shebangfix
> USE=5FGCC=3D                yes
> 
> .include <bsd.port.options.mk>
> 
> #post-patch:
> #       ${REINPLACE=5FCMD} -e 's|^#include <Python.h>|#include "Pytho=
n.h"|' ${WRKSRC}/
> 
> EXCLUDE=5FMODULES=3D        aaa=5Fradius b2b=5Flogic cachedb=5Fcassan=
dra cachedb=5Fcouchbase \
>                         cachedb=5Fmemcached cachedb=5Fmongodb cachedb=
=5Fredis carrierroute cpl-c db=5Fberkeley \
>                         db=5Fhttp db=5Fmysql db=5Foracle db=5Fperlvdb=
 db=5Fpostgres db=5Funixodbc dialplan \
>                         event=5Frabbitmq h350 regex identity jabber j=
son ldap lua httpd mi=5Fxmlrpc=5Fng \
>                         mi=5Fxmlrpc mmgeoip osp perl pi=5Fhttp presen=
ce presence=5Fdialoginfo presence=5Fmwi \
>                         presence=5Fxml pua pua=5Fbla pua=5Fdialoginfo=
 pua=5Fmi pua=5Fusrloc pua=5Fxmpp python \
>                         rest=5Fclient rls sngtc snmpstats xcap xcap=5F=
client xmpp
> 
> INCLUDE=5FMODULES=3D        aaa=5Fradius b2b=5Flogic cachedb=5Fmemcac=
hed carrierroute \
>                         cpl-c db=5Fpostgres dialplan event=5Frabbitmq=
 h350 regex identity jabber json \
>                         ldap httpd mi=5Fxmlrpc=5Fng mi=5Fxmlrpc mmgeo=
ip perl pi=5Fhttp presence \
>                         presence=5Fdialoginfo presence=5Fmwi presence=
=5Fxml pua pua=5Fbla pua=5Fdialoginfo \
>                         pua=5Fmi pua=5Fusrloc pua=5Fxmpp python rest=5F=
client rls xcap xcap=5Fclient xmpp
> 
> MAKE=5FARGS+=3D             PREFIX=3D${LOCALBASE}
> MAKE=5FARGS+=3D             exclude=5Fmodules=3D"${EXCLUDE=5FMODULES}=
" include=5Fmodules=3D"${INCLUDE=5FMODULES}"
> 
> #do-build:
> #       cd ${WRKSRC} && ${GMAKE} ${MAKE=5FARGS} ${ALL=5FTARGET}
> #
> #do-install:
> #       cd ${WRKSRC} && ${GMAKE} ${MAKE=5FARGS} ${INSTALL=5FTARGET}
> 
> .include <bsd.port.mk>
> #### EOF ############
> 
> I can't find the make files for stage to drill down and see what's go=
ing wrong. Any pointers to the script that "make stage" uses? 

Oops, I just found a folder in the source tarballs packaging folder cal=
led "freebsd". And inside that is what looks like a fully baked port.

# ls work/opensips-1.11.5-tls/packaging/freebsd
Makefile   distinfo   files/     pkg-descr


I haven't tried it yet, but I am now wondering why it isn't in the port=
s tree. Somebody has gone to the effort to make it.
 
-- 
Regards, Euan Thoms 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?72b3-55792000-1f-6b8b4580>