summaryrefslogtreecommitdiffstats
path: root/awstats/PKGBUILD
blob: 39d587f3ae3b69b19a57f8db47829b0acb3c7399 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Committer: Piotr Beling <qwak@w8.pl>

pkgname=awstats
pkgver=6.9
pkgrel=1
pkgdesc="tool that generates web, streaming, ftp and mail server statistics, graphically"
arch=(any)
license=(GPL)
url="http://awstats.sourceforge.net/"
depends=('perl')
source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz awstats)
install=awstats.install
backup=('etc/awstats/awstats.model.conf' 'etc/httpd/conf/extra/httpd-awstats.conf')

build() {
    local RPM_BUILD_ROOT=${startdir}/pkg
    local _sysconfdir=etc
    cd ${startdir}/src/awstats-${pkgver}
    
    #next lines comes from http://awstats.sourceforge.net/files/awstats.spec, with % -> $ and some other archlinux specyfic modyfications
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/tools
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/tools/webmin
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/tools/xslt
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/classes
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/classes/src
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lib
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/plugins
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/plugins/example
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/css
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/browser
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/clock
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/cpu
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/flags
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/mime
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/os
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/other
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/js
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_f
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_m
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_w
    #mkdir -p $RPM_BUILD_ROOT/usr/share/awstats/lang
    #mkdir -p $RPM_BUILD_ROOT/usr/share/awstats/man
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/docs
    mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/docs/images
    mkdir -p $RPM_BUILD_ROOT/${_sysconfdir}/awstats
    mkdir -p $RPM_BUILD_ROOT/${_sysconfdir}/cron.hourly
    mkdir -p $RPM_BUILD_ROOT/${_sysconfdir}/httpd/conf/extra
    mkdir -p $RPM_BUILD_ROOT/var/lib/awstats
    
    #Arch linux specyfic path:
    install -m 644 tools/httpd_conf $RPM_BUILD_ROOT/${_sysconfdir}/httpd/conf/extra/httpd-awstats.conf
    install -m 744 ../awstats $RPM_BUILD_ROOT/${_sysconfdir}/cron.hourly/awstats

    install -m 755 tools/logresolvemerge.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/logresolvemerge.pl
    install -m 755 tools/maillogconvert.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/maillogconvert.pl
    install -m 755 tools/urlaliasbuilder.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/urlaliasbuilder.pl
    install -m 755 tools/awstats_buildstaticpages.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/awstats_buildstaticpages.pl
    install -m 755 tools/awstats_configure.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/awstats_configure.pl
    install -m 755 tools/awstats_exportlib.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/awstats_exportlib.pl
    install -m 755 tools/awstats_updateall.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/awstats_updateall.pl
    install -m 755 tools/webmin/* $RPM_BUILD_ROOT/usr/local/awstats/tools/webmin
    install -m 755 tools/xslt/* $RPM_BUILD_ROOT/usr/local/awstats/tools/xslt
    install -m 755 wwwroot/classes/awgraphapplet.jar $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/classes/awgraphapplet.jar
    install -m 755 wwwroot/classes/src/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/classes/src
    install -m 755 wwwroot/cgi-bin/awstats.pl $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/awstats.pl
    install -m 755 wwwroot/cgi-bin/awredir.pl $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/awredir.pl
    install -m 755 wwwroot/cgi-bin/lib/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lib
    install -m 755 wwwroot/cgi-bin/plugins/*.pm $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/plugins
    install -m 755 wwwroot/cgi-bin/plugins/example/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/plugins/example
    install -m 644 wwwroot/cgi-bin/awstats.model.conf $RPM_BUILD_ROOT/${_sysconfdir}/awstats/awstats.model.conf
    install -m 444 wwwroot/css/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/css
    install -m 444 wwwroot/icon/browser/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/browser
    install -m 444 wwwroot/icon/clock/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/clock
    install -m 444 wwwroot/icon/cpu/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/cpu
    install -m 444 wwwroot/icon/flags/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/flags
    install -m 444 wwwroot/icon/mime/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/mime
    install -m 444 wwwroot/icon/os/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/os
    install -m 444 wwwroot/icon/other/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/other
    install -m 444 wwwroot/js/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/js
    install -m 444 wwwroot/cgi-bin/lang/tooltips_f/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_f
    install -m 444 wwwroot/cgi-bin/lang/tooltips_m/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_m
    install -m 444 wwwroot/cgi-bin/lang/tooltips_w/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_w
    install -m 444 wwwroot/cgi-bin/lang/awstats* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang
    install -m 444 README.TXT  $RPM_BUILD_ROOT/usr/local/awstats/README.TXT
    #install -m 644 README.TXT  $RPM_BUILD_ROOT/usr/share/awstats/man
    install -m 444 docs/*.* $RPM_BUILD_ROOT/usr/local/awstats/docs
    install -m 444 docs/images/* $RPM_BUILD_ROOT/usr/local/awstats/docs/images
    
    #echo "deny from all" > $RPM_BUILD_ROOT/.htaccess
}

md5sums=('fc19dbb8449eccf3300efb30ca3376cb'
         '3f81c7ec3a5cc64a669ff98303089b2b')