File: rules

package info (click to toggle)
python-couchdb 0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 232 kB
  • ctags: 246
  • sloc: python: 1,229; makefile: 26
file content (46 lines) | stat: -rwxr-xr-x 1,530 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
#!/usr/bin/make -f

# This file is part of the python-couchdb package.

# Copyright 2008, Noah Slater <nslater@bytesexual.org>

# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and this
# notice are preserved.

DEB_PYTHON_SYSTEM = pysupport

include /usr/share/cdbs/1/rules/buildcore.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk

DEB_PYTHON_BUILD_ARGS = build_doc

DEB_PYTHON_INSTALL_ARGS_ALL += --single-version-externally-managed

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

clean::
	rm -rf *.1 couchdb/tools/__init__.py doc/index.html doc/api

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

post-patches::
	sed -i -e "s/$(VERSION)/\"$(DEB_UPSTREAM_VERSION)\"/" couchdb/__init__.py
	touch couchdb/tools/__init__.py

install/python-couchdb::
	chmod 755 couchdb-* couchpy
	PYTHONPATH=debian/python-couchdb/usr/share/python-support/python-couchdb \
	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
	cp couchdb-dump couchdb-load debian/python-couchdb/usr/bin
	cp couchpy debian/python-couchdb/usr/bin/couchpy

get-orig-source:
	uscan --force-download

.PHONY: get-orig-source