Port review of pure-ftpd

Scott Haneda talklists at newgeo.com
Mon Oct 26 23:19:07 PDT 2009


I ran into an issue with a new configure arg that the devloper added,  
aside from that, things are going well, and wanted a review of my work  
if anyone has time.

Is there any way, or any desire, to pretty up the long description?   
for example, the below, I would rather it be:

	foo has the following features:
		1) anti-warez system
		2) throttling
		3) ratios

I suspect you get the idea.  I have a hard time getting it to all line  
up.  Is this not even something that the I should be caring about?

use_bzip2           yes
That was there before I took this portfile over, there is a tgz file,  
if I just remove that line, would I default to the tgz?

distname            pure-ftpd-${version}
Do I need distname at all in this portfile?

My second livecheck, how did I do?

I am copying in a sample plist in the post-destroot, any comments on  
this?

All the ui_msg in the port-install, is that the right place?

The software only allows one language to be compiled in, but I suspect  
that MP would allow as many + variants as were listed, is there a way  
to solve this?

Is there any way to order the variants as shown by `port info`, and if  
not, is it a bad idea to prefix the language variants with a "z" so  
they do not get in the way of letting people know there is myqsl and  
tls available for this?

I guess I can remove the readme debian and windows files.

Thanks for any suggestions.

# $Id$

PortSystem          1.0

name                pure-ftpd
version             1.0.24
categories          net
platforms           darwin
maintainers         hostwizard.com:scott
license             BSD

homepage            http://pureftpd.org/
description         Pure-FTPd is a fast, production-quality, standard- 
conformant FTP (SSL/TLS)
		    server, based upon Troll-FTPd.

long_description    ${name} has been designed to be secure in default  
configuration, it has no\
                     known vulnerabilities. Features Include: virtual  
domains, built-in 'ls', \
                     anti-warez system, configurable ports for passive  
downloads, FXP protocol, \
                     bandwidth throttling, ratios, LDAP / MySQL /  
PostgreSQL-based authentication,\
                     fortune files, Apache-like log files, text /  
HTML / XML real-time status report,\
                     virtual users, virtual quotas, privilege  
separation, SSL/TLS and more.

master_sites        ftp://ftp.pureftpd.org/pure-ftpd/releases/ \
                     ftp://ftp.fr.pureftpd.org/pure-ftpd/releases/

distname            pure-ftpd-${version}
use_bzip2           yes

checksums           md5     2f0869166ddb3a9cbe5e4887eae6e74d \
                     sha1    bf8d04d19a83d2bec214eaa38095a070d549d978 \
                     rmd160  a320048289f22161c370e12a9253f314877903ba

livecheck.type      regex
livecheck.url       http://download.pureftpd.org/pub/${name}/releases/
livecheck.regex     ${name}-(${version})${extract.suffix}

configure.args      --with-cookie \
                     --with-everything \
                     --with-virtualchroot \
                     --with-paranoidmsg \
                     --without-inetd \
                     --without-capabilities \
                     --mandir=${prefix}/share/man \
                     --infodir=${prefix}/share/info \
                     --with-localstatedir=${prefix}

destroot.destdir    prefix=${destroot}${prefix} \
                     mandir=${destroot}${prefix}/share/man

post-destroot {
      file mkdir ${prefix}/etc/${name}/ssl
      file mkdir ${prefix}/etc/${name}/mysql
      file mkdir ${prefix}/var/log/${name}
      file mkdir ${destroot}${prefix}/share/doc/${name}

      # Install the notes and readme files
      xinstall -m 644 -v -W ${worksrcpath} \
      AUTHORS ChangeLog CONTACT COPYING FAQ HISTORY INSTALL NEWS  
README \
      README.Authentication-Modules README.Windows  
README.Configuration-File \
      README.Contrib README.Debian README.Donations README.LDAP  
README.MacOS-X \
      README.MySQL README.PGSQL README.TLS README.Virtual-Users THANKS \
           ${destroot}${prefix}/share/doc/${name}

      # Copy in the sample launchd plist item
      file copy ${filespath}/org.pure-ftpd.ftpd.plist.sample $ 
{destroot}${prefix}/share/doc/${name}/org.pure-ftpd.ftpd.plist.sample
}

