File: rules

package info (click to toggle)
vim-command-t 4.0-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 688 kB
  • ctags: 569
  • sloc: ruby: 3,241; ansic: 1,158; sh: 39; makefile: 26; xml: 11
file content (37 lines) | stat: -rwxr-xr-x 1,254 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

%:
	dh $@

override_dh_auto_build:
	rake make

override_dh_auto_clean:
	rake clean
	rm -f ruby/command-t/metadata.rb 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, and upstream says that it's a maintenance
# burden, so ignore failures.
	-rake spec
endif

override_dh_install:
	dh_install
	cp debian/command-t.yaml.in debian/vim-command-t/usr/share/vim/registry/command-t.yaml
	cd debian/vim-command-t/usr/lib/vim-command-t && \
	    find -type f | sed 's,^\./, - ,' >> ../../share/vim/registry/command-t.yaml

get-orig-source: VERSION := $(shell dpkg-parsechangelog -S Version | perl -pe 's/(.*)-/$1/')
get-orig-source:
	set -eu; \
	    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" .