~ubuntu-branches/ubuntu/vivid/sgml-data/vivid-proposed

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Osamu Aoki
  • Date: 2013-05-21 00:15:32 UTC
  • mfrom: (7.1.1)
  • Revision ID: package-import@ubuntu.com-20130521001532-a3eb13ag7k244gos
Tags: 2.0.9-1
* New maintainer.  Closes: #358521
* Convert to non-native source/format 3.0 (quilt) package.
* Add Vcs-* field pointing to the alioth git repo.
* Modernized around build script and debhelper files.
* Make binary package as Multi-Arch: foreign.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
 
# rules file for sgml-data
3
 
#
 
2
# uncomment to enable verbose mode for debhelper
 
3
#DH_VERBOSE = 1
 
4
# uncomment to exclude VCS paths
 
5
DH_ALWAYS_EXCLUDE=CVS:.svn:.git
 
6
 
 
7
%:
 
8
        dh $@
 
9
 
 
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.
6
 
 
7
 
#
8
 
# todo: cvs-build function
9
 
#
10
 
 
11
 
package         := sgml-data
12
 
 
 
13
# But modernized for easier maint.
 
14
 
 
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
18
20
 
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
22
 
compress        := gzip -9f
23
 
 
24
 
 
25
 
build: build-arch build-indep
26
 
build-arch: build-stamp
27
 
build-indep: build-stamp
28
 
build-stamp:
29
 
#       nothing to be done
30
 
 
31
 
clean:
32
 
        dh_testdir
33
 
        dh_clean
34
 
 
35
 
test:
36
 
        dh_testdir
 
21
#######################################################################
 
22
override_dh_auto_configure:
 
23
        # -c check without execution, -w warn
37
24
        perl -cw sgml-catalog-check.pl
38
25
 
39
 
binary-indep:   build test
40
 
        dh_testdir
41
 
        dh_testroot
42
 
        dh_prep
43
 
 
44
 
#        install SGML stuff
45
 
        set -e; for dir in  `cd sgml; find . -path '*/CVS' -prune -o -type d -print`; do \
46
 
                $(make_dir) $(sgmldir)/$$dir                                            ;\
47
 
        done
48
 
 
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                 ;\
53
 
        done
54
 
        [ -f $(sgmldir)/dtd/rdf.dtd ]
 
26
#######################################################################
 
27
override_dh_install:
 
28
        dh_install -X/catalog
 
29
        # skip */catalog and */catalog.xml files 
 
30
        # but do not skip sgml-catalog-check.pl
 
31
 
 
32
#######################################################################
 
33
override_dh_installcatalogs:
 
34
        # assert if destination free
 
35
        if [ -f $(sgmldir)/dtd/rdf.dtd ]; then exit; fi
55
36
        dh_installcatalogs
56
 
 
57
 
#        install XML stuff
58
 
        set -e; for dir in  `cd xml; find . -path '*/CVS' -prune -o -type d -print`; do \
59
 
                $(make_dir) $(xmldir)/$$dir                                     ;\
60
 
        done
61
 
 
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                   ;\
66
 
        done
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
69
40
 
70
 
#        compatability links
 
41
#######################################################################
 
42
override_dh_link:
71
43
        dh_link
72
 
 
73
 
#        checker script, until this gets added to sgml-base
74
 
        $(make_dir) $(libdir)
75
 
        $(install_program) sgml-catalog-check.pl $(libdir)/
76
 
 
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               ;\
81
49
        done
82
 
#        UNSURE: do the same for XML stuff?
 
50
#        UNSURE: do the same for XML stuff? (original comment before Osamu)
83
51
 
84
 
#        move in documentation
85
 
        dh_installdocs copyright-w3o-documents.html
86
 
        dh_installchangelogs
87
 
        dh_installexamples examples/*
88
 
        dh_fixperms
 
52
#######################################################################
 
53
override_dh_lintian:
89
54
        dh_lintian
90
 
 
91
 
#        check for bad links
 
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"; \
96
60
        done
97
61
 
98
 
        dh_compress -i
99
 
 
100
 
        dh_installdeb -i
101
 
        dh_perl -d -i
102
 
        dh_gencontrol -i
103
 
        dh_md5sums -i
104
 
        dh_builddeb -i
105
 
 
106
 
 
107
 
binary-arch:    build
108
 
# nothing to be done
109
 
 
110
 
binary:         binary-indep binary-arch
111
 
 
112
 
.PHONY: binary binary-arch binary-indep clean