~vcs-imports/ipfire/ipfire-2.x

« back to all changes in this revision

Viewing changes to lfs/squid-accounting

  • Committer: Dirk Wagner
  • Date: 2014-08-11 19:05:14 UTC
  • mfrom: (4405.1.185)
  • Revision ID: git-v1:f5480b13dd11f35cb6792c9f3cc867a1c0cff158
Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into asterisk-update

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
###############################################################################
 
2
# IPFire.org    - An Open Source Firewall Solution                            #
 
3
# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
 
4
###############################################################################
 
5
 
 
6
###############################################################################
 
7
# Definitions
 
8
###############################################################################
 
9
 
 
10
include Config
 
11
 
 
12
VER        = 1.0.1
 
13
 
 
14
THISAPP    = squid-accounting-$(VER)
 
15
DIR_APP    = $(DIR_SRC)/$(THISAPP)
 
16
TARGET     = $(DIR_INFO)/$(THISAPP)
 
17
PROG       = squid-accounting
 
18
PAK_VER    = 2
 
19
 
 
20
DEPS       = "perl-DBI perl-DBD-SQLite perl-File-ReadBackwards perl-PDF-API2 sendEmail"
 
21
 
 
22
###############################################################################
 
23
# Top-level Rules
 
24
###############################################################################
 
25
 
 
26
install : $(TARGET)
 
27
 
 
28
check : 
 
29
 
 
30
download :
 
31
 
 
32
md5 : 
 
33
 
 
34
dist: 
 
35
        @$(PAK)
 
36
 
 
37
###############################################################################
 
38
# Installation Details
 
39
###############################################################################
 
40
 
 
41
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 
42
        @$(PREBUILD)
 
43
        @rm -rf $(DIR_APP) && mkdir $(DIR_APP) && cp -R $(DIR_SRC)/src/squid-accounting/ $(DIR_APP)
 
44
        cd $(DIR_APP)
 
45
        mkdir -p /var/ipfire/accounting/bill
 
46
        mkdir -p /srv/web/ipfire/html/accounting/logo
 
47
 
 
48
#Touch Logfile
 
49
        touch /var/log/accounting.log
 
50
        chmod 777 /var/log/accounting.log
 
51
#Set permissions for logo and graphs
 
52
        chmod -R 777 /srv/web/ipfire/html/accounting
 
53
                
 
54
        
 
55
        install -v -m 755 $(DIR_APP)/squid-accounting/accounting.cgi /srv/web/ipfire/cgi-bin/
 
56
        install -v -m 755 $(DIR_APP)/squid-accounting/acct.pl /usr/local/bin/
 
57
        install -v -m 644 $(DIR_APP)/squid-accounting/acct-lib.pl /var/ipfire/accounting/
 
58
        install -v -m 655 $(DIR_APP)/squid-accounting/acct.de.pl /var/ipfire/addon-lang/
 
59
        install -v -m 655 $(DIR_APP)/squid-accounting/acct.en.pl /var/ipfire/addon-lang/
 
60
        install -v -m 655 $(DIR_APP)/squid-accounting/EX-squid-accounting.menu /var/ipfire/menu.d/
 
61
        install -v -m 755 $(DIR_APP)/squid-accounting/dbinstall.pl /var/ipfire/accounting/
 
62
        install -v -m 644 $(DIR_APP)/squid-accounting/config/backup/includes/squid-accounting  \
 
63
                        /var/ipfire/backup/addons/includes/squid-accounting
 
64
                        
 
65
#activate hourly logging of proxy logfile
 
66
        ln -sf /usr/local/bin/acct.pl /etc/fcron.hourly/squid-accounting
 
67
                
 
68
        chown -R nobody.nobody /var/ipfire/accounting
 
69
        @rm -rf $(DIR_APP)
 
70
        @$(POSTBUILD)
 
71