# -*- 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           qmake5 1.0

name                synkron
svn.revision        200
version             1.6.2+r${svn.revision}
revision            0

categories          sysutils archivers
license             GPL-2+
maintainers         nomaintainer

description         Synkron is an application for synchronising folders
long_description    Synkron is an application that helps you keep your files and folders always \
                    updated. You can easily sync your documents, music or pictures to have their \
                    latest versions everywhere.

homepage            http://synkron.sourceforge.net/
fetch.type          svn
svn.url             https://svn.code.sf.net/p/synkron/code/trunk

qt5.min_version     5.0
qt5.depends_build_component \
                    qttools

worksrcdir          trunk

post-extract {
    delete {*}[glob ${worksrcpath}/i18n/Synkron-*.qm]
}

patch.pre_args-replace  -p0 -p1
patchfiles          patch-add_missing_translations.diff

post-patch {
    reinplace "/QMAKE_MAC_SDK/d" ${worksrcpath}/Synkron.pro
    reinplace "/QMAKE_MACOSX_DEPLOYMENT_TARGET/d" ${worksrcpath}/Synkron.pro
}

pre-configure {
    system -W ${worksrcpath} "${prefix}/libexec/qt5/bin/lrelease Synkron.pro"
}

destroot {
    move ${worksrcpath}/Synkron.app ${destroot}${applications_dir}
}
