# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           makefile 1.0

name                pdfcrack
version             0.21
revision            0
categories          security
maintainers         {i0ntempest @i0ntempest} openmaintainer
license             GPL-2+

description         Password recovery tool for PDF files
long_description    PDFCrack is a command-line tool for recovering user and owner \
                    passwords from PDF files. It supports wordlist and brute-force \
                    searches, saving and resuming searches, and benchmarking.

homepage            https://pdfcrack.sourceforge.net/
master_sites        sourceforge:project/${name}/${name}/${name}-${version}

checksums           rmd160  4bc07e63d6fd547813275e27d8519351451e485f \
                    sha256  26f00d4afcb70b5839047bc6f62e4253073ac437bdb526f01e8c04b220e97762 \
                    size    35822

makefile.override-append \
                    CFLAGS CPPFLAGS LDFLAGS
configure.optflags  -O3
configure.cflags-append \
                    -Wall -Wextra -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE

destroot {
    xinstall -m 755 ${worksrcpath}/${name} ${destroot}${prefix}/bin
    xinstall -m 644 ${worksrcpath}/${name}.1 ${destroot}${prefix}/share/man/man1
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} COPYING README changelog \
        ${destroot}${prefix}/share/doc/${name}
}

test.run            yes
test {
    system -W ${worksrcpath} "./${name} --version"
}
