blob: 9da8efe0b302ab507869d0142bd4e1edd391a8a2 [file] [log] [blame]
# -*- 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
# $Id$
PortSystem 1.0
name ccnx-repo
homepage http://www.ccnx.org/
license GPL-2+ LGPL-2.1+
version 0.6.2
revision 0
epoch 0
distfiles
categories net ccnx
maintainers ucla.edu:alexander.afanasyev
description Meta port for repo of ccnx package
depends_lib-append port:ccnx
set ccnxuser ccnx
set ccnxgroup ccnx
use_configure no
build { }
destroot {
system "echo \"su - ${ccnxuser} -c 'CCNR_DIRECTORY=${prefix}/var/db/ccnx-repo ${prefix}/bin/ccnr'\" > \"${destroot}${prefix}/bin/ccnr-wrapper\""
file attributes "${destroot}${prefix}/bin/ccnr-wrapper" -permissions 0755
}
post-activate {
xinstall -d "${prefix}/var/db"
xinstall -d -o ${ccnxuser} -g ${ccnxgroup} "${prefix}/var/db/ccnx-repo"
file attributes "${prefix}/var/db/ccnx-repo" -owner ${ccnxuser} -group ${ccnxgroup}
touch "${prefix}/var/log/ccnx-repo.log"
file attributes "${prefix}/var/log/ccnx-repo.log" -owner ${ccnxuser} -group ${ccnxgroup}
if {![file exists ${prefix}/var/db/ccnx-repo/config]} {
touch "${prefix}/var/db/ccnx-repo/config"
file attributes "${prefix}/var/db/ccnx-repo/config" -owner ${ccnxuser} -group ${ccnxgroup}
system "echo CCNR_DEBUG=WARNING >> \"${prefix}/var/db/ccnx-repo/config\""
system "echo CCNR_DIRECTORY=\"${prefix}/var/db/ccnx-repo\" >> \"${prefix}/var/db/ccnx-repo/config\""
}
}
startupitem.executable "${prefix}/bin/ccnr-wrapper"
startupitem.create yes
startupitem.name ${name}
startupitem.netchange no
startupitem.logevents yes
startupitem.logfile ${prefix}/var/log/ccnx-repo.log