version fiddling for make_deb
[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:
24         @mkdir -p vendor
25         @rm -rf vendor/https_everywhere
26         @cd vendor; git clone git://git.torproject.org/https-everywhere.git https-everywhere
27
28 privoxy/https_everywhere.action: vendor/https-everywhere https_everywhere_import.py
29         @./https_everywhere_import.py > privoxy/https_everywhere.action
30
31 vendor/git2changelog/git2changelog.py:
32         @mkdir -p vendor
33         @rm -rf vendor/git2changelog
34         @cd vendor; git clone git://github.com/jvasile/git2changelog.git git2changelog
35
36 # Note, this is the changelog for freedombox-privoxy, not for the debian package
37 changelog: .git/objects vendor/git2changelog/git2changelog.py
38         @vendor/git2changelog/git2changelog.py freedombox-privoxy > changelog
39
40 deb: debian
41 debian: privoxy/easyprivacy.action privoxy/https_everywhere.action privoxy/easylist.action changelog
42         ./make_deb.sh
43         cd `find Debian -maxdepth 1 -name "freedombox*" -type d`; debuild -us -uc #-kjames@jamesvasile.com
44
45 install: all
46         mkdir -p $(INSTALL_DIR)
47         cd privoxy; cp config default.filter match-all.action default.action https_everywhere.action easyprivacy.action easylist.action $(INSTALL_DIR)
48         /etc/init.d/privoxy restart
49
50 clean:
51         @rm -rf  vendor/https-everywhere 1000_config.dpatch Debian/privoxy* Debian/freedombox-privoxy* vendor/git2changelog
52         @cd privoxy; rm -rf easyprivacy.action easyprivacy.txt https_everywhere.action easylist.action easylist.txt