source: trunk/dports/print/cups-pdf/Portfile @ 43793

Last change on this file since 43793 was 43793, checked in by blb@…, 11 years ago

print/cups-pdf - make livecheck work

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1# $Id: Portfile 43793 2008-12-15 05:09:05Z blb@macports.org $
2
3PortSystem          1.0
4name                cups-pdf
5version             2.4.8
6categories          print textproc
7maintainers         blb
8description         Provides a print-to-PDF feature through CUPS
9long_description \
10   This software is designed to produce PDF files in a heterogeneous \
11   network by providing a PDF printer on the central fileserver.
12
13platforms           darwin
14
15homepage            http://www.cups-pdf.de/
16master_sites        ${homepage}src/
17distname            ${name}_${version}
18worksrcdir          ${name}-${version}
19
20checksums           md5     0d17dc5e094b366c8ad43cc27c7f82c9 \
21                    sha1    7da47c61fef313e47fa6db9f1859499683fc72e8 \
22                    rmd160  ceed244effd0c9e63ec0a376a2adabb98abd9a4f
23
24post-extract {
25   reinplace "s|/etc|${prefix}/etc|" ${worksrcpath}/src/cups-pdf.h
26   reinplace "s|/var/spool|${prefix}/var/spool|" \
27      ${worksrcpath}/src/cups-pdf.h
28   reinplace "s|/var/log|${prefix}/var/log|" ${worksrcpath}/src/cups-pdf.h
29}
30
31use_configure       no
32
33build {
34   system "cd ${worksrcpath}/src && ${configure.cc} -Os -o cups-pdf cups-pdf.c"
35}
36
37destroot {
38   xinstall -m 755 -d ${destroot}${prefix}/libexec/cups/backend \
39      ${destroot}/${prefix}/etc/cups ${destroot}${prefix}/share/cups/model \
40      ${destroot}/${prefix}/share/doc/${name} \
41      ${destroot}${prefix}/var/spool/cups-pdf \
42      ${destroot}${prefix}/var/log/cups
43   xinstall -m 700 ${worksrcpath}/src/cups-pdf \
44      ${destroot}${prefix}/libexec/cups/backend
45   xinstall -m 644 ${worksrcpath}/extra/cups-pdf.conf \
46      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
47   xinstall -m 644 ${worksrcpath}/extra/CUPS-PDF.ppd \
48      ${destroot}${prefix}/share/cups/model
49   xinstall -m 644 -W ${worksrcpath} README COPYING ChangeLog \
50      ${destroot}${prefix}/share/doc/${name}
51
52   # Some initial changes to the conf file
53   reinplace "s|#Out .*|Out \${HOME}/Desktop/cups-pdf/|" \
54      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
55   reinplace "s| /var/spool| ${prefix}/var/spool|" \
56      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
57   reinplace "s| /var/log| ${prefix}/var/log|" \
58      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
59   reinplace "s|#Cut .*|Cut 3|" \
60      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
61   reinplace "s|#Label .*|Label 1|" \
62      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
63   reinplace "s|#Log |Log |" \
64      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
65   reinplace "s|#Log |Log |" \
66      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
67   reinplace "s|#GhostScript .*|GhostScript /usr/bin/pstopdf|" \
68      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
69   reinplace "s|#GSCall .*|GSCall %s %s -o %s %s|" \
70      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
71   reinplace "s|#PDFVer .*|PDFVer |" \
72      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
73}
74destroot.keepdirs   ${destroot}${prefix}/var/spool/cups-pdf \
75                    ${destroot}${prefix}/var/log/cups
76
77post-install {
78   ui_msg "\n*************************************************************"
79   ui_msg "If this is the first installation, there are a couple of items"
80   ui_msg "to do:"
81   ui_msg "   First, symlink the cups-pdf backend with:"
82   ui_msg "      sudo ln -s ${prefix}/libexec/cups/backend/cups-pdf /usr/libexec/cups/backend/"
83   ui_msg "   Next, symlink the color postscript model:"
84   ui_msg "      sudo ln -s ${prefix}/share/cups/model/CUPS-PDF.ppd /usr/share/cups/model/"
85   ui_msg "   Then, create the config file:"
86   ui_msg "      sudo cp ${prefix}/etc/cups/cups-pdf.conf.dist ${prefix}/etc/cups/cups-pdf.conf"
87   ui_msg "   Edit cups-pdf.conf as needed"
88   ui_msg "   Finally, tell cupsd to update (it may not be running on 10.5):"
89   ui_msg "      sudo killall -1 cupsd"
90   ui_msg "\n*************************************************************"
91}
92
93livecheck.check     freshmeat
94livecheck.name      cupspdf
95
Note: See TracBrowser for help on using the repository browser.