Hi,

Here is the Makefile.sfw for a plain vanila squid (none of the optional
modules are enabled.)

The relevant portions of Makefile.sfw, install-squid and Targetdirs below.
The squid runs correctly if I copy /**/squid/** to corresponding root
dirs after [make -f Makefile.sfw all install]. but have not built the
package yet.

Do let me know if I am in the right direction.

/space/sfw/usr/src/cmd/squid
==========================================================
Makefile.sfw
==========================================================
VER=squid-2.5.STABLE14

all: $(VER)/config.status
    (cd $(VER); env \
        PATH=/usr/perl5/bin:/usr/sfw/bin:$(PATH) \
        MAKE=/usr/ccs/bin/make \
        /usr/ccs/bin/make 2>&1) | sed -e "/rror hides QUICK_SELECT:/d"
    @find . -name core -exec rm -f {} \;

include ../Makefile.cmd

install: all
    $(SH) ./install-squid

$(VER)/config.status: $(VER)/configure
    (cd $(VER); env \
        PATH=/usr/perl5/bin:/usr/sfw/bin:$(PATH) \
        "CC=$(CC)" \
        "CXX=$(CCC)" \
        "CFLAGS=-xstrconst -mt" \
        "CXXFLAGS=-mt -norunpath -L$(ROOT)/usr/sfw/lib" \
        "CPPFLAGS=-I$(ROOT)/usr/sfw/include" \
        "LDFLAGS=-R/usr/sfw/lib -L/usr/sfw/lib" \
        MAKE=/usr/ccs/bin/make \
    /bin/ksh ./configure \
        --sysconfdir=/etc/squid \
        --sharedstatedir=/var/squid \
        --localstatedir=/var/squid \
        --libexecdir=/usr/squid/libexec \
        --prefix=/usr/squid)

$(VER)/configure: $(VER).tar.gz
    /usr/bin/gzip -dc $(VER).tar.gz | \
        $(GTAR) xpf - --no-same-owner
    touch $(VER)/configure
    find $(VER) -type d -exec /usr/bin/chmod 755 "{}" \;
    find $(VER) -type f -exec /usr/bin/chmod ugo+r "{}" \;

clean:
    -rm -rf $(VER)

include ../Makefile.targ

.SUFFIXES:

FRC:
==========================================================
install-squid
==========================================================
ins_file() {
    iprog=$1
    idir=$2
    imode=$3
    _install N ${iprog} ${idir}/${iprog} ${imode}
}

install_config() {
    cd src
    ins_file squid.conf.default ${CONFDIR} 644
    ins_file mime.conf.default ${CONFDIR} 644
    cd ..
}

install_shared() {
    cd src
    ins_file mib.txt ${SHAREDIR} 644
    cd ../icons
    for i in *.gif
    do
        ins_file $i ${SHAREDIR}/icons 644
    done
    cd ..
}

install_errtxt() {
    cd errors
    for i in `ls -p | grep '\/$'|sed 's/\/$//'`
    do
        cd $i
        for j in *
        do
            ins_file $j ${SHAREDIR}/errors/$i 644
        done
        cd ..
    done
    cd ..
}

install_man() {
    cd doc
    for i in squid.8 cachemgr.cgi.8
    do
        ins_file $i ${MAN8DIR} 644
    done
    cd ..
}

install_cachemgmt() {
    cd scripts
    ins_file RunCache ${BINDIR} 555
    ins_file RunAccel ${BINDIR} 555
    cd ..
}

install_internal() {
    cd src
    ins_file squidclient ${BINDIR} 555
    ins_file unlinkd ${LIBEXECDIR} 555
    ins_file cachemgr.cgi ${LIBEXECDIR} 555
    cd ..
}

install_standalone() {
    cd src
    ins_file squid ${SBINDIR} 555
    cd ..
}

# START HERE
PKGVERS=`sed -ne '/VER=/s/.*=//p' Makefile.sfw`
PREFIX=${ROOT}/usr/squid # Going with the apache style.
BINDIR=${PREFIX}/bin
SBINDIR=${PREFIX}/sbin
LIBEXECDIR=${PREFIX}/libexec
SHAREDIR=${PREFIX}/share
INFODIR=${PREFIX}/share/info
CONFDIR=${ROOT}/etc/squid
MAN8DIR=${PREFIX}/man/man8

. ${SRC}/tools/install.subr



cd ${PKGVERS}

install_config
install_shared
install_errtxt
install_man
install_cachemgmt
install_internal
install_standalone

==========================================================
Targetdirs with context.
==========================================================
    /etc/pgsql \
+   /etc/squid \
    /etc/sfw \

    /usr/lib/tk8.4/msgs \
+   /usr/squid \
+   /usr/squid/bin \
+   /usr/squid/libexec \
+   /usr/squid/sbin \
+   /usr/squid/share \
+   /usr/squid/share/errors \
+   /usr/squid/share/errors/Azerbaijani \
+   /usr/squid/share/errors/Bulgarian \
+   /usr/squid/share/errors/Catalan \
+   /usr/squid/share/errors/Czech \
+   /usr/squid/share/errors/Danish \
+   /usr/squid/share/errors/Dutch \
+   /usr/squid/share/errors/English \
+   /usr/squid/share/errors/Estonian \
+   /usr/squid/share/errors/Finnish \
+   /usr/squid/share/errors/French \
+   /usr/squid/share/errors/German \
+   /usr/squid/share/errors/Greek \
+   /usr/squid/share/errors/Hebrew \
+   /usr/squid/share/errors/Hungarian \
+   /usr/squid/share/errors/Italian \
+   /usr/squid/share/errors/Japanese \
+   /usr/squid/share/errors/Korean \
+   /usr/squid/share/errors/Lithuanian \
+   /usr/squid/share/errors/Polish \
+   /usr/squid/share/errors/Portuguese \
+   /usr/squid/share/errors/Romanian \
+   /usr/squid/share/errors/Russian-1251 \
+   /usr/squid/share/errors/Russian-koi8-r \
+   /usr/squid/share/errors/Serbian \
+   /usr/squid/share/errors/Simplify_Chinese \
+   /usr/squid/share/errors/Slovak \
+   /usr/squid/share/errors/Spanish \
+   /usr/squid/share/errors/Swedish \
+   /usr/squid/share/errors/Traditional_Chinese \
+   /usr/squid/share/errors/Turkish \
+   /usr/squid/share/icons \
+   /usr/squid/info \
+   /usr/squid/man \
+   /usr/squid/man/man8 \
    /usr/sbin \

    /var/lib/pgsql/backups \
+   /var/squid \
+   /var/squid/logs \
    /var/samba \

==========================================================

I have a work space running at IEC (hokus-pokus.india.sun.com -
/export/sfw) using the workspace tools at /ws/onnv-tools/  It is
hosted over siva.india.sun.com (zone) so there is not much problem of
messing it up if any one wants to use it. The siva.india.sun.com also
has a build environment setup - built from the opensolaris tarball.

                                    rahul
--
1. e4 _

Reply via email to