File: txtdocs.dpatch

package info (click to toggle)
iproute 20100519-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,636 kB
  • ctags: 5,283
  • sloc: ansic: 36,665; sh: 2,282; makefile: 447; cpp: 341; yacc: 339; lex: 145; perl: 101
file content (45 lines) | stat: -rw-r--r-- 1,226 bytes parent folder | download | duplicates (2)
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
#! /bin/sh /usr/share/dpatch/dpatch-run
## txtdocs.dpatch by Andreas Henriksson <andreas@fatal.se>
## Original author unknown, this was split out to a dpatch
## from a direct source edit.
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Add make rules to build documentation in plain text format.
## DP: This adds a build-dependency on lynx.

@DPATCH@
diff -urNad pkg-iproute~/doc/Makefile pkg-iproute/doc/Makefile
--- pkg-iproute~/doc/Makefile	2008-01-09 21:24:37.000000000 +0100
+++ pkg-iproute/doc/Makefile	2008-01-09 21:24:46.000000000 +0100
@@ -14,6 +14,7 @@
 PAGESPERPAGE=2
 
 HTMLFILES=$(subst .sgml,.html,$(shell echo *.sgml))
+TXTFILES=$(subst .sgml,.txt,$(shell echo *.sgml))
 DVIFILES=$(subst .ps,.dvi,$(PSFILES))
 
 
@@ -25,6 +26,8 @@
 
 dvi: $(DVIFILES)
 
+txt: $(TXTFILES)
+
 print: $(PSFILES)
 	$(LPR) $(PSFILES)
 
@@ -47,9 +50,13 @@
 %.html: %.sgml
 	$(SGML2HTML) $<
 
+%.txt: %.html
+	lynx -nolist -dump $< > $@
+		
+
 install:
 	install -m 0644 $(shell echo *.tex) $(DESTDIR)$(DOCDIR)
 	install -m 0644 $(shell echo *.sgml) $(DESTDIR)$(DOCDIR)
 
 clean:
-	rm -f *.aux *.log *.toc $(PSFILES) $(DVIFILES) *.html
+	rm -f *.aux *.log *.toc $(PSFILES) $(DVIFILES) *.html $(TXTFILES)