[csw-devel] SF.net SVN: gar:[2433] csw/mgar/pkg/docbook-dtds/trunk

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Tue Dec 2 17:28:21 CET 2008


Revision: 2433
          http://gar.svn.sourceforge.net/gar/?rev=2433&view=rev
Author:   bdwalton
Date:     2008-12-02 16:28:21 +0000 (Tue, 02 Dec 2008)

Log Message:
-----------
Crafted a Makefile to actually install all these catalogs and descriptions.

Modified Paths:
--------------
    csw/mgar/pkg/docbook-dtds/trunk/Makefile
    csw/mgar/pkg/docbook-dtds/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/docbook-dtds/trunk/files/Makefile

Modified: csw/mgar/pkg/docbook-dtds/trunk/Makefile
===================================================================
--- csw/mgar/pkg/docbook-dtds/trunk/Makefile	2008-12-02 16:27:24 UTC (rev 2432)
+++ csw/mgar/pkg/docbook-dtds/trunk/Makefile	2008-12-02 16:28:21 UTC (rev 2433)
@@ -1,6 +1,9 @@
+# Replicate the RHEL5 docbook-dtds-1.0.30.1 rpm for CSW.  Patches are taken
+# from that srpm and modified (so paths work for GAR).
+
 GARNAME = docbookdtds
-GARVERSION = 1.0.30
-PATCHLEVEL = 1
+GARVERSION = 1.0
+PATCHLEVEL = 30.1
 CATEGORIES = xtra
 
 PREREQUISITES = CSWunzip
@@ -46,7 +49,7 @@
 DBFILES += docbook-xml-4.3.zip docbook-4.4.zip docbook-xml-4.4.zip
 
 MASTER_SITES = $(O_SRC) $(D_SRC)
-DISTFILES  = $(DBFILES)
+DISTFILES  = $(DBFILES) Makefile
 
 PATCHFILES = docbook-4.2-euro.patch docbook-dtd30-sgml-1.0.catalog.patch
 PATCHFILES += docbook-dtd31-sgml-1.0.catalog.patch
@@ -55,25 +58,18 @@
 PATCHFILES += docbook-dtd42-sgml-1.0.catalog.patch
 PATCHFILES += docbook-dtds-ents.patch
 
-#CONFIGURE_ARGS = $(DIRPATHS)
+# we don't need no stinkin' configure! :)
+CONFIGURE_SCRIPTS = 
+# no tests either.
+TEST_SCRIPTS = 
 
-include gar/category.mk
+# nothing to build either...
+BUILD_SCRIPTS = 
 
-# BuildArch: noarch
+INSTALL_ARGS = DESTDIR=$(DESTDIR) GARVERSION=$(GARVERSION) PATCHLEVEL=$(PATCHLEVEL)
 
-# Patch0: docbook-dtd30-sgml-1.0.catalog.patch
-# Patch1: docbook-dtd31-sgml-1.0.catalog.patch
-# Patch2: docbook-dtd40-sgml-1.0.catalog.patch
-# Patch3: docbook-dtd41-sgml-1.0.catalog.patch
-# Patch4: docbook-dtd42-sgml-1.0.catalog.patch
-# Patch5: docbook-4.2-euro.patch
-# Patch6: docbook-dtds-ents.patch
+include gar/category.mk
 
-local-zip-%:
-	@echo " ==> Extracting $(DOWNLOADDIR)/$*"
-	@unzip $(DOWNLOADDIR)/$* -d $(EXTRACTDIR)
-	@$(MAKECOOKIE)
-
 SGMLDIRS = 3.0 3.1 4.0 4.1 4.2 4.3 4.4
 XMLDIRS = 4.1.2 4.2 4.3 4.4
 	
@@ -130,9 +126,17 @@
 pre-extract: $(WORKSRC)
 	( cd $(WORKSRC); \
 	for d in $(SGMLDIRS); do \
-		mkdir $$d-sgml; \
+		[ -d $$d-sgml ] || mkdir $$d-sgml; \
 	done; \
 	for d in $(XMLDIRS); do \
-		mkdir $$d-xml; \
+		[ -d $$d-xml ] || mkdir $$d-xml; \
 	done )
