update https_everywhere version to 3.1.2
[freedombox-privoxy:chinchani-freedombox-privoxy.git] / Makefile
1 INSTALL_DIR=/etc/privoxy
2 VERSION=`cat VERSION`
3 PACKAGE_NAME=freedombox-privoxy
4 DEBDIR=`ls -d Debian/privoxy*| xargs | sed "s/ .*//"`
5 HE_VERSION='3.1.2'
6 #HE_VERSION='latest'
7
8 .PHONY: clean
9
10 all: privoxy/easyprivacy.action privoxy/easylist.action privoxy/https_everywhere.action changelog
11
12 easyprivacy.txt:
13         @wget https://easylist-downloads.adblockplus.org/easyprivacy.txt
14
15 easylist.txt:
16         @wget https://easylist-downloads.adblockplus.org/easylist.txt
17
18 privoxy/easyprivacy.action: easyprivacy.txt privoxy/abp_import.py
19         @./privoxy/abp_import.py easyprivacy.txt > privoxy/easyprivacy.action
20
21 privoxy/easylist.action: easylist.txt privoxy/abp_import.py
22         @./privoxy/abp_import.py easylist.txt > privoxy/easylist.action
23
24 vendor:
25         @mkdir -p vendor
26
27 vendor/https-everywhere-release:
28         @rm -rf vendor/https-everywhere-release
29         @mkdir -p vendor/https-everywhere-release
30         @cd vendor/https-everywhere-release; wget https://www.eff.org/files/https-everywhere-${HE_VERSION}.xpi
31         @cd vendor/https-everywhere-release; unzip https-everywhere-${HE_VERSION}.xpi
32
33 vendor/https-everywhere:
34         @mkdir -p vendor
35         @rm -rf vendor/https_everywhere
36         @cd vendor; git clone git://git.torproject.org/https-everywhere.git https-everywhere
37
38 privoxy/https_everywhere.action: vendor/https-everywhere-release privoxy/https_everywhere_import.py
39         @./privoxy/https_everywhere_import.py > privoxy/https_everywhere.action
40
41 vendor/git2changelog/git2changelog.py:
42         @mkdir -p vendor
43         @rm -rf vendor/git2changelog
44         @cd vendor; git clone git://github.com/jvasile/git2changelog.git git2changelog
45
46 # Note, this is the changelog for freedombox-privoxy, not for the debian package
47 changelog: .git/objects vendor/git2changelog/git2changelog.py
48         @vendor/git2changelog/git2changelog.py freedombox-privoxy > changelog
49
50 deb: debian
51 debian: privoxy/easyprivacy.action privoxy/https_everywhere.action privoxy/easylist.action changelog
52         ./make_deb.sh
53         cd `find Debian -maxdepth 1 -name "freedombox*" -type d`; debuild -us -uc #-kjames@jamesvasile.com
54
55 install: all
56         mkdir -p $(INSTALL_DIR)
57         cd privoxy; cp config default.filter match-all.action default.action https_everywhere.action easyprivacy.action easylist.action $(INSTALL_DIR)
58         /etc/init.d/privoxy restart
59
60 clean:
61         @rm -rf  vendor/https-everywhere vendor/https-everywhere-release 1000_config.dpatch Debian/privoxy* Debian/freedombox-privoxy* vendor/git2changelog
62         @cd privoxy; rm -rf easyprivacy.action easyprivacy.txt https_everywhere.action easylist.action easylist.txt 
63