# Notify the user how to launch the ftpd
post-install {
      ui_msg ""
      ui_msg "PureFTPd documentation is located in: ${prefix}/share/ 
doc/${name}"
      ui_msg ""
      ui_msg "You can start PureFTPd from the command line with:"
      ui_msg "     sudo ${prefix}/sbin/${name} &"
      ui_msg ""
      ui_msg "The next release of PureFTPd (1.0.25) will no longer  
support"
      ui_msg "xinetd, and has been removed from this version.  If you"
      ui_msg "are using that method to start PureFTPd now, please  
switch"
      ui_msg "to using launcd(8)."
      ui_msg ""
      ui_msg "A sample launchd plist has been made to get your started,"
      ui_msg "to enable it, issue the following commands:"
      ui_msg "     sudo cp ${prefix}/share/doc/${name}/org.pure- 
ftpd.ftpd.plist.sample /Library/LaunchDaemons/org.pure-ftpd.ftpd.plist"
      ui_msg "     sudo launchctl load -w /Library/LaunchDaemons/ 
org.pure-ftpd.ftpd.plist"
}

variant mysql5 description "Use native MySQL support for privelages  
database." {
      depends_lib-append path:bin/mysql_config5:mysql5
      configure.args-append --with-mysql
      configure.cflags-append "-I${prefix}/include/mysql5/mysql"
      configure.ldflags-append "-L${prefix}/lib/mysql5/mysql"
}

variant tls description "Encryption of the control channel using SSL/ 
TLS" {
      depends_lib             lib:libssl.dylib:openssl
      configure.args-append    --with-tls \
                               --with-certfile=${prefix}/etc/${name}/ 
ssl/pure-ftpd.pem
}

# Langugage variants, should only be able to choose one.
variant lang_brazilian        description "Use Bazilian language for  
server messages" { configure.args-append --with-language=brazilian }
variant lang_czech            description "Use Czech language for  
server messages" { configure.args-append --with-language=czech }
variant lang_danish           description "Use Danish language for  
server messages" { configure.args-append --with-language=danish }
variant lang_dutch            description "Use Dutch language for  
server messages" { configure.args-append --with-language=dutch }
variant lang_french           description "Use French language for  
server messages" { configure.args-append --with-language=french }
variant lang_french_funny     description "Use French funny language  
for server messages" { configure.args-append --with-language=french- 
funny }
variant lang_german           description "Use German language for  
server messages" { configure.args-append --with-language=german }
variant lang_italian          description "Use Italian language for  
server messages" { configure.args-append --with-language=italian }
variant lang_korean           description "Use Korean language for  
server messages" { configure.args-append --with-language=korean }
variant lang_norwegian        description "Use Norwegian language for  
server messages" { configure.args-append --with-language=norwegian }
variant lang_polish           description "Use Polish language for  
server messages" { configure.args-append --with-language=polish }
variant lang_romanian         description "Use Romanian language for  
server messages" { configure.args-append --with-language=romanian }
variant lang_russian          description "Use Russian language for  
server messages" { configure.args-append --with-language=russian }
variant lang_simpple_chinese  description "Use simplified Chinese for  
server messages" { configure.args-append --with-language=simplified- 
chinese }
variant lang_slovak           description "Use Slovak language for  
server messages" { configure.args-append --with-language=slovak }
variant lang_spanish          description "Use Spanish language for  
server messages" { configure.args-append --with-language=spanish }
variant lang_swedish          description "Use Swedish language for  
server messages" { configure.args-append --with-language=swedish }
variant lang_trad_chinese     description "Use traditional Chinese  
language for server messages" { configure.args-append --with- 
language=traditional-chinese }

-- 
Scott * If you contact me off list replace talklists@ with scott@ *



More information about the macports-dev mailing list