+	@$(MAKECOOKIE)
+
+post-extract:
+	# Increase NAMELEN (bug #36058, bug #159382). [bug references from
+	# rpm .spec file]
+	( cd $(WORKSRC); \
+		gsed -e's,\(NAMELEN\s\+\)44\(\s\*\)\?,\1256,' -i.namelen */docbook.dcl; \
+		cp ../Makefile .)
 	@$(MAKECOOKIE)
\ No newline at end of file

Modified: csw/mgar/pkg/docbook-dtds/trunk/checksums
===================================================================
--- csw/mgar/pkg/docbook-dtds/trunk/checksums	2008-12-02 16:27:24 UTC (rev 2432)
+++ csw/mgar/pkg/docbook-dtds/trunk/checksums	2008-12-02 16:28:21 UTC (rev 2433)
@@ -9,6 +9,7 @@
 ab200202b9e136a144db1e0864c45074  download/docbook-xml-4.3.zip
 f89e1bd0b2c7a361e3f1f739e16b5d0d  download/docbook-4.4.zip
 cbb04e9a700955d88c50962ef22c1634  download/docbook-xml-4.4.zip
+9f1b87ab4fa6da7b7284a1c7edd1e3da  download/Makefile
 318742d3a6648a6905727f071cbc9847  download/docbook-4.2-euro.patch
 e3067045964536cc7445d5c3f1e99916  download/docbook-dtd30-sgml-1.0.catalog.patch
 856d40f5d1e3fc8fd939b88bf5fedc87  download/docbook-dtd31-sgml-1.0.catalog.patch

Added: csw/mgar/pkg/docbook-dtds/trunk/files/Makefile
===================================================================
--- csw/mgar/pkg/docbook-dtds/trunk/files/Makefile	                        (rev 0)
+++ csw/mgar/pkg/docbook-dtds/trunk/files/Makefile	2008-12-02 16:28:21 UTC (rev 2433)
@@ -0,0 +1,52 @@
+prefix = /opt/csw
+datadir = $(prefix)/share
+
+INSTALL = /opt/csw/bin/ginstall -c
+INSTALL_DATA = $(INSTALL) -m 0644
+INSTALL_DIR = $(INSTALL) -m 0755 -d
+
+docbookdir = $(datadir)/sgml/docbook
+
+SGML = $(wildcard *-sgml)
+XML = $(wildcard *-xml)
+
+SGMLTARG = $(patsubst %,inst-%,$(SGML))
+XMLTARG = $(patsubst %,inst-%,$(XML))
+
+.PHONY: $(SGML) $(XMLT)
+
+all: build
+
+install: $(SGMLTARG) $(XMLTARG)
+
+inst-%-sgml: DD=$(DESTDIR)/$(docbookdir)/sgml-dtd-$*$(GARVERSION)-$(PATCHLEVEL)
+inst-%-sgml:
+	@echo Installing $*-sgml
+	@( cd $*-sgml; \
+		gmkdir -p $(DD); \
+		$(INSTALL_DATA) *dtd *mod $(DD)/; \
+		[ -n "`ls *dcl 2>/dev/null`" ] && $(INSTALL_DATA) *dcl $(DD); \
+		$(INSTALL_DATA) docbook.cat $(DD)/; \
+		if [ -d ent ]; then \
+			$(INSTALL_DIR) $(DD)/ent; \
+			$(INSTALL_DATA) ent/* $(DD)/ent/; \
+		fi )
+
+inst-%-xml: DD=$(DESTDIR)/$(docbookdir)/xml-dtd-$*$(GARVERSION)-$(PATCHLEVEL)
+inst-%-xml:
+	@echo Installing $*-xml
+	@( cd $*-xml; \
+		gmkdir -p $(DD); \
+		$(INSTALL_DATA) *dtd *mod $(DD)/; \
+		[ -n "`ls *dcl 2>/dev/null`" ] && $(INSTALL_DATA) *dcl $(DD); \
+		$(INSTALL_DATA) docbook.cat $(DD)/; \
+		if [ -d ent ]; then \
+			$(INSTALL_DIR) $(DD)/ent; \
+			$(INSTALL_DATA) ent/* $(DD)/ent/; \
+		fi )
+
+build:
+	@echo Nothing to build...dummy statement in action.
+
+showtarg:
+	@echo $(SGMLTARG) $(XMLTARG)


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list