Subject: [alpine-aports] [PATCH] main/awstats: upgrade to 7.6

From: Valery Kartel <[email-masked]>
Date: Wed, 18 Jan 2017 18:25:27 +0200

fixes in APKBUILD
---
 main/awstats/APKBUILD | 63 +++++++++++++++++++++++----------------------------
 1 file changed, 28 insertions(+), 35 deletions(-)

diff --git a/main/awstats/APKBUILD b/main/awstats/APKBUILD
index b85f953021..746e2230f4 100644
--- a/main/awstats/APKBUILD
+++ b/main/awstats/APKBUILD
@@ -1,61 +1,54 @@
+# Contributor: Valery Kartel <[email-masked]>
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=awstats
-pkgver=7.5
-pkgrel=1
-pkgdesc="AWStats is short for Advanced Web Statistics."
+pkgver=7.6
+pkgrel=0
+pkgdesc="Free real-time logfile analyzer to get advanced statistics"
 url="http://awstats.sourceforge.net/"
 arch="noarch"
-license="GPL2+"
+license="GPLv3+"
 depends="perl perl-uri"
 subpackages="$pkgname-doc"
-source="https://prdownloads.sourceforge.net/awstats/awstats-$pkgver.tar.gz"
-builddir="$srcdir"/$pkgname-$pkgver
+source="https://prdownloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$pkgname-$pkgver"
 
 prepare() {
 	local file
 	cd "$builddir"
 	for file in tools/* wwwroot/cgi-bin/*; do
 		[ -f "${file}" ] || continue
-		sed -e "s:/usr/local/awstats/wwwroot:/usr/lib/awstats:g" \
+		sed -e "s:/usr/local/$pkgname/wwwroot:/usr/lib/$pkgname:g" \
 			-i "$file"
 	done
 }
 
-build() {
-	return 0
-}
-
 package() {
 	cd "$builddir"
-#	logpath="awstats_log"
-#	sed -e "s|^\(LogFile=\).*$|\1\"/var/log/${logpath}\"|" \
-#	-e "s|^\(SiteDomain=\).*$|\1\"localhost\"|"
-#	-e "s|^\(DirIcons=\).*$|\1\"/awstats/icon\"|"
-#	-e "s|^\(DirCgi=\).*$|\1\"/cgi-bin\"|" 
-#	-i "${S}"/wwwroot/cgi-bin/awstats.model.conf || die "sed failed"
-#	if use ipv6; then
-#	sed -e "s|^#\(LoadPlugin=\"ipv6\"\)$|\1|" -i "${S}"/wwwroot/cgi-bin/awstats.model.conf || die "sed failed"
-#	fi
-	
-	install -d "$pkgdir"/usr/share/doc/awstats \
-		"$pkgdir"/var/lib/awstats \
-		"$pkgdir"/usr/lib/awstats \
-		"$pkgdir"/usr/bin \
-		"$pkgdir"/etc/awstats
+	install -d "$pkgdir"/usr/share/doc/$pkgname \
+		"$pkgdir"/var/lib/$pkgname \
+		"$pkgdir"/usr/lib/$pkgname \
+		"$pkgdir"/etc/$pkgname \
+		"$pkgdir"/usr/bin
+
 	# docs
-	cp -a docs tools/xslt "$pkgdir"/usr/share/doc/awstats || return 1
+	cp -a docs tools/xslt "$pkgdir"/usr/share/doc/$pkgname || return 1
 
 	# cgi-bin
-	cp -a wwwroot/* "$pkgdir"/usr/lib/awstats
-	mv "$pkgdir"/usr/lib/awstats/cgi-bin/awstats.model.conf \
+	cp -a wwwroot/* "$pkgdir"/usr/lib/$pkgname
+	mv "$pkgdir"/usr/lib/$pkgname/cgi-bin/$pkgname.model.conf \
 		"$pkgdir"/etc/awstats/
-	ln -s /etc/aswtats/awstats \
-		"$pkgdir"/usr/lib/awstats/cgi-bin/awstats.model.conf
+	ln -s /etc/$pkgname/$pkgname.model.conf \
+		"$pkgdir"/usr/lib/$pkgname/cgi-bin/$pkgname.model.conf
 
 	# tools
 	cp tools/*.pl "$pkgdir"/usr/bin/ || return 1
-	ln -s /usr/lib/awstats/cgi-bin/awstats.pl "$pkgdir"/usr/bin/
+	ln -s /usr/lib/$pkgname/cgi-bin/$pkgname.pl "$pkgdir"/usr/bin/
+
+	# remove java sources and example plugin
+	rm -fr "$pkgdir"/usr/lib/$pkgname/classes/src \
+		"$pkgdir"/usr/lib/$pkgname/cgi-bin/plugins/example
 }
-md5sums="1b11916a0a369a014abeb128289bf6b9  awstats-7.5.tar.gz"
-sha256sums="83c34bdeab9c277c14bea348c2d320f4a1e808388264139821c6bd6dfd1394f8  awstats-7.5.tar.gz"
-sha512sums="d69a66b5ef94d8a7378ece0453a3617f71ad030d81c45cff926fae1319eacdcdcbe2e68513153cd7444d77cbb950827964b0157ce74c04be76781c071f016a35  awstats-7.5.tar.gz"
+
+md5sums="c69977f938be594b81fdb5e065846d31  awstats-7.6.tar.gz"
+sha256sums="4045501319bf99e223bdb492a68a8f08b8e814b0f144a008726d7bd59114167a  awstats-7.6.tar.gz"
+sha512sums="ebce29dcbdc1f0eef68f1faf6a511212daba3e3621db682dce692dffa584e0c456fb260b9f8e1b7ac25a2a7d5d2bea5034692d2395d4e56a16fa5a36844c79d5  awstats-7.6.tar.gz"
-- 
2.11.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---