Update tinyproxy with SMF manifest and fixed some minor build bugs.

This commit is contained in:
Juraj Lutter 2019-07-13 11:48:45 +00:00
parent 2eb3c622de
commit d33cfdc016
11 changed files with 225 additions and 1 deletions

View File

@ -1,7 +1,7 @@
# $NetBSD$
#
PKGNAME= cronolog-devel-1.7.1
PKGNAME= cronolog-devel-1.7.1-beta
DISTNAME= cronolog-1.7.1-beta
CATEGORIES= www
MASTER_SITES= http://BSDforge.com/projects/source/sysutils/cronolog-devel/

5
tinyproxy/DESCR Normal file
View File

@ -0,0 +1,5 @@
tinyproxy is a lightweight HTTP/SSL proxy. Designed from the ground up to be
fast and yet small, it is an ideal solution for sites where a full-featured
HTTP proxy is required, but the system resources required to run a more
demanding HTTP proxy are unavailable. tinyproxy is fully compatible with all
existing web browsers.

64
tinyproxy/Makefile Normal file
View File

@ -0,0 +1,64 @@
# $NetBSD: Makefile,v 1.40 2019/05/23 19:23:21 rillig Exp $
DISTNAME= tinyproxy-1.10.0
PKGREVISION= 2
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_GITHUB:=tinyproxy/}
GITHUB_RELEASE= ${PKGVERSION_NOREV}
EXTRACT_SUFX= .tar.xz
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://tinyproxy.github.io/
COMMENT= Lightweight HTTP/SSL proxy
LICENSE= gnu-gpl-v2
BUILD_DEPENDS+= asciidoc-[0-9]*:../../textproc/asciidoc
BUILD_DEFS+= VARBASE
PKG_SYSCONFSUBDIR= tinyproxy
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --localstatedir=${VARBASE}
CONFIGURE_ARGS+= --enable-transparent
RCD_SCRIPTS= tinyproxy
.include "../../mk/bsd.prefs.mk"
TINYPROXY_USER?= tinyproxy
TINYPROXY_GROUP?= tinyproxy
PKG_GROUPS= ${TINYPROXY_GROUP}
PKG_USERS= ${TINYPROXY_USER}:${TINYPROXY_GROUP}
PKG_GROUPS_VARS+= TINYPROXY_GROUP
PKG_USERS_VARS= TINYPROXY_USER
FILES_SUBST+= TINYPROXY_USER=${TINYPROXY_USER:Q}
FILES_SUBST+= TINYPROXY_GROUP=${TINYPROXY_GROUP:Q}
EGDIR= ${PREFIX}/share/examples/tinyproxy
CONF_FILES= ${EGDIR}/tinyproxy.conf.default ${PKG_SYSCONFDIR}/tinyproxy.conf
SUBST_CLASSES+= docs
SUBST_STAGE.docs= pre-configure
SUBST_FILES.docs= docs/man5/tinyproxy.conf.txt.in docs/man8/tinyproxy.txt.in etc/tinyproxy.conf.in
SUBST_VARS.docs= TINYPROXY_USER
SUBST_VARS.docs+= TINYPROXY_GROUP
SUBST_VARS.docs+= PKG_SYSCONFDIR
SUBST_VARS.docs+= VARBASE
INSTALLATION_DIRS= ${EGDIR} share/doc/tinyproxy
PLIST_SUBST+= VARBASE=${VARBASE}
PLIST_SUBST+= TINYPROXY_USER=${TINYPROXY_USER:Q}
PLIST_SUBST+= TINYPROXY_GROUP=${TINYPROXY_GROUP:Q}
PLIST_SUBST+= MKDIR=${MKDIR:Q} RMDIR=${RMDIR:Q} TRUE=${TRUE:Q}
PLIST_SUBST+= CHMOD=${CHMOD:Q} CHOWN=${CHOWN:Q}
post-install:
${INSTALL_DATA} ${WRKSRC}/etc/tinyproxy.conf \
${DESTDIR}${EGDIR}/tinyproxy.conf.default
${INSTALL_DATA} ${WRKSRC}/docs/filter-howto.txt \
${DESTDIR}${PREFIX}/share/doc/tinyproxy/
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

