Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-blobcode
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-blobcode
Commits
764587bd
Commit
764587bd
authored
Jun 17, 2015
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename libvmod-example to libvmod-convert
parent
e429b8f0
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
37 additions
and
74 deletions
+37
-74
Makefile.am
Makefile.am
+3
-3
README.rst
README.rst
+6
-6
configure.ac
configure.ac
+2
-2
changelog
debian/changelog
+1
-1
control
debian/control
+3
-3
dirs
debian/dirs
+1
-1
rename-vmod-script
rename-vmod-script
+0
-37
Makefile.am
src/Makefile.am
+12
-12
test01.vtc
src/tests/test01.vtc
+3
-3
vmod_convert.c
src/vmod_convert.c
+0
-0
vmod_convert.vcc
src/vmod_convert.vcc
+3
-3
vmod-convert.spec
vmod-convert.spec
+3
-3
No files found.
Makefile.am
View file @
764587bd
...
...
@@ -5,14 +5,14 @@ SUBDIRS = src
DISTCHECK_CONFIGURE_FLAGS
=
\
VMOD_DIR
=
'$${libdir}/varnish/vmods'
EXTRA_DIST
=
README.rst LICENSE vmod-
example
.spec debian
EXTRA_DIST
=
README.rst LICENSE vmod-
convert
.spec debian
doc_DATA
=
README.rst LICENSE
dist_man_MANS
=
vmod_
example
.3
dist_man_MANS
=
vmod_
convert
.3
MAINTAINERCLEANFILES
=
$(dist_man_MANS)
vmod_
example
.3
:
README.rst
vmod_
convert
.3
:
README.rst
%.1 %.2 %.3 %.4 %.5 %.6 %.7 %.8 %.9
:
if
HAVE_RST2MAN
...
...
README.rst
View file @
764587bd
============
vmod_
example
vmod_
convert
============
----------------------
...
...
@@ -13,7 +13,7 @@ Varnish Example Module
SYNOPSIS
========
import
example
;
import
convert
;
DESCRIPTION
===========
...
...
@@ -39,7 +39,7 @@ Description
Example
::
set resp.http.hello =
example
.hello("World");
set resp.http.hello =
convert
.hello("World");
INSTALLATION
============
...
...
@@ -58,7 +58,7 @@ Usage::
If you have installed Varnish to a non-standard directory, call
``autogen.sh`` and ``configure`` with ``PKG_CONFIG_PATH`` pointing to
the appropriate path. For
example
, when varnishd configure was called
the appropriate path. For
convert
, when varnishd configure was called
with ``--prefix=$PREFIX``, use
PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
...
...
@@ -73,11 +73,11 @@ Make targets:
In your VCL you could then use this vmod along the following lines::
import
example
;
import
convert
;
sub vcl_deliver {
# This sets resp.http.hello to "Hello, World"
set resp.http.hello =
example
.hello("World");
set resp.http.hello =
convert
.hello("World");
}
COMMON PROBLEMS
...
...
configure.ac
View file @
764587bd
AC_PREREQ(2.59)
AC_COPYRIGHT([Copyright (c) 2011-2015 Varnish Software AS])
AC_INIT([libvmod-
example
], [trunk])
AC_INIT([libvmod-
convert
], [trunk])
AC_CONFIG_MACRO_DIR([m4])
m4_ifndef([VARNISH_VMOD_INCLUDES], AC_MSG_ERROR([Need varnish.m4 -- see README.rst]))
AC_CONFIG_SRCDIR(src/vmod_
example
.vcc)
AC_CONFIG_SRCDIR(src/vmod_
convert
.vcc)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_SYSTEM
...
...
debian/changelog
View file @
764587bd
libvmod-
example
(0.1) unstable; urgency=low
libvmod-
convert
(0.1) unstable; urgency=low
* First version
...
...
debian/control
View file @
764587bd
Source: libvmod-
example
Source: libvmod-
convert
Section: web
Priority: extra
Maintainer: Varnish Software <support@varnish-software.com>
...
...
@@ -9,9 +9,9 @@ Build-Depends: debhelper (>= 7),
varnish (>= 4.0.2),
libvarnishapi-dev (>= 4.0.2)
Standards-Version: 3.8.1
Vcs-Git: git://github.com/varnish/libvmod-
example
.git
Vcs-Git: git://github.com/varnish/libvmod-
convert
.git
Package: libvmod-
example
Package: libvmod-
convert
Architecture: any
Depends: varnish (>= 4.0.2), ${shlibs:Depends}, ${misc:Depends}, ${Varnish:ABI}
Description: Example vmod for Varnish
debian/dirs
View file @
764587bd
usr/share/doc/libvmod-
example
usr/share/doc/libvmod-
convert
rename-vmod-script
deleted
100755 → 0
View file @
e429b8f0
#!/bin/bash
#
# Script to rename libvmod-example into libvmod-foo.
# (where "foo" is your new vmod name, of course.)
#
# Leaves the changes uncommitted in the working tree, so you get to fix any
# unintended changes.
#
# Author: Lasse Karstensen <lkarsten@varnish-software.com>, September 2014.
#
set
-o
errexit
NAME
=
$1
if
[
-z
"
$NAME
"
]
;
then
echo
"Usage:
$0
<new-vmod-name-without-libvmod-prefix>"
echo
"Rename libvmod-example source tree."
echo
exit
-1
fi
if
!
git diff-index
--quiet
HEAD
--
;
then
echo
"ERROR: Need a clean working tree. Run
\"
git stash
\"
first."
exit
-2
fi
git
mv
src/vmod_example.c src/vmod_
${
NAME
}
.c
git
mv
src/vmod_example.vcc src/vmod_
${
NAME
}
.vcc
git
mv
vmod-example.spec vmod-
${
NAME
}
.spec
git
grep
-z
-l
example | xargs
-0
sed
-i
-s
-e
"s/example/
${
NAME
}
/g"
git
rm
rename-vmod-script
echo
"All done."
echo
-e
"For your cut&paste needs:
\n
git commit -a -m
\"
Automatic rename of libvmod-example to libvmod-
${
NAME
}
.
\"
"
src/Makefile.am
View file @
764587bd
AM_CPPFLAGS
=
@VMOD_INCLUDES@
-Wall
-Werror
vmoddir
=
@VMOD_DIR@
vmod_LTLIBRARIES
=
libvmod_
example
.la
vmod_LTLIBRARIES
=
libvmod_
convert
.la
libvmod_
example
_la_LDFLAGS
=
-module
-export-dynamic
-avoid-version
-shared
libvmod_
convert
_la_LDFLAGS
=
-module
-export-dynamic
-avoid-version
-shared
libvmod_
example
_la_SOURCES
=
\
vmod_
example
.c
libvmod_
convert
_la_SOURCES
=
\
vmod_
convert
.c
nodist_libvmod_
example
_la_SOURCES
=
\
nodist_libvmod_
convert
_la_SOURCES
=
\
vcc_if.c
\
vcc_if.h
vmod_
example
.lo
:
vcc_if.c vcc_if.h
vmod_
convert
.lo
:
vcc_if.c vcc_if.h
vcc_if.c
:
vcc_if.h
vcc_if.h
:
@VMODTOOL@ $(top_srcdir)/src/vmod_
example
.vcc
@
VMODTOOL@
$(top_srcdir)
/src/vmod_
example
.vcc
vcc_if.h
:
@VMODTOOL@ $(top_srcdir)/src/vmod_
convert
.vcc
@
VMODTOOL@
$(top_srcdir)
/src/vmod_
convert
.vcc
VMOD_TESTS
=
$(top_srcdir)
/src/tests/
*
.vtc
.PHONY
:
$(VMOD_TESTS)
$(top_srcdir)/src/tests/*.vtc
:
libvmod_
example
.la
$(top_srcdir)/src/tests/*.vtc
:
libvmod_
convert
.la
@
VARNISHTEST@
-Dvarnishd
=
@VARNISHD@
-Dvmod_topbuild
=
$(abs_top_builddir)
$@
check
:
$(VMOD_TESTS)
EXTRA_DIST
=
\
vmod_
example
.vcc
\
vmod_
convert
.vcc
\
$(VMOD_TESTS)
CLEANFILES
=
\
$(builddir)
/vcc_if.c
\
$(builddir)
/vcc_if.h
\
$(builddir)
/vmod_
example
.rst
\
$(builddir)
/vmod_
example
.man.rst
$(builddir)
/vmod_
convert
.rst
\
$(builddir)
/vmod_
convert
.man.rst
src/tests/test01.vtc
View file @
764587bd
varnishtest "Test
example
vmod"
varnishtest "Test
convert
vmod"
server s1 {
rxreq
...
...
@@ -6,10 +6,10 @@ server s1 {
} -start
varnish v1 -vcl+backend {
import
example from "${vmod_topbuild}/src/.libs/libvmod_example
.so";
import
convert from "${vmod_topbuild}/src/.libs/libvmod_convert
.so";
sub vcl_deliver {
set resp.http.hello =
example
.hello("World");
set resp.http.hello =
convert
.hello("World");
}
} -start
...
...
src/vmod_
example
.c
→
src/vmod_
convert
.c
View file @
764587bd
File moved
src/vmod_
example
.vcc
→
src/vmod_
convert
.vcc
View file @
764587bd
...
...
@@ -4,18 +4,18 @@
# (vmodtool requires this format.)
#
$Module
example
3 Example VMOD
$Module
convert
3 Example VMOD
DESCRIPTION
===========
This is the embedded documentation for the
example
VMOD. It should
This is the embedded documentation for the
convert
VMOD. It should
mention what the vmod is intended to do.
It can span multiple lines and is written in RST format.
You can even have links and lists in here:
* https://github.com/varnish/libvmod-
example
/
* https://github.com/varnish/libvmod-
convert
/
* https://www.varnish-cache.org/
The init-function declared next does not have documentation.
...
...
vmod-
example
.spec
→
vmod-
convert
.spec
View file @
764587bd
Summary: Example VMOD for Varnish
Name: vmod-
example
Name: vmod-
convert
Version: 0.1
Release: 1%{?dist}
License: BSD
Group: System Environment/Daemons
Source0: libvmod-
example
.tar.gz
Source0: libvmod-
convert
.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: varnish >= 4.0.2
BuildRequires: make
...
...
@@ -16,7 +16,7 @@ BuildRequires: varnish-libs-devel >= 4.0.2
Example VMOD
%prep
%setup -n libvmod-
example
-trunk
%setup -n libvmod-
convert
-trunk
%build
%configure --prefix=/usr/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment