On Fri, 16 Mar 2001, Ben Hyatt wrote:

> So, in source /usr/local/src/amanda-2.4.1p1/example/config.site
> add the CFLAGS entry, run configure and rebuild? (make clean, make && make
> install)

here's how i do it (for amanda, and similarly for other packages)...

mkdir /usr/local/src/amanda
mkdir /usr/local/src/amanda/2.4.2p1
create /usr/local/src/amanda/2.4.2p1/Makefile (attached)
create /usr/local/src/amanda/2.4.2p1/config.site (attached)
create /usr/local/src/amanda/2.4.2p1/amanda-2.4.2p1.tar.gz (distribution)
cd /usr/local/src/amanda/2.4.2p1
make >&! 0-make-log &

then you have a record of exactly how you configured and built amanda-X in
the Makefile and config.site.  to rebuild at any time, just make again.
it's a very easy way to maintain local builds of software packages.

--
Todd Pfaff                         \  Email: [EMAIL PROTECTED]
Computing and Information Services  \ Voice: (905) 525-9140 x22920
ABB 132                              \  FAX: (905) 528-3773
McMaster University                   \
Hamilton, Ontario, Canada  L8S 4M1     \

PACKAGE=amanda
VERSION=2.4.1p1
RELEASE=${PACKAGE}-${VERSION}
SHELL=/bin/sh
CONFIG_SITE=/usr/local/src/amanda/${VERSION}/config.site

#all: clean unpack patch build-client build-server install-client install-server
server: clean unpack patch build-server
client: clean unpack patch build-client

clean:
        /bin/rm -rf ${RELEASE}

unpack:
        umask 022;\
        gnutar zxf ${RELEASE}.tar.gz;\
        chown -R 0.0 ${RELEASE}

patch:
        umask 022;\
        patch -p0 -t < patches/samba2-20000418.diff

build-client:
        umask 022;\
        cd ${RELEASE};\
        CONFIG_SITE=$(CONFIG_SITE); export CONFIG_SITE;\
        ./configure \
        --without-server \
        ;\
        make

build-server:
        umask 022;\
        cd ${RELEASE};\
        CONFIG_SITE=$(CONFIG_SITE); export CONFIG_SITE;\
        ./configure \
        ;\
        make

install-client:
        umask 022;\
        cd ${RELEASE};\
        make install;\
        cd /usr/local/amanda/lib;\
        ln -s libamanda-2.4.1p1.so.0.0.0 libamanda-2.4.1p1.so;\
        ln -s libamclient-2.4.1p1.so.0.0.0 libamclient-2.4.1p1.so;\
        ln -s libamserver-2.4.1p1.so.0.0.0 libamserver-2.4.1p1.so;\
        ln -s libamtape-2.4.1p1.so.0.0.0 libamtape-2.4.1p1.so;\
        mkdir -p /usr/local/amanda/etc/gnutar-lists;\
        chown backup.backup /usr/local/amanda/etc/gnutar-lists

install-server: install-client

install: install-client

# see srcdir/examples/config.site for details
CC=cc
CFLAGS=-DIGNORE_SMBCLIENT_ERRORS
sbindir=$prefix/bin
CONFIG_DIR=$prefix/etc
DEFAULT_SERVER=amandahost
FORCE_USERID=yes
CLIENT_LOGIN=backup
SETUID_GROUP=backup
USE_RUNDUMP=yes
SAMBA_CLIENT=/usr/local/samba/bin/smbclient
GNUTAR=$prefix/libexec/gnutar
GNUTAR_LISTDIR=$CONFIG_DIR/gnutar-lists
BSD_SECURITY=yes
USE_AMANDAHOSTS=yes

Reply via email to