Ticket #42857: patch-base-Portfile.diff

File patch-base-Portfile.diff, 3.7 KB (added by jul_bsd@…, 11 years ago)
  • Portfile

    old new  
    33PortSystem        1.0
    44
    55name              base
    6 version           1.3.9
     6version           1.4.5
    77categories        security
    88maintainers       markd
    99description       Basic Analysis and Security Engine - Snort web frontend
     
    1111                  project. It provides a web front-end to query and analyze \
    1212                  the alerts from SNORT.
    1313platforms         darwin
    14 homepage          http://secureideas.sourceforge.net/
     14homepage          http://base.professionallyevil.com/
    1515master_sites      sourceforge:secureideas
    16 checksums         md5 66e50f45c6bbf6b0cb2913b8c67f50d6
     16checksums           rmd160  e66552039a806d09db40f1e7f363b2cd68cde064 \
     17                    sha256  23910f5277ceb43398442074e444182941bf7f6da85efd84ecdd0cf62c4b8935
    1718depends_run       port:gd2 \
    18                   port:adodb
     19                  port:adodb \
     20                  port:pear-Mail port:pear-Mail_Mime port:pear-Image_Graph \
     21                  port:pear-Image_Canvas port:pear-Image_Color port:pear-Numbers_Roman
     22
     23## http://sourceforge.net/p/secureideas/patches/27/
     24## +mysql support through mysqli extension
     25patchfiles         patch-base.diff
    1926
    2027use_configure     no
    2128build             {}
    2229
    2330set basedir ${prefix}/share/${name}
     31#set basedir ${prefix}/www/${name}
    2432set docsdir ${prefix}/share/doc/${name}
    2533
    2634destroot {
    2735    xinstall -m 755 -d ${destroot}${basedir}
    28     xinstall -m 755 -d ${destroot}${docsdir}
    29     system "cd ${worksrcpath} && cp -R . ${destroot}${basedir}"
    30     system "cd ${worksrcpath}/docs/ && cp -R . ${destroot}${docsdir}"
     36    foreach file [glob -directory ${worksrcpath}/ *] {
     37        copy ${file} ${destroot}${basedir}/
     38    }
     39
     40    reinplace "s|\$DBlib_path = '';|\$DBlib_path = '${prefix}/adodb5';|g" ${destroot}${basedir}/base_conf.php.dist
    3141}
    3242
    3343post-activate {
    34 ui_msg "\n
    35 Make sure to customize ${prefix}/share/base/base_conf.php.dist
    36 \n"
     44        ## Not sure if needed. If the file exists, wizard says you need to delete it
     45        if ![file exists ${basedir}/base_conf.php ] {
     46                copy ${basedir}/base_conf.php.dist ${basedir}/base_conf.php
     47        }
    3748}
     49
     50notes "
     51**** To complete the ${name} installation ****
     52
     531) Install PHP and Database (not covered).
     54   Database can be MySQL, PgSQL, MsSQL or Oracle
     55   If you go for PHP 5.5 and FPM for example, you will need additionaly
     56        $ sudo port install php55-fpm php55-pear
     57   Edit your php.ini to include pear path
     58        include_path = \".:/opt/local/lib/php\"
     59
     602) prepare database for ${name}. Example with Mysql
     61
     62   Create a snort MySQL user and snort database.
     63        mysql5 -u root -p (login with root password set above when prompted)
     64        mysql> GRANT ALL ON snort.* to snort@localhost;
     65        mysql> SET PASSWORD FOR snort@localhost = PASSWORD('<my-snortdb-pwd>');
     66        mysql> flush privileges;
     67        mysql> create database snort;
     68        mysql> exit;
     69
     704) Edit ${basedir}/base_conf.php to match your config
     71   OR
     72   Call the wizard:
     73        http://localhost/base/
     74     In this case, temporary
     75        # chown #web_user# ${basedir}
     76        And check your php install is at most warning log level in your php.ini
     77     Remember after install to
     78        # chown root ${basedir}
     79
     80BUGS: lot of \"Strict Standards: Declaration \". wizard works but usage not sure.
     81Software is unmaintained for a long time, so check alternatives.
     82ex:
     83Strict Standards: Declaration of MultipleElementCriteria::SanitizeElement() should be compatible with BaseCriteria::SanitizeElement() in /opt/local/share/base/includes/base_state_citems.inc.php on line 292
     84"
     85
     86livecheck.type     regex
     87livecheck.url       ${homepage}
     88livecheck.regex     "Current Version: (\\d+(?:\\.\\d+)*)"