]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - pkgs/core/docbook-dtds/docbook-dtds.nm
docbook-dtds: New package.
[people/amarx/ipfire-3.x.git] / pkgs / core / docbook-dtds / docbook-dtds.nm
CommitLineData
8b4a9cdb
MT
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
5# #
6# This program is free software: you can redistribute it and/or modify #
7# it under the terms of the GNU General Public License as published by #
8# the Free Software Foundation, either version 3 of the License, or #
9# (at your option) any later version. #
10# #
11# This program is distributed in the hope that it will be useful, #
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include $(PKGROOT)/Include
26
27PKG_NAME = docbook-dtds
28PKG_VER = 1.0
29PKG_REL = 0
30
31PKG_MAINTAINER =
32PKG_GROUP = Applications/Text
33PKG_URL = http://www.oasis-open.org/docbook/
34PKG_LICENSE = Copyright only
35PKG_SUMMARY = SGML and XML document type definitions for DocBook.
36
37PKG_BUILD_DEPS+= dos2unix unzip
38
39define PKG_DESCRIPTION
40 The DocBook Document Type Definition (DTD) describes the syntax of \
41 technical documentation texts (articles, books and manual pages). \
42 This syntax is XML-compliant and is developed by the OASIS consortium. \
43 This package contains SGML and XML versions of the DocBook DTD.
44endef
45
46# TODO XXX post-installation stuff
47
48PKG_OBJECTS += \
49 docbk30.zip \
50 docbk31.zip \
51 docbk40.zip \
52 docbk41.zip \
53 docbkx412.zip \
54 docbook-4.2.zip \
55 docbook-xml-4.2.zip \
56 docbook-4.3.zip \
57 docbook-xml-4.3.zip \
58 docbook-4.4.zip \
59 docbook-xml-4.4.zip \
60 docbook-4.5.zip \
61 docbook-xml-4.5.zip
62
63DIRECTORIES = \
64 3.0-sgml \
65 3.1-sgml \
66 4.0-sgml \
67 4.1-sgml \
68 4.1.2-xml \
69 4.2-sgml \
70 4.2-xml \
71 4.3-sgml \
72 4.3-xml \
73 4.4-sgml \
74 4.4-xml \
75 4.5-sgml \
76 4.5-xml
77
78DIR_APP = $(DIR_SRC)/$(PKG_NAME)-$(PKG_VER)
79
80define MACRO_EXTRACT
81 mkdir -pv $(DIR_APP)/$(2)
82 cd $(DIR_APP)/$(2) && unzip $(DIR_DL)/$(1)
83
84endef
85
86define STAGE_PREPARE
87 $(call MACRO_EXTRACT,docbk30.zip,3.0-sgml)
88 $(call MACRO_EXTRACT,docbk31.zip,3.1-sgml)
89 $(call MACRO_EXTRACT,docbk40.zip,4.0-sgml)
90 $(call MACRO_EXTRACT,docbk41.zip,4.1-sgml)
91 $(call MACRO_EXTRACT,docbkx412.zip,4.1.2-xml)
92 $(call MACRO_EXTRACT,docbook-4.2.zip,4.2-sgml)
93 $(call MACRO_EXTRACT,docbook-xml-4.2.zip,4.2-xml)
94 $(call MACRO_EXTRACT,docbook-4.3.zip,4.3-sgml)
95 $(call MACRO_EXTRACT,docbook-xml-4.3.zip,4.3-xml)
96 $(call MACRO_EXTRACT,docbook-4.4.zip,4.4-sgml)
97 $(call MACRO_EXTRACT,docbook-xml-4.4.zip,4.4-xml)
98 $(call MACRO_EXTRACT,docbook-4.5.zip,4.5-sgml)
99 $(call MACRO_EXTRACT,docbook-xml-4.5.zip,4.5-xml)
100
101 # Convert all catalog files to unix format
102 cd $(DIR_APP) && dos2unix */docbook.cat
103
104 $(DO_PATCHES)
105
106 cd $(DIR_APP) && sed -e's,\(NAMELEN\s\+\)44\(\s\*\)\?,\1256,' -i.namelen */docbook.dcl
107 cd $(DIR_APP) && sed -i 's/\r//' */*.txt
108 cd $(DIR_APP) && chown -R root:root .
109 cd $(DIR_APP) && chmod -R a+rX,g-w,o-w .
110endef
111
112STAGE_BUILD = # Nothing to do
113
114define STAGE_INSTALL
115 -mkdir -pv $(BUILDROOT)/etc/sgml
116 for fmt in sgml xml; do \
117 ln -svf $${fmt}-docbook-4.5.cat $(BUILDROOT)/etc/sgml/$${fmt}-docbook.cat; \
118 done
119
120 for dir in $(DIRECTORIES); do \
121 fmt=$${dir#*-}; ver=$${dir%%-*}; \
122 cd $(DIR_APP)/$${dir}; \
123 DESTDIR=$(BUILDROOT)/usr/share/sgml/docbook/$${fmt}-dtd-$${ver}; \
124 mkdir -pv $${DESTDIR}; \
125 case $${fmt} in \
126 sgml) mkdir -pv $${DESTDIR}; install -v *.dcl $${DESTDIR} ;; \
127 xml) mkdir -pv $${DESTDIR}/ent; install -v ent/* $${DESTDIR}/ent ;; \
128 esac; \
129 install -v *.dtd *.mod $${DESTDIR}; \
130 install -v docbook.cat $${DESTDIR}/catalog; \
131 touch $(BUILDROOT)/etc/sgml/$${dir#*-}-docbook-$${ver}.cat; \
132 done
133endef