21
tinyproxy/PLIST Normal file
View File

@ -0,0 +1,21 @@
@comment $NetBSD: PLIST,v 1.8 2018/10/12 13:57:46 adam Exp $
bin/tinyproxy
man/man5/tinyproxy.conf.5
man/man8/tinyproxy.8
share/doc/tinyproxy/AUTHORS
share/doc/tinyproxy/NEWS
share/doc/tinyproxy/README
share/doc/tinyproxy/README.md
share/doc/tinyproxy/filter-howto.txt
share/examples/tinyproxy/tinyproxy.conf.default
share/tinyproxy/debug.html
share/tinyproxy/default.html
share/tinyproxy/stats.html
@exec ${MKDIR} ${VARBASE}/log/tinyproxy || ${TRUE}
@exec ${CHOWN} ${TINYPROXY_USER}:${TINYPROXY_GROUP} ${VARBASE}/log/tinyproxy || ${TRUE}
@exec ${CHMOD} 755 ${VARBASE}/log/tinyproxy || ${TRUE}
@exec ${MKDIR} ${VARBASE}/run/tinyproxy || ${TRUE}
@exec ${CHOWN} ${TINYPROXY_USER}:${TINYPROXY_GROUP} ${VARBASE}/run/tinyproxy || ${TRUE}
@exec ${CHMOD} 755 ${VARBASE}/run/tinyproxy || ${TRUE}
@unexec ${RMDIR} ${VARBASE}/log/tinyproxy 2>/dev/null || ${TRUE}
@unexec ${RMDIR} ${VARBASE}/run/tinyproxy 2>/dev/null || ${TRUE}

10
tinyproxy/distinfo Normal file
View File

@ -0,0 +1,10 @@
$NetBSD: distinfo,v 1.13 2018/10/12 13:57:46 adam Exp $
SHA1 (tinyproxy-1.10.0.tar.xz) = c69fccde7aabd89434f94789a156847edde9aa28
RMD160 (tinyproxy-1.10.0.tar.xz) = 8c22dadf2b50dbb841fb730395fd33244f5f2d33
SHA512 (tinyproxy-1.10.0.tar.xz) = 8d82598c5f9c89bc672f4632139ac52696d5c7788963de51688a8aeb576c69004f8338fe1e1897bf704a21dfd25ab1effb092003b6afaa9a88c2b5d0608310f5
Size (tinyproxy-1.10.0.tar.xz) = 176060 bytes
SHA1 (patch-docs_man5_tinyproxy.conf.txt.in) = 1641f7c44ce84f2ebac6e945760af3ba77976f31
SHA1 (patch-docs_man8_tinyproxy.txt.in) = 12c43d0f874a8794cbe8da7c702e406e8b10a99b
SHA1 (patch-etc_Makefile.in) = 05586bae07900c24dd418bddcbf0157ba2b302ef
SHA1 (patch-etc_tinyproxy.conf.in) = 19481a177119b266034280d8923ea855021d8663

View File

@ -0,0 +1,35 @@
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='export'>
<service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='0'>
<create_default_instance enabled="false" />
<single_instance />
<dependency name='network' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/milestone/network:default' />
</dependency>
<dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
<service_fmri value='file://localhost@PREFIX@/etc/tinyproxy/tinyproxy.conf'/>
</dependency>
<method_context>
<method_environment>
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
</method_environment>
</method_context>
<exec_method name='start' type='method' exec='@PREFIX@/bin/tinyproxy' timeout_seconds='300' />
<exec_method name='stop' type='method' exec=':kill' timeout_seconds='300' />
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal' />
</property_group>
<template>
<common_name>
<loctext xml:lang='C'>tinyproxy HTTP proxy server</loctext>
</common_name>
<documentation>
<manpage title='tinyproxy' section='8' />
</documentation>
</template>
</service>
</service_bundle>

