dpatch is ugly and unnecessary
[freedombox-privoxy: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
6 all: privoxy/easyprivacy.action privoxy/easylist.action privoxy/https_everywhere.action changelog
7
8 easyprivacy.txt:
9         @wget https://easylist-downloads.adblockplus.org/easyprivacy.txt
10
11 easylist.txt:
12         @wget https://easylist-downloads.adblockplus.org/easylist.txt
13
14 privoxy/easyprivacy.action: easyprivacy.txt abp_import.py
15         @./abp_import.py easyprivacy.txt > privoxy/easyprivacy.action
16
17 privoxy/easylist.action: easylist.txt abp_import.py
18         @./abp_import.py easylist.txt > privoxy/easylist.action
19
20 vendor:
21         @mkdir -p vendor
22
23 vendor/https-everywhere-release:
24         @mkdir -p vendor/https-everywhere-release
25         @rm -rf vendor/https_everywhere-release
26         @cd vendor/https-everywhere-release; wget https://www.eff.org/files/https-everywhere-2.1.xpi
27         @cd vendor/https-everywhere-release; unzip https-everywhere-2.1.xpi
28
29 vendor/https-everywhere:
30         @mkdir -p vendor
31         @rm -rf vendor/https_everywhere
32         @cd vendor; git clone git://git.torproject.org/https-everywhere.git https-everywhere
33
34 privoxy/https_everywhere.action: vendor/https-everywhere-release https_everywhere_import.py
35         @./https_everywhere_import.py > privoxy/https_everywhere.action
36
37 vendor/git2changelog/git2changelog.py:
38         @mkdir -p vendor
39         @rm -rf vendor/git2changelog
40         @cd vendor; git clone git://github.com/jvasile/git2changelog.git git2changelog
41
42 # Note, this is the changelog for freedombox-privoxy, not for the debian package
43 changelog: .git/objects vendor/git2changelog/git2changelog.py
44         @vendor/git2changelog/git2changelog.py freedombox-privoxy > changelog
45
46 deb: debian
47 debian: privoxy/easyprivacy.action privoxy/https_everywhere.action privoxy/easylist.action changelog
48         ./make_deb.sh
49         cd `find Debian -maxdepth 1 -name "freedombox*" -type d`; debuild -us -uc #-kjames@jamesvasile.com
50
51 install: all
52         mkdir -p $(INSTALL_DIR)
53         cd privoxy; cp config default.filter match-all.action default.action https_everywhere.action easyprivacy.action easylist.action $(INSTALL_DIR)
54         /etc/init.d/privoxy restart
55
56 clean:
57         @rm -rf  vendor/https-everywhere 1000_config.dpatch Debian/privoxy* Debian/freedombox-privoxy* vendor/git2changelog
58         @cd privoxy; rm -rf easyprivacy.action easyprivacy.txt https_everywhere.action easylist.action easylist.txt