2
# rules file for sgml-data
2
# uncomment to enable verbose mode for debhelper
4
# uncomment to exclude VCS paths
5
DH_ALWAYS_EXCLUDE=CVS:.svn:.git
10
#######################################################################
4
11
# Some bytes in this file may have been touched by Ian Jackson,
5
12
# so I can never remove his name from this file. Oh boy.
8
# todo: cvs-build function
13
# But modernized for easier maint.
15
#######################################################################
13
16
# directory abstraction
14
prefix := debian/$(package)
15
libdir := $(prefix)/usr/share/$(package)
17
prefix := debian/sgml-data
16
18
sgmldir := $(prefix)/usr/share/sgml
17
19
xmldir := $(prefix)/usr/share/xml
19
install_file := install -o root -g root -m 644 -p
20
install_program := install -o root -g root -m 755 -p
21
make_dir := install -d -o root -g root -m 755
25
build: build-arch build-indep
26
build-arch: build-stamp
27
build-indep: build-stamp
21
#######################################################################
22
override_dh_auto_configure:
23
# -c check without execution, -w warn
37
24
perl -cw sgml-catalog-check.pl
39
binary-indep: build test
45
set -e; for dir in `cd sgml; find . -path '*/CVS' -prune -o -type d -print`; do \
46
$(make_dir) $(sgmldir)/$$dir ;\
49
set -e; for file in `cd sgml; find . -path '*/CVS/*' -prune -o \
50
-name 'catalog*' -prune -o -type f -print`; do \
51
[ ! -f sgml/$$file ] || \
52
$(install_file) sgml/$$file $(sgmldir)/$$file ;\
54
[ -f $(sgmldir)/dtd/rdf.dtd ]
26
#######################################################################
29
# skip */catalog and */catalog.xml files
30
# but do not skip sgml-catalog-check.pl
32
#######################################################################
33
override_dh_installcatalogs:
34
# assert if destination free
35
if [ -f $(sgmldir)/dtd/rdf.dtd ]; then exit; fi
58
set -e; for dir in `cd xml; find . -path '*/CVS' -prune -o -type d -print`; do \
59
$(make_dir) $(xmldir)/$$dir ;\
62
set -e; for file in `cd xml; find . -path '*/CVS/*' -prune -o \
63
-name 'catalog*' -prune -o -type f -print`; do \
64
[ ! -f xml/$$file ] || \
65
$(install_file) xml/$$file $(xmldir)/$$file ;\
67
[ -f $(xmldir)/declaration/xml.dcl ]
37
# assert if destination free
38
if [ -f $(xmldir)/declaration/xml.dcl ]; then exit; fi
68
39
dh_installxmlcatalogs
41
#######################################################################
73
# checker script, until this gets added to sgml-base
75
$(install_program) sgml-catalog-check.pl $(libdir)/
77
44
# create all the nice links as specified in SGML FS Guidelines
78
set -e; cd sgml; for file in `find [a-z]* -name catalog -o -name '*.soc'`; do \
45
# (No more CVS/ in subdirectory)
46
set -e; cd sgml; for file in `find . -name catalog -o -name '*.soc'`; do \
79
47
echo "checking sgml/$$file" ;\
80
48
../sgml-catalog-check.pl -v 0 -d ../$(sgmldir) $$file ;\
82
# UNSURE: do the same for XML stuff?
50
# UNSURE: do the same for XML stuff? (original comment before Osamu)
84
# move in documentation
85
dh_installdocs copyright-w3o-documents.html
87
dh_installexamples examples/*
52
#######################################################################
55
# check for bad links but do not stop
92
56
for LINK in $$(find $(prefix) -type l); do \
93
57
TARGET=$$(readlink $$LINK); \
94
58
[ "$$TARGET" != "$${TARGET#/etc}" ] || [ -e $$LINK ] \
95
59
|| echo "dangling symlink: $$LINK -> $$TARGET"; \
110
binary: binary-indep binary-arch
112
.PHONY: binary binary-arch binary-indep clean