1 | # $Id: Portfile 71533 2010-09-15 20:26:12Z ryandesign@macports.org $ |
---|
2 | PortSystem 1.0 |
---|
3 | |
---|
4 | name docbook-dsssl |
---|
5 | version 1.79 |
---|
6 | categories textproc |
---|
7 | description the docbook dsssl stylesheets |
---|
8 | platforms darwin |
---|
9 | depends_run port:xmlcatmgr |
---|
10 | maintainers decibel.org:decibel |
---|
11 | master_sites sourceforge:docbook |
---|
12 | homepage http://docbook.sf.net/ |
---|
13 | checksums md5 8459913bbd8a5724a6fe4b9ed5bab5af |
---|
14 | use_configure no |
---|
15 | build {} |
---|
16 | |
---|
17 | set things_to_install "common contrib dtds frames html images lib olink print catalog" |
---|
18 | set install_dir ${prefix}/share/dsssl/${name} |
---|
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 | |
---|
27 | destroot { |
---|
28 | # Docs |
---|
29 | xinstall -m 755 -d ${destroot}${install_dir} \ |
---|
30 | ${destroot}${prefix}/share/doc/${name} \ |
---|
31 | ${destroot}${prefix}/share/${name} |
---|
32 | |
---|
33 | # bin |
---|
34 | xinstall -m 755 -W ${worksrcpath} bin/collateindex.pl \ |
---|
35 | ${destroot}${prefix}/bin |
---|
36 | # man |
---|
37 | xinstall -m 644 -W ${worksrcpath} bin/collateindex.pl.1 \ |
---|
38 | ${destroot}${prefix}/share/man/man1 |
---|
39 | |
---|
40 | # everything else |
---|
41 | xinstall -m 644 -W ${worksrcpath} BUGS ChangeLog README \ |
---|
42 | RELEASE-NOTES.html RELEASE-NOTES.xml RELEASE-NOTES.txt VERSION WhatsNew \ |
---|
43 | ${destroot}${prefix}/share/doc/${name} |
---|
44 | foreach dirname $things_to_install { |
---|
45 | file copy ${worksrcpath}/${dirname} ${destroot}${install_dir} |
---|
46 | } |
---|
47 | } |
---|
48 | |
---|
49 | post-activate { |
---|
50 | # Make the directory if it doesn't exist |
---|
51 | if {![file exists ${prefix}/etc/sgml]} { |
---|
52 | xinstall -m 755 -d ${prefix}/etc/sgml |
---|
53 | } |
---|
54 | |
---|
55 | # Create the catalog file if it doesn't exist |
---|
56 | if {![file exists ${catalog.sgml}]} { |
---|
57 | system "xmlcatmgr -s -c ${catalog.sgml} create" |
---|
58 | } |
---|
59 | |
---|
60 | # Add the CATALOG entry to the catalog if it doesn't exist |
---|
61 | if {[catch {exec xmlcatmgr lookup ${install_dir}/catalog}]} { |
---|
62 | system "xmlcatmgr -s -c ${catalog.sgml} add CATALOG ${install_dir}/catalog" |
---|
63 | } |
---|
64 | } |
---|
65 | |
---|
66 | if {${registry.format} == "receipt_flat"} { |
---|
67 | notes \ |
---|
68 | "###################################################################### |
---|
69 | # As the flat registry format does not support post-deactivate hooks, |
---|
70 | # you will need to ensure that you manually remove the catalog |
---|
71 | # entry for this port when you uninstall it. To do so, run |
---|
72 | # \"xmlcatmgr -s -c ${prefix}/etc/sgml/catalog remove CATALOG ${install_dir}/catalog\". |
---|
73 | ######################################################################" |
---|
74 | } |
---|
75 | |
---|
76 | # This will remove the catalog entry for this port. |
---|
77 | post-deactivate { |
---|
78 | # Remove the CATALOG entry from the catalog |
---|
79 | system "xmlcatmgr -s -c ${catalog.sgml} remove CATALOG ${install_dir}/catalog" |
---|
80 | } |
---|
81 | |
---|
82 | livecheck.type none |
---|