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