18
tinyproxy/files/tinyproxy.sh Executable file
View File

@ -0,0 +1,18 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: tinyproxy.sh,v 1.4 2018/10/12 13:57:46 adam Exp $
#
# PROVIDE: tinyproxy
# REQUIRE: DAEMON
. /etc/rc.subr
name="tinyproxy"
rcvar=$name
command="@PREFIX@/bin/${name}"
pidfile="@VARBASE@/run/tinyproxy/${name}.pid"
required_files="@PKG_SYSCONFDIR@/${name}.conf"
load_rc_config $name
run_rc_command "$1"

View File

@ -0,0 +1,15 @@
$NetBSD: patch-docs_man5_tinyproxy.conf.txt.in,v 1.1 2012/12/12 13:01:23 wiz Exp $
Adapt path for pkgsrc.
--- docs/man5/tinyproxy.conf.txt.in.orig 2011-08-16 12:14:34.000000000 +0000
+++ docs/man5/tinyproxy.conf.txt.in
@@ -19,7 +19,7 @@ DESCRIPTION
-----------
`tinyproxy(8)` reads its configuration file, typically stored in
-`/etc/tinyproxy/tinyproxy.conf` (or passed to Tinyproxy with -c on the
+`@PKG_SYSCONFDIR@/tinyproxy.conf` (or passed to Tinyproxy with -c on the
command line). This manpage describes the syntax and contents of the
configuration file.

View File

@ -0,0 +1,15 @@
$NetBSD: patch-docs_man8_tinyproxy.txt.in,v 1.1 2012/12/12 13:01:23 wiz Exp $
Adapt path for pkgsrc.
--- docs/man8/tinyproxy.txt.in.orig 2012-10-04 11:35:55.807186000 +0000
+++ docs/man8/tinyproxy.txt.in
@@ -130,7 +130,7 @@ configuration variable `StatFile`.
FILES
-----
-`/etc/tinyproxy/tinyproxy.conf`, `/var/run/tinyproxy/tinyproxy.pid`, `/var/log/tinyproxy/tinyproxy.log`
+`@PKG_SYSCONFDIR@/tinyproxy.conf`, `@VARBASE@/run/tinyproxy/tinyproxy.pid`, `@VARBASE@/log/tinyproxy/tinyproxy.log`
BUGS
----

View File

@ -0,0 +1,15 @@
$NetBSD: patch-etc_Makefile.in,v 1.2 2018/10/12 13:57:46 adam Exp $
Use pkgsrc framework for config files.
--- etc/Makefile.in.orig 2018-10-12 13:51:26.000000000 +0000
+++ etc/Makefile.in
@@ -424,7 +424,7 @@ info: info-am
info-am:
-install-data-am: install-pkgsysconfDATA
+install-data-am:
install-dvi: install-dvi-am

View File

@ -0,0 +1,26 @@
$NetBSD: patch-etc_tinyproxy.conf.in,v 1.3 2018/10/12 13:57:46 adam Exp $
Customize settings.
--- etc/tinyproxy.conf.in.orig 2018-08-31 23:03:36.000000000 +0000
+++ etc/tinyproxy.conf.in
@@ -12,8 +12,8 @@
# as the root user. Either the user or group name or the UID or GID
# number may be used.
#
-User nobody
-Group nobody
+User @TINYPROXY_USER@
+Group @TINYPROXY_GROUP@
#
# Port: Specify the port which tinyproxy will listen on. Please note
@@ -124,7 +124,7 @@ LogLevel Info
# can be used for signalling purposes.
# If not specified, no pidfile will be written.
#
-#PidFile "@localstatedir@/run/tinyproxy/tinyproxy.pid"
+PidFile "@localstatedir@/run/tinyproxy/tinyproxy.pid"
#
# XTinyproxy: Tell Tinyproxy to include the X-Tinyproxy header, which