aboutsummaryrefslogtreecommitdiffstats
path: root/main/awstats
diff options
context:
space:
mode:
authorsroracle <maxcrees@me.com>2017-06-14 02:46:39 -0400
committerNatanael Copa <ncopa@alpinelinux.org>2017-06-14 10:53:49 +0000
commitc1280b74c328395ec8c01fa00e77803de1418ead (patch)
treeda75f701a92065a6d6c38923a4de27bba1b2ab81 /main/awstats
parent2f0b3e329f7154a6dac4bb9894c2fd9970106b4e (diff)
downloadaports-c1280b74c328395ec8c01fa00e77803de1418ead.tar.bz2
aports-c1280b74c328395ec8c01fa00e77803de1418ead.tar.xz
main/awstats: fix default include path
If awstats is called as /usr/bin/awstats.pl, @PossibleLibDir (see e.g. line 2236 in awstats.pl) will be ( "/usr/bin/lib", "/usr/share/awstats/lib" ), neither of which exist on alpine. Add sed to change /usr/share/awstats to /usr/lib/awstats/cgi-bin in order to properly find the /lang, /lib, and /plugins directories in /cgi-bin when called from /usr/bin.
Diffstat (limited to 'main/awstats')
-rw-r--r--main/awstats/APKBUILD5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/awstats/APKBUILD b/main/awstats/APKBUILD
index 746e2230f4..7ad1f95f0f 100644
--- a/main/awstats/APKBUILD
+++ b/main/awstats/APKBUILD
@@ -20,6 +20,11 @@ prepare() {
sed -e "s:/usr/local/$pkgname/wwwroot:/usr/lib/$pkgname:g" \
-i "$file"
done
+ for file in wwwroot/cgi-bin/*; do
+ [ -f "${file}" ] || continue
+ sed -e "s:/usr/share/$pkgname:/usr/lib/$pkgname/cgi-bin:g" \
+ -i "$file"
+ done
}
package() {