Accepting request 533605 from home:thomas-schraitle:branches:Publishing
- New version 5.1 - no DTD and XSD schemas for version 5.1 anymore! - Changes in spec file: - used spec-cleaner - removed obsolete stuff - install files through Makefile - install NVDL files under /usr/share/xml/docbook/schema/nvdl instead as "documentation" OBS-URL: https://build.opensuse.org/request/show/533605 OBS-URL: https://build.opensuse.org/package/show/Publishing/docbook_5?expand=0&rev=18
This commit is contained in:
90
Makefile
Normal file
90
Makefile
Normal file
@@ -0,0 +1,90 @@
|
||||
#
|
||||
# Makefile to install DocBook 5.x
|
||||
#
|
||||
# Author:
|
||||
# Thomas Schraitle <toms@opensuse.org>
|
||||
#
|
||||
|
||||
ifndef PREFIX
|
||||
PREFIX := /usr
|
||||
endif
|
||||
|
||||
SHELL := /bin/bash
|
||||
PACKAGE := docbook_5
|
||||
VERSION := 5.1
|
||||
CDIR := $(shell pwd)
|
||||
#
|
||||
DATADIR := $(PREFIX)/share
|
||||
#
|
||||
BINDIR := $(DESTDIR)$(PREFIX)/bin
|
||||
# Catalog stuff
|
||||
DB_CATALOG_SRC := $(PACKAGE).xml
|
||||
CATALOG_DIR := $(DESTDIR)/etc/xml/catalog.d
|
||||
DB_CATALOG := $(CATALOG_DIR)/$(DB_CATALOG_SRC)
|
||||
#
|
||||
DB_XML_PATH := $(DESTDIR)$(DATADIR)/xml/docbook
|
||||
SCHEMA_PATH := $(DB_XML_PATH)/schema
|
||||
#
|
||||
XSLT_PATH := $(DB_XML_PATH)/stylesheet/upgrade
|
||||
#
|
||||
DTD_PATH := $(SCHEMA_PATH)/dtd
|
||||
RNG_PATH := $(SCHEMA_PATH)/rng
|
||||
SCH_PATH := $(SCHEMA_PATH)/sch
|
||||
XSD_PATH := $(SCHEMA_PATH)/xsd
|
||||
NVDL_PATH := $(SCHEMA_PATH)/nvdl
|
||||
#
|
||||
PATHS_50 := $(DTD_PATH)/5.0 $(RNG_PATH)/5.0 $(SCH_PATH)/5.0 $(XSD_PATH)/5.0 $(NVDL_PATH)/5.0
|
||||
PATHS_51 := $(RNG_PATH)/5.1 $(SCH_PATH)/5.1 $(NVDL_PATH)/5.1
|
||||
#
|
||||
DB_VERSIONS := 5.0 5.1
|
||||
|
||||
INST_DIRECTORIES := $(PATHS_50) $(PATHS_51) $(CATALOG_DIR) $(BINDIR) $(XSLT_PATH)
|
||||
|
||||
#-----------------------------
|
||||
all: $(DB_CATALOG)
|
||||
all: $(BINDIR)/db4-entities.pl
|
||||
all: $(XSLT_PATH)/db4-upgrade.xsl
|
||||
all: installdb50 installdb51
|
||||
@echo "Ready."
|
||||
|
||||
|
||||
#-----------------------------
|
||||
.PHONY: installdb50
|
||||
installdb50: | $(PATHS_50)
|
||||
@echo "### Installing DocBook 5.0 DTD, XSD, NVDL, RNG, and SCH"
|
||||
install -m644 docbook-5.0/dtd/docbook.dtd $(DTD_PATH)/5.0
|
||||
install -m644 docbook-5.0/docbook.nvdl $(NVDL_PATH)/5.0
|
||||
install -m644 docbook-5.0/xsd/*.xsd $(XSD_PATH)/5.0
|
||||
install -m644 docbook-5.0/rng/* $(RNG_PATH)/5.0
|
||||
install -m644 docbook-5.0/sch/* $(SCH_PATH)/5.0
|
||||
|
||||
.PHONY: installdb51
|
||||
installdb51: | $(PATHS_51)
|
||||
@echo "### Installing DocBook 5.1 NVDL, RNG, and SCH"
|
||||
install -m644 docbook-5.1/docbook.nvdl $(NVDL_PATH)/5.1
|
||||
install -m644 docbook-5.1/rng/* $(RNG_PATH)/5.1
|
||||
install -m644 docbook-5.1/sch/* $(SCH_PATH)/5.1
|
||||
|
||||
|
||||
.PHONY: install
|
||||
install: all | $(INST_DIRECTORIES)
|
||||
|
||||
|
||||
|
||||
$(DB_CATALOG): $(DB_CATALOG_SRC) | $(CATALOG_DIR)
|
||||
@echo "### Installing XML Catalog..."
|
||||
install -m644 $< $@
|
||||
|
||||
|
||||
$(BINDIR)/db4-entities.pl: docbook-5.1/tools/db4-entities.pl | $(BINDIR)
|
||||
@echo "### Installing script db4-entities.pl"
|
||||
install -m655 $< $@
|
||||
|
||||
$(XSLT_PATH)/db4-upgrade.xsl: docbook-5.1/tools/db4-upgrade.xsl | $(XSLT_PATH)
|
||||
@echo "### Installing upgrade stylesheet..."
|
||||
install -m644 $< $@
|
||||
|
||||
# create needed directories
|
||||
#
|
||||
$(INST_DIRECTORIES):
|
||||
@mkdir -p $@
|
Reference in New Issue
Block a user