29 | | set conf_file "filetypes.conf" |
30 | | set old_conf_files { "scriptre.conf" "extensions.conf" } |
31 | | destroot { |
32 | | xinstall -m 755 ${worksrcpath}/highlight/highlight ${destroot}${prefix}/bin |
33 | | |
34 | | xinstall -m 755 -d ${destroot}${prefix}/etc/${name} |
35 | | xinstall -m 644 ${worksrcpath}/${conf_file} \ |
36 | | ${destroot}${prefix}/etc/${name}/${conf_file}.sample |
37 | | |
38 | | xinstall -m 755 -d ${destroot}${prefix}/share/${name} |
39 | | foreach dir { "langDefs" "themes" "indentSchemes" "helpmsg" } { |
40 | | file copy ${worksrcpath}/${dir} ${destroot}${prefix}/share/${name} |
41 | | system "chmod 644 ${destroot}${prefix}/share/${name}/${dir}/*" |
42 | | } |
43 | | |
44 | | xinstall -m 755 -d ${destroot}${prefix}/share/man/man1 |
45 | | xinstall -m 644 ${worksrcpath}/man/highlight.1.gz \ |
46 | | ${destroot}${prefix}/share/man/man1 |
47 | | |
48 | | xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} |
49 | | foreach file { "AUTHORS" "README" "README_DE" "README_INDENT" "ChangeLog" \ |
50 | | "COPYING" "INSTALL" } { |
51 | | xinstall -m 644 ${worksrcpath}/${file} \ |
52 | | ${destroot}${prefix}/share/doc/${name} |
53 | | } |
54 | | |
55 | | file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${name} |
| 33 | post-destroot { |
| 34 | file rename ${destroot}${prefix}/etc/highlight/filetypes.conf \ |
| 35 | ${destroot}${prefix}/etc/highlight/filetypes.conf.sample |
59 | | # copy over the sample conf file if necessary |
60 | | if { ![file exists ${prefix}/etc/${name}/${conf_file}] } { |
61 | | file copy ${prefix}/etc/${name}/${conf_file}.sample \ |
62 | | ${prefix}/etc/${name}/${conf_file} |
63 | | } |
64 | | |
65 | | # warn the user of deprecated conf files |
66 | | set deprecated_conf_files {} |
67 | | foreach file $old_conf_files { |
68 | | if { [file exists ${prefix}/etc/${name}/${file}] } { |
69 | | file rename ${prefix}/etc/${name}/${file} \ |
70 | | ${prefix}/etc/${name}/${file}.dport_bak |
71 | | lappend deprecated_conf_files ${file} |
72 | | } |
73 | | } |
74 | | if { [llength $deprecated_conf_files] } { |
75 | | ui_msg "\nWarning: Old highlight conf files: ${deprecated_conf_files}" |
76 | | ui_msg "have been replaced by: ${conf_file}" |
77 | | ui_msg "as of highlight-2.4.5." |
78 | | ui_msg "\nThe following old conf files have been renamed (and should be" |
79 | | ui_msg "removed):\n" |
80 | | foreach file $deprecated_conf_files { |
81 | | ui_msg "${prefix}/etc/${name}/${file} ->" |
82 | | ui_msg "${prefix}/etc/${name}/${file}.dport_bak" |
83 | | ui_msg "" |
84 | | } |
85 | | } |
| 39 | # copy over the sample conf file if necessary |
| 40 | if { ![file exists ${prefix}/etc/filetypes.conf] } { |
| 41 | file copy ${prefix}/etc/filetypes.conf.sample \ |
| 42 | ${prefix}/etc/filetypes.conf.sample |
| 43 | } |