File: rules

package info (click to toggle)
vim-youcompleteme 0%2B20161219%2Bgit194ff33-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,196 kB
  • ctags: 890
  • sloc: python: 6,165; sh: 60; makefile: 27
file content (36 lines) | stat: -rwxr-xr-x 1,399 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
#!/usr/bin/make -f
# -*- makefile -*-

BUILD_DIR            = $(CURDIR)/ycm_build
GIT_URL              = https://github.com/Valloric/YouCompleteMe.git
DEB_SOURCE           = $(shell dpkg-parsechangelog | grep Source: | sed -e 's/Source: //')
DEB_VERSION          = $(shell dpkg-parsechangelog | grep Version: | sed -e 's/Version: //')
DEB_UPSTREAM_COMMIT  = $(shell echo $(DEB_VERSION) | sed -rn 's/.*git([^-]*).*/\1/p')
DEB_UPSTREAM_VERSION = $(shell echo $(DEB_VERSION) | sed -e 's/-[^-]*$$//')
DEB_INSTALL_DIR      = $(CURDIR)/debian/$(DEB_SOURCE)


%:
	dh $@ --with python3

override_dh_install:
	dh_install
	# No need to install tests
	$(RM) -rv $(DEB_INSTALL_DIR)/usr/share/vim-youcompleteme/python/ycm/tests \
              $(DEB_INSTALL_DIR)/usr/share/vim-youcompleteme/python/ycm/test_utils.py

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	flake8 --select=F,C9 --max-complexity=12 python
	LC_ALL=C.UTF-8 PYTHONPATH=/usr/lib/ycmd:$(CURDIR)/third_party/retries nosetests3 -v --no-byte-compile python
endif

get-orig-source:
	TMPDIR=`mktemp -d -t`; \
	git clone $(GIT_URL) $$TMPDIR; \
	cd $$TMPDIR; git checkout $(DEB_UPSTREAM_COMMIT); \
	tar -czvf $(CURDIR)/vim-youcompleteme.orig.tar.gz .; \
	cd $(CURDIR); \
	dpt repack.sh --upstream-version $(DEB_UPSTREAM_VERSION) vim-youcompleteme.orig.tar.gz ; \
	$(RM) vim-youcompleteme.orig.tar.gz ; \
	$(RM) -r $$TMPDIR