File: rules

package info (click to toggle)
jekyll 2.2.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,908 kB
  • ctags: 687
  • sloc: ruby: 6,811; sh: 121; xml: 106; makefile: 35
file content (53 lines) | stat: -rwxr-xr-x 1,908 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
48
49
50
51
52
53
#!/usr/bin/make -f
#export DH_VERBOSE=1
#
# Uncomment to ignore all test failures (but the tests will run anyway)
#export DH_RUBY_IGNORE_TESTS=all
#
# Uncomment to ignore some test failures (but the tests will run anyway).
# Valid values:
#export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems
#
# If you need to specify the .gemspec (eg there is more than one)
#export DH_RUBY_GEMSPEC=gem.gemspec

%:
	dh $@ --buildsystem=ruby --with ruby

override_dh_auto_clean: recover_original_test_sources
	dh_auto_clean
	rm -fr $(CURDIR)/site/js
	rm -fr $(CURDIR)/site/_includes/css/normalize.css
	rm -fr $(CURDIR)/test/dest
	rm -fr $(CURDIR)/.sass-cache

override_dh_auto_build: prepare_test
	dh_auto_build
	mkdir -p $(CURDIR)/site/js
	cp debian/missing-sources/*.js $(CURDIR)/site/js
	cp debian/missing-sources/normalize.css $(CURDIR)/site/_includes/css/

override_dh_installchangelogs:
	dh_installchangelogs History.markdown

prepare_test:
	( cd  $(CURDIR)/test/source/_methods && \
	  rm -f um_hi.md && ln -s ./site/generate.md um_hi.md )
	( cd  $(CURDIR)/test/source/_data && \
	  rm -f products.yml && ln -s ../products.yml products.yml )
	( cd $(CURDIR)/test/source/_includes && rm -f tmp && ln -s /tmp tmp )
	( cd $(CURDIR)/test/source/symlink-test && \
	  rm -f _data && ln -s ../_data . && \
	  rm -f symlinked-dir && ln -s ../css symlinked-dir && \
	  rm -f symlinked-file && ln -s ../index.html symlinked-file )

recover_original_test_sources:
	( cd $(CURDIR)/test/source/_methods && \
	  rm -f um_hi.md && cp $(CURDIR)/debian/test-sources/um_hi.md . )
	( cd $(CURDIR)/test/source/_data && \
	  rm -f products.yml && cp $(CURDIR)/debian/test-sources/products.yml . )
	( cd $(CURDIR)/test/source/_includes && rm -f tmp )
	( cd $(CURDIR)/test/source/symlink-test && \
	  rm -fr _data  && \
	  rm -fr symlinked-dir && \
	  rm -fr symlinked-file && cp $(CURDIR)/debian/test-sources/symlinked-file . )