File: rules

package info (click to toggle)
python-couchdb 0.10-1.1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 508 kB
  • ctags: 673
  • sloc: python: 3,763; makefile: 35
file content (37 lines) | stat: -rwxr-xr-x 1,057 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
#!/usr/bin/make -f
# -*- makefile -*-

UPVER=$(shell dpkg-parsechangelog  | grep ^Version | cut -d\  -f2 | cut -d- -f1)

VERSION = __import__('pkg_resources').get_distribution('CouchDB').version

%:
	dh $@ \
		-Spython_distutils \
		--with python2

override_dh_auto_build:
	sed -i -e "s/$(VERSION)/\"$(UPVER)\"/" couchdb/__init__.py
	touch couchdb/tools/__init__.py
	dh_auto_build -- build_sphinx
	
	chmod 755 couchdb-* couchpy
	help2man -N -n "a CouchDB dump utility" ./couchdb-dump > couchdb-dump.1
	help2man -N -n "a CouchDB load utility" ./couchdb-load > couchdb-load.1
	help2man -N -n "a CouchDB Python view server" ./couchpy > couchpy.1

override_dh_auto_install:
	dh_auto_install -- --single-version-externally-managed

	-rm -rf $(CURDIR)/debian/usr/share/doc/python-couchdb/html/_static/jquery.js

override_dh_clean:
	dh_clean
	-rm -rf doc/build
	-rm -rf CouchDB.egg-info/

	sed -i -e "s/\"$(UPVER)\"/$(VERSION)/" couchdb/__init__.py

.PHONY: get-orig-source
get-orig-source:
	uscan --force-download --rename --download-version=$(UPVER) --destdir .