File: rules

package info (click to toggle)
vim-command-t 5.0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 760 kB
  • sloc: ruby: 3,433; ansic: 1,177; makefile: 37; xml: 11
file content (47 lines) | stat: -rwxr-xr-x 1,476 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
#!/usr/bin/make -f

%:
	dh $@ --with vim_addon

override_dh_auto_build:
	rake make

override_dh_auto_clean:
	rake clean
	rm -f ruby/command-t/ext/command-t/metadata.rb
	git checkout -f Gemfile.lock || rm -f Gemfile.lock

override_dh_auto_test:
# `bundle install` creates a .bundle/config that sets BUNDLE_DISABLE_SHARED_GEMS,
# thereby causing `bundle exec` to complain that Debian-packaged gems are missing.
	rm -rf .bundle
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# Test suite doesn't currently pass; see debian/TODO for details.
	-rake spec
endif

override_dh_install:
	dh_install
	find ruby -name '*.rb' -print0 \
		| xargs -t -r -0 -I {} -- \
			cp --parents {} debian/vim-command-t/usr/lib/vim-command-t

ifdef VERSION
get-orig-source: GIT_REMOTE := https://github.com/wincent/command-t.git
get-orig-source:
	@set -eu; \
	    if ! git ls-remote --exit-code $(GIT_REMOTE) refs/tags/$(VERSION); then \
	    	echo "Tag $(VERSION) not found in $(GIT_REMOTE)" >&2; \
		exit 1; \
	    fi;
	    d=$(shell mktemp -d); \
	    trap "rm -rf $$d" EXIT; \
	    (cd "$$d"; git clone https://github.com/wincent/command-t.git); \
	    (cd "$$d/command-t"; git archive --format=tar --prefix=command-t-$(VERSION)/ $(VERSION) > ../command-t-$(VERSION).tar); \
	    xz -9 "$$d/command-t-$(VERSION).tar"; \
	    mv "$$d/command-t-$(VERSION).tar.xz" ..
else
get-orig-source:
	@echo "Specify the upstream version by adding, e.g., VERSION=5.0.5 to make's command line" >&2
	@exit 1
endif