Subject: Re: www/adzap
To: =?iso-8859-2?Q?Micha=B3?= Pasternak <michal@pasternak.w.lub.pl>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 06/13/2003 08:59:38
On Fri, 13 Jun 2003, [iso-8859-2] Micha=B3 Pasternak wrote:

> This is the diff. I used all hints you gave me, but it doesn't install
> /usr/pkg/etc/adzap.conf.

I don't know why. But the following patch works fine for me.

   Jeremy C. Reed

Index: www/adzap/MESSAGE
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/www/adzap/MESSAGE,v
retrieving revision 1.2
diff -b -u -r1.2 MESSAGE
--- www/adzap/MESSAGE=092002/09/24 12:30:41=091.2
+++ www/adzap/MESSAGE=092003/06/13 15:57:41
@@ -1,13 +1,13 @@
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
 $NetBSD: MESSAGE,v 1.2 2002/09/24 12:30:41 wiz Exp $

-  Adzap has now been installed.  To get it up and running, copy
-  ${PREFIX}/share/examples/adzap/adzap.conf to /etc and modify
-  it to match your setup.  Then edit your squid configuration and
-  add ${PREFIX}/libexec/adzap as your http-redirector.
+  Adzap has now been installed.  To get it up and running, modify
+  ${PKG_SYSCONFDIR}/adzap.conf to match your setup.  Then edit your
+  squid configuration and add ${PREFIX}/libexec/adzap as your
+  http-redirector.

   If you run a web server, you can copy the *.{html,js,gif,swf,mp3}
   files from ${PREFIX}/share/examples/adzap to your htdocs tree and
-  modify the web locations in /etc/adzap.conf accordingly.
+  modify the web locations in ${PKG_SYSCONFDIR}/adzap.conf accordingly.

 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
Index: www/adzap/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/www/adzap/Makefile,v
retrieving revision 1.36
diff -b -u -r1.36 Makefile
--- www/adzap/Makefile=092003/06/02 06:32:38=091.36
+++ www/adzap/Makefile=092003/06/13 15:57:41
@@ -14,31 +14,38 @@

 NO_BUILD=3D=09# defined
 USE_PERL5=3D=09# defined
+USE_PKGINSTALL=3D=09YES

+EGDIR=3D=09=09${PREFIX}/share/examples/adzap
+CONF_FILES=3D=09${EGDIR}/adzap.conf ${PKG_SYSCONFDIR}/adzap.conf
+
+MESSAGE_SUBST+=3D=09EGDIR=3D${EGDIR}
+#MESSAGE_SUBST+=3D=09PKG_SYSCONFDIR=3D${PKG_SYSCONFDIR}
+
 do-configure:
 .for FILE in scripts/squid_redirect scripts/wrapzap
 =09${CP} ${WRKSRC}/${FILE} ${WRKSRC}/${FILE}.ORIG
 =09${SED} -e "s:/usr/bin/perl:${PERL5}:g" \
 =09       -e "s:@@PREFIX@@:${PREFIX}:g" \
+=09       -e "s:@@PKG_SYSCONFDIR@@:${PKG_SYSCONFDIR}:g" \
 =09=09<${WRKSRC}/${FILE}.ORIG >${WRKSRC}/${FILE}
 .endfor

 do-install:
 =09${INSTALL_SCRIPT} ${WRKSRC}/scripts/squid_redirect ${PREFIX}/libexec
 =09${INSTALL_SCRIPT} ${WRKSRC}/scripts/wrapzap ${PREFIX}/libexec/adzap
-=09${INSTALL_DATA_DIR} ${PREFIX}/share/examples/adzap
+=09${INSTALL_DATA_DIR} ${EGDIR}
 .for FILE in ad-clear.gif ad-clear.mp3 ad-clear.swf ad-grey.gif ad-old.gif=
 \
     ad.gif ad.mp3 ad.swf adbg-clear.gif adbg.gif \
     closepopup-clear.html closepopup.html counter-clear.gif counter.gif \
     no-op-clear.html no-op-clear.js no-op-counter-clear.html \
     no-op-counter-clear.js no-op-counter.html no-op-counter.js \
     no-op.html no-op.js webbug-clear.gif webbug-clear.js webbug.gif webbug=
=2Ejs
-=09${INSTALL_DATA} ${WRKSRC}/zaps/${FILE} ${PREFIX}/share/examples/adzap
+=09${INSTALL_DATA} ${WRKSRC}/zaps/${FILE} ${EGDIR}
 .endfor
 .for FILE in proxy-cisra.pac proxy-home.pac proxy-zip.pac
-=09${INSTALL_DATA} ${WRKSRC}/rc/${FILE} ${PREFIX}/share/examples/adzap
+=09${INSTALL_DATA} ${WRKSRC}/rc/${FILE} ${EGDIR}
 .endfor
-=09${INSTALL_DATA} ${WRKSRC}/scripts/adzap.conf \
-=09    ${PREFIX}/share/examples/adzap
+=09${INSTALL_DATA} ${WRKSRC}/scripts/adzap.conf ${EGDIR}

 .include "../../mk/bsd.pkg.mk"
Index: www/adzap/distinfo
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/www/adzap/distinfo,v
retrieving revision 1.24
diff -b -u -r1.24 distinfo
--- www/adzap/distinfo=092003/06/02 06:32:38=091.24
+++ www/adzap/distinfo=092003/06/13 15:57:41
@@ -2,5 +2,5 @@

 SHA1 (adzap-20030525.tar.gz) =3D 04e0dce5254f863ec28f3ec8c89c18b273c162f1
 Size (adzap-20030525.tar.gz) =3D 33375 bytes
-SHA1 (patch-aa) =3D c39f5914c75fae2517a739e34791a7769f4d6917
+SHA1 (patch-aa) =3D c807d21a0a8ee6adde852a9461b8e9113152fc20
 SHA1 (patch-ab) =3D 327f0d8d4d692115c43d9c8a5f2eecd7cf2b3848
Index: www/adzap/patches/patch-aa
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/www/adzap/patches/patch-aa,v
retrieving revision 1.11
diff -b -u -r1.11 patch-aa
--- www/adzap/patches/patch-aa=092003/01/22 12:52:35=091.11
+++ www/adzap/patches/patch-aa=092003/06/13 15:57:41
@@ -38,7 +38,7 @@
 -STUBURL_WEBBUGJS=3D$ZAP_BASE/webbug.js
 +zapper=3D@@PREFIX@@/libexec/squid_redirect
 +
-+. /etc/adzap.conf
++. @@PKG_SYSCONFDIR@@/adzap.conf

  export ZAP_MODE ZAP_BASE ZAP_BASE_SSL ZAP_PREMATCH ZAP_POSTMATCH ZAP_MATC=
H
  export STUBURL_AD STUBURL_ADSSL STUBURL_ADJS STUBURL_ADHTML STUBURL_ADMP3=
 \