Permalink
Fetching contributors…
Cannot retrieve contributors at this time
92 lines (73 sloc) 2.82 KB
# -*- mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
PortSystem 1.0
name cgit
version 1.1
# See Makefile GIT_VER
set git_version 2.11.0
categories www devel
license GPL-2
maintainers nomaintainer
description A fast web interface for the git source code management system
platforms darwin
long_description \
cgit is an attempt to create a fast web interface for the git scm, using a \
builtin cache to decrease server io-pressure. It can run on any \
CGI-capable web server.
homepage https://git.zx2c4.com/cgit/
master_sites ${homepage}snapshot:cgit \
https://www.kernel.org/pub/software/scm/git:git
dist_subdir git
use_xz yes
set cgit_distfile ${distfiles}
set git_distname git-${git_version}
set git_distfile ${git_distname}${extract.suffix}
distfiles ${cgit_distfile}:cgit ${git_distfile}:git
checksums ${cgit_distfile} \
rmd160 9ad96a56d17ae060b73e8d576d0c065aa590fcfb \
sha256 0889af29be15fc981481caa09579f982b9740fe9fd2860ab87dff286f4635890 \
size 86268 \
${git_distfile} \
rmd160 dc2c45d6763732129fb8e383877ee434972f79e8 \
sha256 7e7e8d69d494892373b87007674be5820a4bc1ef596a0117d03ea3169119fd0b \
size 4197984
depends_lib port:git \
path:lib/libssl.dylib:openssl \
port:zlib \
port:libiconv
post-extract {
delete ${worksrcpath}/git
move ${workpath}/${git_distname} ${worksrcpath}/git
}
patchfiles write_archive.patch
post-patch {
file copy ${filespath}/cgit.conf ${worksrcpath}/cgit.conf
reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/cgit.conf
reinplace "s|@GIT_VER@|${git_version}|g" ${worksrcpath}/cgit.conf
reinplace "s|@GIT_URL@|file://${distpath}/${git_distfile}|g" ${worksrcpath}/cgit.conf
}
set user _www
set group _www
if {${os.platform} eq "darwin" && ${os.major} <= 8} {
set user www
set group www
}
post-destroot {
xinstall -m 444 ${worksrcpath}/cgitrc.5.txt ${destroot}${prefix}/etc/cgitrc.sample
xinstall -m 700 -o ${user} -g ${group} -d ${destroot}${prefix}/var/cache/cgit
destroot.keepdirs ${destroot}${prefix}/var/cache/cgit
}
use_configure no
variant universal {}
configure.ldflags-append -liconv
build.args prefix=${prefix} \
CC="${configure.cc} [get_canonical_archflags cc]" \
NO_GETTEXT=1 \
NO_LUA=1 \
V=1
build.env CFLAGS="${configure.cflags}" \
LDFLAGS="${configure.ldflags}"
destroot.args {*}${build.args}
destroot.env {*}${build.env}
livecheck.type regex
livecheck.url ${homepage}log/?h=master
livecheck.regex {>v([0-9.]+)<}