Ticket #31656: macports.docbook-dsssl.diff
File macports.docbook-dsssl.diff, 3.3 KB (added by fgp (Florian G. Pflug), 13 years ago) |
---|
-
docbook-dsssl/Portfile
6 6 categories textproc 7 7 description the docbook dsssl stylesheets 8 8 platforms darwin 9 depends_run port:xmlcatmgr 9 10 maintainers decibel.org:decibel 10 11 master_sites sourceforge:docbook 11 12 homepage http://docbook.sf.net/ … … 13 14 use_configure no 14 15 build {} 15 16 16 set dirs_to_install "common contrib dtds frames html images lib olink print"17 set inst dir "share/dsssl/${name}"17 set things_to_install "common contrib dtds frames html images lib olink print catalog VERSION" 18 set install_dir ${prefix}/share/dsssl/${name} 18 19 20 # xmlcatmgr as installed by MacPorts defaults to using 21 # ${prefix}/etc/sgml/catalog (for XML) and ${prefix}/etc/sgml/catalog (for 22 # SGML) if no catalog is specified, but we'll specify the path just in case 23 # users have another installation of xmlcatmgr and happen to have it before 24 # ${prefix}/bin in their PATH. 25 set catalog.sgml ${prefix}/etc/sgml/catalog 26 set xmlcatmgr.args "-s -c ${catalog.sgml}" 27 19 28 destroot { 20 29 # Docs 21 xinstall -m 755 -d ${destroot}${ prefix}/${instdir} \30 xinstall -m 755 -d ${destroot}${install_dir} \ 22 31 ${destroot}${prefix}/share/doc/${name} \ 23 32 ${destroot}${prefix}/share/${name} 24 33 25 34 # bin 26 xinstall -m 644-W ${worksrcpath} bin/collateindex.pl \35 xinstall -m 755 -W ${worksrcpath} bin/collateindex.pl \ 27 36 ${destroot}${prefix}/bin 28 37 # man 29 38 xinstall -m 644 -W ${worksrcpath} bin/collateindex.pl.1 \ … … 31 40 32 41 # everything else 33 42 xinstall -m 644 -W ${worksrcpath} BUGS ChangeLog README \ 34 RELEASE-NOTES.html RELEASE-NOTES.xml RELEASE-NOTES.txt VERSIONWhatsNew \43 RELEASE-NOTES.html RELEASE-NOTES.xml RELEASE-NOTES.txt WhatsNew \ 35 44 ${destroot}${prefix}/share/doc/${name} 36 foreach dirname $ dirs_to_install {37 file copy ${worksrcpath}/${dirname} ${destroot}${ prefix}/${instdir}45 foreach dirname $things_to_install { 46 file copy ${worksrcpath}/${dirname} ${destroot}${install_dir} 38 47 } 39 48 } 40 49 50 post-activate { 51 # Make the directory if it doesn't exist 52 if {![file exists ${prefix}/etc/sgml]} { 53 xinstall -m 755 -d ${prefix}/etc/sgml 54 } 55 56 # Create the catalog file if it doesn't exist 57 if {![file exists ${catalog.sgml}]} { 58 system "xmlcatmgr ${xmlcatmgr.args} create" 59 } 60 61 # Add the CATALOG entry to the catalog if it doesn't exist 62 if {[catch {exec xmlcatmgr ${xmlcatmgr.args} lookup ${install_dir}/catalog}]} { 63 system "xmlcatmgr ${xmlcatmgr.args} add CATALOG ${install_dir}/catalog" 64 } 65 } 66 67 if {${registry.format} == "receipt_flat"} { 68 notes \ 69 "###################################################################### 70 # As the flat registry format does not support post-deactivate hooks, 71 # you will need to ensure that you manually remove the catalog 72 # entry for this port when you uninstall it. To do so, run 73 # \"xmlcatmgr ${xmlcatmgr.args} remove CATALOG ${install_dir}/catalog\". 74 ######################################################################" 75 } 76 77 # This will remove the catalog entry for this port. 78 post-deactivate { 79 # Remove the CATALOG entry from the catalog 80 system "xmlcatmgr ${xmlcatmgr.args} remove CATALOG ${install_dir}/catalog" 81 }