File: rules

package info (click to toggle)
geoip-database 20130213-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 9,456 kB
  • sloc: makefile: 42; sh: 23
file content (59 lines) | stat: -rwxr-xr-x 1,292 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

configure:
	dh_testdir

build:
	mkdir -p $(CURDIR)/tmp/
	# Building geoip v4 country database.
	/usr/lib/geoip/geoip-generator -v -4 \
		--info="$$(date +'GEO-106FREE %Y%m%d Build')" \
		-o $(CURDIR)/tmp/GeoIP.dat GeoIPCountryWhois.csv
	# Convert the v4 csv layout to the v6 one.
	perl /usr/lib/geoip/v4-to-v6-layout.pl \
		< GeoIPCountryWhois.csv \
		> $(CURDIR)/tmp/v4_converted.csv
	# Merge the converted v4 with the v6 database.
	cat v6.csv $(CURDIR)/tmp/v4_converted.csv \
		> $(CURDIR)/tmp/v4v6merged.csv
	# Building geoip v6 country database.
	/usr/lib/geoip/geoip-generator -v -6 \
		--info="$$(date +'GEO-106FREE %Y%m%d Build')" \
		-o $(CURDIR)/tmp/GeoIPv6.dat $(CURDIR)/tmp/v4v6merged.csv

clean:
	dh_testdir
	dh_testroot
	dh_clean
	rm -rf $(CURDIR)/tmp/

install:
	dh_testdir
	dh_testroot
	dh_prep

binary-arch:

build-arch: build

build-indep: build

binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	dh_installdocs -i
	dh_installchangelogs -i
	dh_install -i
	dh_lintian -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i -- -Zxz

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure