Project

General

Profile

Revision be44f043

IDbe44f0436a65ae44fdec1d6c71ba732ec8c9a378
Parent eced9ab0
Child 0265f451

Added by Francois POIROTTE over 10 years ago

Création de fichiers .deb sans les sources.

Ajoute la possibilité de créer des paquets debian ne contenant pas les
sources.

Change-Id: I0c0f04a17319e11c633a8da004f0facf5758cfc0
Reviewed-on: https://vigilo-dev.si.c-s.fr/review/1229
Tested-by: Build system <>
Reviewed-by: Francois POIROTTE <>

View differences:

Makefile
50 50
	[ `id -u` -ne 0 ] || chown $(HTTPD_USER): $(DESTDIR)$(LOCALSTATEDIR)/cache/vigilo/sessions
51 51

  
52 52

  
53

  
54 53
lint: lint_pylint
55 54
tests: tests_nose
56 55
doc: apidoc
debian/rules
8 8
PKGNAME=$(shell printf "%s" `dpkg-parsechangelog | grep '^Source:' | cut -d: -f2-`)
9 9
VERSION=$(shell printf "%s" `dpkg-parsechangelog | grep '^Version:' | cut -d: -f2-`)
10 10

  
11
ifeq "$(NOPY)" ""
12
    helper=python2
13
else
14
    helper=python2_nopy
15
endif
16

  
11 17
%:
12
	dh $@ --with python2,sphinxdoc
18
	dh $@ --with $(helper),sphinxdoc
13 19

  
14 20
override_dh_auto_clean:
15 21
	dh_auto_clean -- buildclean
16
	$(RM) -rf vigilo_vigiboard.egg-info
17 22
	find vigiboard/i18n/ -name '*.mo' -o -name '*.js' -delete
18

  
19
override_dh_auto_build:
20
	/usr/bin/python setup.py compile_catalog
21
	$(MAKE) deployment/logrotate.conf deployment/settings.ini \
22
	        deployment/vigiboard.conf deployment/vigiboard.wsgi
23
ifneq "$(NOPY)" ""
24
	rm -f $(CURDIR)/debian/docs $(CURDIR)/debian/copyright
25
endif
23 26

  
24 27
override_dh_auto_install:
25
	/usr/bin/python setup.py install --root=debian/$(PKGNAME) \
26
	    --single-version-externally-managed \
27
	    --install-layout=deb
28
	mkdir -p debian/$(PKGNAME)/var/log/vigilo/vigiboard/
29
	mkdir -p debian/$(PKGNAME)/var/cache/vigilo/sessions/
30
	find vigiboard/i18n/ -name '*.mo' -o -name '*.js' -exec \
28
	$(MAKE) install_pkg \
29
	    DESTDIR=$(CURDIR)/debian/$(PKGNAME)/ \
30
	    PYTHON=/usr/bin/python
31
	/usr/bin/find vigiboard/i18n/ -name '*.mo' -o -name '*.js' -exec \
31 32
	    'mv' '{}' "debian/$(PKGNAME)/usr/share/pyshared/{}" ';'
32 33

  
33 34
override_dh_auto_test:
34 35

  
35 36
override_dh_installdocs:
36
ifneq "$(shell dh_listpackages | grep -- -doc)" ""
37
ifneq "$(NOPY)" ""
37 38
	PYTHONPATH=src/ /usr/bin/sphinx-build -b html -d doc/_build/doctrees \
38
	                    -D version=$(VERSION) -D release=$(VERSION) \
39
	                    doc/ debian/$(PKGNAME)-doc/usr/share/doc/$(PKGNAME)-doc/html/
39
                -D version=$(VERSION) -D release=$(VERSION) \
40
                doc/ debian/$(PKGNAME)-doc/usr/share/doc/$(PKGNAME)-doc/html/
40 41
endif
41 42

  
42 43
override_dh_sphinxdoc:
43
ifneq "$(shell dh_listpackages | grep -- -doc)" ""
44
ifneq "$(NOPY)" ""
44 45
	dh_sphinxdoc -p $(PKGNAME)-doc
45 46
endif
46 47

  

Also available in: Unified diff