--- popularity-contest-1.3/debian/cron.weekly	2002-02-21 06:10:58.000000000 -0800
+++ popularity-contest-1.3-patched/debian/cron.weekly	2002-11-02 15:06:33.000000000 -0800
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # don't run if this package is removed but not purged
-if [ ! -f /usr/sbin/popularity-contest ]; then
+if [ ! -f @PREFIX@/sbin/popularity-contest ]; then
 	exit 0
 fi
 
@@ -11,7 +11,7 @@
 unset PARTICIPATE
 
 # get configuration information
-. /etc/popularity-contest.conf
+. @PREFIX@/etc/popularity-contest.conf
 
 # don't run if MAILTO address is blank!
 if [ -z "$MAILTO" ]; then exit 0; fi
@@ -20,7 +20,7 @@
 [ "$PARTICIPATE" = "no" -o -z "$PARTICIPATE" ] && exit 0
 
 # keep old logs
-cd /var/log
+cd @PREFIX@/var/log
 umask 022
 savelog -c 7 popularity-contest >/dev/null
 
@@ -33,7 +33,7 @@
 	echo "To: $MAILTO"
 	echo "Subject: popularity-contest submission"
 	echo
-	su nobody -pc "sh -c /usr/sbin/popularity-contest"
+	sh -c "@PREFIX@/sbin/popularity-contest"
 }
 
 do_sendmail()
@@ -48,5 +48,5 @@
 # generate and transmit the popularity contest data
 
 run_popcon \
-	| tee /var/log/popularity-contest \
+	| tee @PREFIX@/var/log/popularity-contest \
 	| do_sendmail
--- popularity-contest-1.3-patched/popularity-contest	2002-11-02 02:11:39.000000000 -0800
+++ popularity-contest-1.3/popularity-contest	2002-11-02 15:12:38.000000000 -0800
@@ -6,17 +6,17 @@
 #
 
 # the set of installed packages is the set of all .list files in
-# /var/lib/dpkg/info, with pathnames and .list suffix removed.
+# @PREFIX@/var/lib/dpkg/info, with pathnames and .list suffix removed.
 #
 # Store that list in $PACKAGES.
 #
-. /etc/popularity-contest.conf
+. @PREFIX@/etc/popularity-contest.conf
 if [ -z "$MY_HOSTID" ]; then
-	echo "You must set MY_HOSTID in /etc/popularity-contest.conf!" >&2
+	echo "You must set MY_HOSTID in @PREFIX@/etc/popularity-contest.conf!" >&2
 	exit 1
 fi
 
-DI=/var/lib/dpkg/info
+DI=@PREFIX@/var/lib/dpkg/info
 PACKAGES=$(dpkg-awk "Status: .* installed" -- Package \
 		| grep '^Package:' | sed 's/^Package: //')
 
--- popularity-contest-1.3/popanal.py	2001-08-19 11:30:03.000000000 -0700
+++ popularity-contest-1.3-patched/popanal.py	2002-11-02 16:00:53.000000000 -0800
@@ -144,7 +144,7 @@
 	    if not votelist.has_key(package):
 		if not complained.has_key(package):
 			ewrite(('Warning: package %s not in '
-				+ '/var/lib/dpkg/available')  % package)
+				+ '@PREFIX@/var/lib/dpkg/available')  % package)
 			complained[package] = 1
 		votelist[package] = Vote()
 		sectlist[UNKNOWN].append(package)
@@ -198,9 +198,9 @@

 # main program

-for d in glob.glob('/org/ftp.debian.org/ftp/dists/stable/*/binary-i386/Packages'):
+for d in glob.glob('@PREFIX@/fink/10.2/stable/*/binary-darwin-powerpc/Packages'):
     read_depends(d)
-for d in glob.glob('/org/ftp.debian.org/ftp/dists/unstable/*/binary-i386/Packages'):
+for d in glob.glob('@PREFIX@/fink/10.2/unstable/*/binary-darwin-powerpc/Packages'):
     read_depends(d)
 read_submissions(sys.stdin)

--- popularity-contest-1.3/popcon-process.sh	2000-11-01 08:47:50.000000000 -0800
+++ popularity-contest-1.3-patched/popcon-process.sh	2002-11-08 21:01:20.000000000 -0800
@@ -1,7 +1,8 @@
 #!/bin/bash
 set -e
 PATH=$HOME/bin:$PATH
-cd $HOME
+POPDIR=/Library/WebServer/Documents/popcon
+cd $POPDIR
 
 # rotate files
 rm -rf popcon-entries.old
@@ -12,21 +13,21 @@
 chmod og-rwx new-popcon-entries
 
 # process entries
-prepop.py <new-popcon-entries.old >$HOME/prepop.out
+@PREFIX@/share/popularity-contest/scripts/prepop.py <new-popcon-entries.old >$POPDIR/prepop.out
 
 # delete outdated entries
-find $HOME/popcon-entries -type f -mtime +10 | xargs rm -f
+find $POPDIR/popcon-entries -type f -mtime +10 | xargs rm -f
 
 # analyze results
-cd public_html/popcon/results
+cd $POPDIR/results
 rm -f results.*
-find $HOME/popcon-entries -type f | wc -l >../num-submissions
-find $HOME/popcon-entries -type f | xargs cat \
-	| nice -15 popanal.py >$HOME/popanal.out 2>&1
+find $POPDIR/popcon-entries -type f | wc -l >../num-submissions
+find $POPDIR/popcon-entries -type f | xargs cat \
+	| nice -15 @PREFIX@/share/popularity-contest/scripts/popanal.py >$POPDIR/popanal.out 2>&1
 cd ..
 make clean >/dev/null
 make >/dev/null
 
 # upload web page to www.debian.org
-cd $HOME
-rsync -aze ssh public_html people.debian.org: </dev/null
+#cd $HOME
+#rsync -aze ssh public_html people.debian.org: </dev/null
