From owner-freebsd-questions@FreeBSD.ORG Wed Nov 17 21:01:59 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95542106566B for ; Wed, 17 Nov 2010 21:01:59 +0000 (UTC) (envelope-from rfarmer@predatorlabs.net) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5C4C28FC0C for ; Wed, 17 Nov 2010 21:01:59 +0000 (UTC) Received: by qwi4 with SMTP id 4so302014qwi.13 for ; Wed, 17 Nov 2010 13:01:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.201.137 with SMTP id fa9mr8802864qab.10.1290027718497; Wed, 17 Nov 2010 13:01:58 -0800 (PST) Received: by 10.220.16.199 with HTTP; Wed, 17 Nov 2010 13:01:58 -0800 (PST) X-Originating-IP: [128.95.133.113] In-Reply-To: <4CE416D0.2020105@zedat.fu-berlin.de> References: <4CE416D0.2020105@zedat.fu-berlin.de> Date: Wed, 17 Nov 2010 13:01:58 -0800 Message-ID: From: Rob Farmer To: "O. Hartmann" Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-questions@freebsd.org Subject: Re: porting software to FreeBSD, what to do if Makefile lacks? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 21:01:59 -0000 2010/11/17 O. Hartmann : > Hello. > > I try to create a port of a software which does not have a Makefile and is > build via a propriate csh script. Installation is done temporarely into some > lib's and exe's subfolder withing the source folder, so I need to tell the > top level Makefile of the port to use a specific build script instead > implying having Makefile and a home-brewn install script, which takes the > binaries and libs out of the temporary folders and install them at the > proper places within the FreeBSD's tree. How can I perform these two tasks? You want to override the do-build target, something like: do-build: ${CSH} ${WRKSRC}/build-script.csh For the install, do the same with the do-install target. Unless your install script is particularly long or complicated, it will probably be best to put it right into the port's Makefile. Then you can use the INSTALL macros to ensure permissions are set correctly, binaries are stripped if the user doesn't specify WITH_DEBUG, etc. If you haven't already, check out the Porter's Handbook - it will familiarize you with important guidelines and covers a lot of common problems: http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/ -- Rob Farmer