File: rules

package info (click to toggle)
grinder 0.4.5-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 944 kB
  • sloc: perl: 7,796; xml: 368; makefile: 41; python: 27
file content (55 lines) | stat: -rwxr-xr-x 1,678 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
54
55
#!/usr/bin/make -f

PACKAGE = grinder
AUTHOR  = Florent Angly <florent.angly@gmail.com>
VERSION = 0.4.2
SECTION = 1
MANDIR  = debian/man

NAME1   = $(PACKAGE)
SCRIPT1 = script/$(NAME1)
DESC1   = 'Versatile omics shotgun and amplicon sequencing read simulator'
MAN1    = $(MANDIR)/$(NAME1).$(SECTION)

NAME2   = average_genome_size
SCRIPT2 = utils/$(NAME2)
DESC2   = 'Calculate the average genome size in Grinder libraries'
MAN2    = $(MANDIR)/$(NAME2).$(SECTION)

NAME3   = change_paired_read_orientation
SCRIPT3 = utils/$(NAME3)
DESC3   = 'Reverses the orientation of each paired\-end FASTA sequence'
MAN3    = $(MANDIR)/$(NAME3).$(SECTION)

define MORE
[see also]
.BR grinder (7),
.BR $(NAME1) ($(SECTION)),
.BR $(NAME2) ($(SECTION))
and
.BR $(NAME3) ($(SECTION)).
endef
export MORE
MOREFILE = $(MANDIR)/more.$(SECTION)


%:
	dh $@

# Because of Grinder's random output, some tests are brittle and may fail...
# Only test that the program loads successfully
override_dh_auto_test:
	$(MAKE) testdb TEST_FILE=t/00-load.t TESTDB_SW=''

# Generate manpages on the fly
override_dh_auto_build:
	mkdir -p $(MANDIR)
	echo "$$MORE" > $(MOREFILE)
	help2man --no-discard-stderr --name $(DESC1) --section $(SECTION) --version-string $(VERSION) --no-info --include $(MOREFILE) --output $(MAN1) $(SCRIPT1)
	help2man --no-discard-stderr --name $(DESC2) --section $(SECTION) --version-string $(VERSION) --no-info --include $(MOREFILE) --output $(MAN2) $(SCRIPT2)
	help2man --no-discard-stderr --name $(DESC3) --section $(SECTION) --version-string $(VERSION) --no-info --include $(MOREFILE) --output $(MAN3) $(SCRIPT3)
	rm $(MOREFILE)
	dh_auto_build

override_dh_auto_clean:
	rm -rf $(MANDIR)