Ticket #42857: patch-base-Portfile2.diff

File patch-base-Portfile2.diff, 3.8 KB (added by jul_bsd@…, 10 years ago)
  • security/base/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
    1010long_description  Basic Analysis and Security Engine - based on the ACID \
    1111                  project. It provides a web front-end to query and analyze \
    1212                  the alerts from SNORT.
     13license           GPL-2
    1314platforms         darwin
    14 homepage          http://secureideas.sourceforge.net/
     15homepage          http://base.professionallyevil.com/
    1516master_sites      sourceforge:secureideas
    16 checksums         md5 66e50f45c6bbf6b0cb2913b8c67f50d6
     17checksums           rmd160  e66552039a806d09db40f1e7f363b2cd68cde064 \
     18                    sha256  23910f5277ceb43398442074e444182941bf7f6da85efd84ecdd0cf62c4b8935
    1719depends_run       port:gd2 \
    18                   port:adodb
     20                  port:adodb \
     21                  port:pear-Mail port:pear-Mail_Mime port:pear-Image_Graph \
     22                  port:pear-Image_Canvas port:pear-Image_Color port:pear-Numbers_Roman
     23
     24## http://sourceforge.net/p/secureideas/patches/27/
     25## +mysql support through mysqli extension
     26patchfiles         patch-base.diff
    1927
    2028use_configure     no
    2129build             {}
    2230
    2331set basedir ${prefix}/share/${name}
     32#set basedir ${prefix}/www/${name}
    2433set docsdir ${prefix}/share/doc/${name}
    2534
    2635destroot {
    2736    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}"
     37    foreach file [glob -directory ${worksrcpath}/ *] {
     38        copy ${file} ${destroot}${basedir}/
     39    }
     40
     41    reinplace "s|\$DBlib_path = '';|\$DBlib_path = '${prefix}/adodb5';|g" ${destroot}${basedir}/base_conf.php.dist
    3142}
    3243
    3344post-activate {
    34 ui_msg "\n
    35 Make sure to customize ${prefix}/share/base/base_conf.php.dist
    36 \n"
     45        ## Not sure if needed. If the file exists, wizard says you need to delete it
     46        if ![file exists ${basedir}/base_conf.php ] {
     47                copy ${basedir}/base_conf.php.dist ${basedir}/base_conf.php
     48        }
    3749}
     50
     51notes "
     52**** To complete the ${name} installation ****
     53
     541) Install PHP and Database (not covered).
     55   Database can be MySQL, PgSQL, MsSQL or Oracle
     56   If you go for PHP 5.5 and FPM for example, you will need additionaly
     57        $ sudo port install php55-fpm php55-pear
     58   Edit your php.ini to include pear path
     59        include_path = \".:${prefix}/lib/php\"
     60
     612) prepare database for ${name}. Example with Mysql
     62
     63   Create a snort MySQL user and snort database.
     64        mysql5 -u root -p (login with root password set above when prompted)
     65        mysql> GRANT ALL ON snort.* to snort@localhost;
     66        mysql> SET PASSWORD FOR snort@localhost = PASSWORD('<my-snortdb-pwd>');
     67        mysql> flush privileges;
     68        mysql> create database snort;
     69        mysql> exit;
     70
     714) Edit ${basedir}/base_conf.php to match your config
     72   OR
     73   Call the wizard:
     74        http://localhost/base/
     75     In this case, temporary
     76        # chown #web_user# ${basedir}
     77        And check your php install is at most warning log level in your php.ini
     78     Remember after install to
     79        # chown root ${basedir}
     80
     81BUGS: lot of \"Strict Standards: Declaration \". wizard works but usage not sure.
     82Software is unmaintained for a long time, so check alternatives.
     83ex:
     84Strict Standards: Declaration of MultipleElementCriteria::SanitizeElement() should be compatible with BaseCriteria::SanitizeElement() in ${prefix}/share/base/includes/base_state_citems.inc.php on line 292
     85"
     86
     87livecheck.type     regex
     88livecheck.url       ${homepage}
     89livecheck.regex     "Current Version: (\\d+(?:\\.\\d+)*)"