]>
Commit | Line | Data |
---|---|---|
60cbd6e7 | 1 | ############################################################################### |
60cbd6e7 | 2 | # # |
70df8302 MT |
3 | # IPFire.org - A linux based firewall # |
4 | # Copyright (C) 2007 Michael Tremer & Christian Schmidt # | |
5 | # # | |
6 | # This program is free software: you can redistribute it and/or modify # | |
60cbd6e7 | 7 | # it under the terms of the GNU General Public License as published by # |
70df8302 | 8 | # the Free Software Foundation, either version 3 of the License, or # |
60cbd6e7 MT |
9 | # (at your option) any later version. # |
10 | # # | |
70df8302 | 11 | # This program is distributed in the hope that it will be useful, # |
60cbd6e7 MT |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
14 | # GNU General Public License for more details. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
70df8302 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # |
60cbd6e7 MT |
18 | # # |
19 | ############################################################################### | |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include Config | |
26 | ||
967fcc39 | 27 | VER = 1.4 |
60cbd6e7 MT |
28 | |
29 | THISAPP = squidGuard-$(VER) | |
30 | DL_FILE = $(THISAPP).tar.gz | |
31 | DL_FROM = $(URL_IPFIRE) | |
32 | DIR_APP = $(DIR_SRC)/$(THISAPP) | |
33 | TARGET = $(DIR_INFO)/$(THISAPP) | |
34 | ||
35 | ############################################################################### | |
36 | # Top-level Rules | |
37 | ############################################################################### | |
38 | ||
967fcc39 CS |
39 | objects = $(DL_FILE) \ |
40 | squidGuard-1.4.patch | |
60cbd6e7 MT |
41 | |
42 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
43 | ||
967fcc39 CS |
44 | squidGuard-1.4.patch = $(DL_FROM)/squidGuard-1.4.patch |
45 | ||
46 | $(DL_FILE)_MD5 = eec2b1234cd749a4171152af24aaf967 | |
47 | ||
48 | squidGuard-1.4.patch_MD5 = 2220598c1705d7b4775dc547e5d27bec | |
60cbd6e7 MT |
49 | |
50 | install : $(TARGET) | |
51 | ||
52 | check : $(patsubst %,$(DIR_CHK)/%,$(objects)) | |
53 | ||
54 | download :$(patsubst %,$(DIR_DL)/%,$(objects)) | |
55 | ||
56 | md5 : $(subst %,%_MD5,$(objects)) | |
57 | ||
58 | ############################################################################### | |
59 | # Downloading, checking, md5sum | |
60 | ############################################################################### | |
61 | ||
62 | $(patsubst %,$(DIR_CHK)/%,$(objects)) : | |
63 | @$(CHECK) | |
64 | ||
65 | $(patsubst %,$(DIR_DL)/%,$(objects)) : | |
66 | @$(LOAD) | |
67 | ||
68 | $(subst %,%_MD5,$(objects)) : | |
69 | @$(MD5) | |
70 | ||
71 | ############################################################################### | |
72 | # Installation Details | |
73 | ############################################################################### | |
74 | ||
75 | $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
76 | @$(PREBUILD) | |
77 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) | |
967fcc39 | 78 | cd $(DIR_APP) && patch -Np1 -i $(DIR_DL)/squidGuard-1.4.patch |
60cbd6e7 | 79 | cd $(DIR_APP) && ./configure --prefix=/usr --datadir=/usr/share \ |
967fcc39 | 80 | --sysconfdir=/etc --localstatedir=/var --infodir=/usr/info --mandir=/usr/man \ |
10e4f239 | 81 | --with-sg-config=/var/ipfire/urlfilter/squidGuard.conf \ |
bd365f3a | 82 | --with-sg-logdir=/var/log/squidGuard --with-sg-dbhome=/var/lib/squidguard \ |
967fcc39 | 83 | --with-db=/usr --with-db-inc=/usr/include --with-db-lib=/usr/lib |
fd3e7da0 | 84 | cd $(DIR_APP) && make $(MAKETUNING) |
60cbd6e7 | 85 | cd $(DIR_APP) && make install |
bd365f3a MT |
86 | |
87 | # URL-Filter | |
d733119b | 88 | -mkdir /etc/squidGuard /srv/web/ipfire/html/repository |
bd365f3a MT |
89 | cp -f $(DIR_CONF)/urlfilter/autoupdate.urls /var/ipfire/urlfilter/autoupdate/autoupdate.urls |
90 | ln -fs /bin/false /var/ipfire/urlfilter/autoupdate/cron.daily | |
91 | ln -fs /bin/false /var/ipfire/urlfilter/autoupdate/cron.weekly | |
92 | ln -fs /bin/false /var/ipfire/urlfilter/autoupdate/cron.monthly | |
93 | cp -f $(DIR_CONF)/urlfilter/squidGuard.conf /var/ipfire/urlfilter/squidGuard.conf | |
94 | ln -fs /var/ipfire/urlfilter/squidGuard.conf /etc/squidGuard/squidGuard.conf | |
95 | cp -f $(DIR_CONF)/urlfilter/prebuild.pl /var/ipfire/urlfilter/bin/prebuild.pl | |
96 | chmod 755 /var/ipfire/urlfilter/bin/prebuild.pl | |
97 | cp -f $(DIR_CONF)/urlfilter/autoupdate.pl /var/ipfire/urlfilter/bin/autoupdate.pl | |
98 | chmod 755 /var/ipfire/urlfilter/bin/autoupdate.pl | |
99 | echo "1.7.1" > /var/ipfire/urlfilter/version | |
a1d6b605 MT |
100 | |
101 | # Wrapper | |
102 | cp -f $(DIR_CONF)/urlfilter/redirect_wrapper /usr/sbin | |
103 | chmod 755 /usr/sbin/redirect_wrapper | |
bd365f3a MT |
104 | |
105 | /bin/tar --no-same-owner -xzf $(DIR_CONF)/urlfilter/blacklists.tar.gz -C /var/ipfire/urlfilter | |
106 | /usr/bin/perl $(DIR_CONF)/urlfilter/makeconf.pl | |
0ea91db2 | 107 | touch /var/ipfire/urlfilter/settings |
bd365f3a | 108 | chown -R nobody:nobody /var/ipfire/urlfilter |
d733119b MT |
109 | chmod 755 /srv/web/ipfire/html/images/urlfilter |
110 | chmod 644 /srv/web/ipfire/html/images/urlfilter/* | |
111 | chown -R nobody:nobody /srv/web/ipfire/html/repository | |
bd365f3a MT |
112 | chown -R squid:squid /var/log/squidGuard |
113 | ||
60cbd6e7 MT |
114 | @rm -rf $(DIR_APP) |
115 | @$(POSTBUILD) |