Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-weightadjust
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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-weightadjust
Commits
904644e7
Commit
904644e7
authored
Oct 06, 2015
by
arianna-aondio
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #24 from Dridi/master
Various fixes
parents
2285f10e
42cdf17e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
35 deletions
+38
-35
Makefile.am
Makefile.am
+0
-16
README.rst
README.rst
+3
-2
configure.ac
configure.ac
+2
-3
rename-vmod-script
rename-vmod-script
+14
-7
Makefile.am
src/Makefile.am
+10
-5
vmod-example.spec
vmod-example.spec
+9
-2
No files found.
Makefile.am
View file @
904644e7
...
@@ -8,19 +8,3 @@ DISTCHECK_CONFIGURE_FLAGS = \
...
@@ -8,19 +8,3 @@ DISTCHECK_CONFIGURE_FLAGS = \
EXTRA_DIST
=
README.rst LICENSE vmod-example.spec debian
EXTRA_DIST
=
README.rst LICENSE vmod-example.spec debian
doc_DATA
=
README.rst LICENSE
doc_DATA
=
README.rst LICENSE
dist_man_MANS
=
vmod_example.3
MAINTAINERCLEANFILES
=
$(dist_man_MANS)
vmod_example.3
:
src/vmod_example.man.rst
%.1 %.2 %.3 %.4 %.5 %.6 %.7 %.8 %.9
:
if
HAVE_RST2MAN
${RST2MAN}
$<
$@
else
@echo
"========================================"
@echo
"You need rst2man installed to make dist"
@echo
"========================================"
@false
endif
README.rst
View file @
904644e7
...
@@ -58,7 +58,7 @@ Usage::
...
@@ -58,7 +58,7 @@ Usage::
If you have installed Varnish to a non-standard directory, call
If you have installed Varnish to a non-standard directory, call
``autogen.sh`` and ``configure`` with ``PKG_CONFIG_PATH`` pointing to
``autogen.sh`` and ``configure`` with ``PKG_CONFIG_PATH`` pointing to
the appropriate path. For
exampl
e, when varnishd configure was called
the appropriate path. For
instanc
e, when varnishd configure was called
with ``--prefix=$PREFIX``, use
with ``--prefix=$PREFIX``, use
PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
...
@@ -106,4 +106,5 @@ COMMON PROBLEMS
...
@@ -106,4 +106,5 @@ COMMON PROBLEMS
* Incompatibilities with different Varnish Cache versions
* Incompatibilities with different Varnish Cache versions
Make sure you build this vmod against its correspondent Varnish Cache version.
Make sure you build this vmod against its correspondent Varnish Cache version.
For example, to build against Varnish Cache 4.0, this vmod must be built from branch 4.0.
For instance, to build against Varnish Cache 4.0, this vmod must be built from
branch 4.0.
configure.ac
View file @
904644e7
AC_PREREQ(2.59)
AC_PREREQ(2.59)
AC_COPYRIGHT([Copyright (c) 2011-2015 Varnish Software AS])
AC_COPYRIGHT([Copyright (c) 2011-2015 Varnish Software AS])
AC_INIT([libvmod-example], [
trunk
])
AC_INIT([libvmod-example], [
0.1
])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_MACRO_DIR([m4])
m4_ifndef([VARNISH_VMOD_INCLUDES], AC_MSG_ERROR([Need varnish.m4 -- see README.rst]))
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_example.vcc)
...
@@ -26,9 +26,8 @@ AC_PROG_MAKE_SET
...
@@ -26,9 +26,8 @@ AC_PROG_MAKE_SET
# Check for rst utilities
# Check for rst utilities
AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py], "no")
AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py], "no")
if test "x$RST2MAN" = "xno"; then
if test "x$RST2MAN" = "xno"; then
AC_MSG_
WARN([rst2man not found - not building
man pages])
AC_MSG_
ERROR([rst2man not found - cannot build
man pages])
fi
fi
AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" != "xno"])
# Checks for header files.
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_STDC
...
...
rename-vmod-script
View file @
904644e7
...
@@ -14,24 +14,31 @@ NAME=$1
...
@@ -14,24 +14,31 @@ NAME=$1
if
[
-z
"
$NAME
"
]
;
then
if
[
-z
"
$NAME
"
]
;
then
echo
"Usage:
$0
<new-vmod-name-without-libvmod-prefix>"
echo
"Usage:
$0
<new-vmod-name-without-libvmod-prefix>"
echo
"Rename libvmod-example source tree."
echo
"Rename libvmod-example source tree."
echo
"If the name is an acronym, you can use capital letters."
echo
echo
exit
-1
exit
-1
fi
fi
SYM_NAME
=
${
NAME
,,*
}
CAP_NAME
=
${
NAME
^?
}
if
!
git diff-index
--quiet
HEAD
--
;
then
if
!
git diff-index
--quiet
HEAD
--
;
then
echo
"ERROR: Need a clean working tree. Run
\"
git stash
\"
first."
echo
"ERROR: Need a clean working tree. Run
\"
git stash
\"
first."
exit
-2
exit
-2
fi
fi
git
mv
src/vmod_example.c src/vmod_
${
NAME
}
.c
git
mv
src/vmod_example.c src/vmod_
${
SYM_
NAME
}
.c
git
mv
src/vmod_example.vcc src/vmod_
${
NAME
}
.vcc
git
mv
src/vmod_example.vcc src/vmod_
${
SYM_
NAME
}
.vcc
git
mv
vmod-example.spec vmod-
${
NAME
}
.spec
git
mv
vmod-example.spec vmod-
${
SYM_
NAME
}
.spec
git
grep
-z
-l
example | xargs
-0
sed
-i
-s
-e
"s/example/
${
NAME
}
/g"
git
grep
-z
-l
example | xargs
-0
sed
-i
-s
-e
"s/example/
${
SYM_NAME
}
/g"
git
grep
-z
-l
Example | xargs
-0
sed
-i
-s
-e
"s/Example/
${
CAP_NAME
}
/g"
git
rm
-f
rename-vmod-script
git
rm
-f
rename-vmod-script
echo
"All done."
cat
<<
EOF
echo
-e
"For your cut&paste needs:
\n
git commit -a -m
\"
Automatic rename of libvmod-example to libvmod-
${
NAME
}
.
\"
"
All done.
For your cut&paste needs:
git commit -a -m "Automatic rename of libvmod-example to libvmod-
${
SYM_NAME
}
."
EOF
src/Makefile.am
View file @
904644e7
...
@@ -12,15 +12,19 @@ nodist_libvmod_example_la_SOURCES = \
...
@@ -12,15 +12,19 @@ nodist_libvmod_example_la_SOURCES = \
vcc_if.c
\
vcc_if.c
\
vcc_if.h
vcc_if.h
vmod_example.lo
:
vcc_if.c vcc_if.h
dist_man_MANS
=
vmod_example.3
vcc_if.c
:
vcc_if.h
vmod_example.3
:
vmod_example.man.rst
${
RST2MAN
}
$<
$@
vcc_if.h
:
@VMODTOOL@ $(top_srcdir)/src/vmod_example.vcc
vmod_example.lo vmod_example.man.rst
:
vcc
vcc
:
@VMODTOOL@ $(top_srcdir)/src/vmod_example.vcc
@
VMODTOOL@
$(top_srcdir)
/src/vmod_example.vcc
@
VMODTOOL@
$(top_srcdir)
/src/vmod_example.vcc
VMOD_TESTS
=
$(top_srcdir)
/src/tests/
*
.vtc
VMOD_TESTS
=
$(top_srcdir)
/src/tests/
*
.vtc
.PHONY
:
$(VMOD_TESTS)
.PHONY
:
$(VMOD_TESTS)
vcc
$(top_srcdir)/src/tests/*.vtc
:
libvmod_example.la
$(top_srcdir)/src/tests/*.vtc
:
libvmod_example.la
@
VARNISHTEST@
-Dvarnishd
=
@VARNISHD@
-Dvmod_topbuild
=
$(abs_top_builddir)
$@
@
VARNISHTEST@
-Dvarnishd
=
@VARNISHD@
-Dvmod_topbuild
=
$(abs_top_builddir)
$@
...
@@ -35,4 +39,5 @@ CLEANFILES = \
...
@@ -35,4 +39,5 @@ CLEANFILES = \
$(builddir)
/vcc_if.c
\
$(builddir)
/vcc_if.c
\
$(builddir)
/vcc_if.h
\
$(builddir)
/vcc_if.h
\
$(builddir)
/vmod_example.rst
\
$(builddir)
/vmod_example.rst
\
$(builddir)
/vmod_example.man.rst
$(builddir)
/vmod_example.man.rst
\
$(dist_man_MANS)
vmod-example.spec
View file @
904644e7
...
@@ -4,25 +4,30 @@ Version: 0.1
...
@@ -4,25 +4,30 @@ Version: 0.1
Release: 1%{?dist}
Release: 1%{?dist}
License: BSD
License: BSD
Group: System Environment/Daemons
Group: System Environment/Daemons
Source0: lib
vmod-example
.tar.gz
Source0: lib
%{name}-%{version}
.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: varnish >= 4.0.2
Requires: varnish >= 4.0.2
BuildRequires: make
BuildRequires: make
BuildRequires: python-docutils
BuildRequires: python-docutils
BuildRequires: varnish >= 4.0.2
BuildRequires: varnish >= 4.0.2
BuildRequires: varnish-libs-devel >= 4.0.2
BuildRequires: varnish-libs-devel >= 4.0.2
%description
%description
Example VMOD
Example VMOD
%prep
%prep
%setup -n libvmod-example-trunk
%setup -n lib%{name}-%{version}
%build
%build
%configure --prefix=/usr/
%configure --prefix=/usr/
%{__make} %{?_smp_mflags}
%{__make} %{?_smp_mflags}
%{__make} %{?_smp_mflags} check
%{__make} %{?_smp_mflags} check
%install
%install
[ %{buildroot} != "/" ] && %{__rm} -rf %{buildroot}
[ %{buildroot} != "/" ] && %{__rm} -rf %{buildroot}
%{__make} install DESTDIR=%{buildroot}
%{__make} install DESTDIR=%{buildroot}
...
@@ -32,12 +37,14 @@ mv %{buildroot}/usr/share/doc/lib%{name} %{buildroot}/usr/share/doc/%{name}
...
@@ -32,12 +37,14 @@ mv %{buildroot}/usr/share/doc/lib%{name} %{buildroot}/usr/share/doc/%{name}
%clean
%clean
[ %{buildroot} != "/" ] && %{__rm} -rf %{buildroot}
[ %{buildroot} != "/" ] && %{__rm} -rf %{buildroot}
%files
%files
%defattr(-,root,root,-)
%defattr(-,root,root,-)
%{_libdir}/varnis*/vmods/
%{_libdir}/varnis*/vmods/
%doc /usr/share/doc/%{name}/*
%doc /usr/share/doc/%{name}/*
%{_mandir}/man?/*
%{_mandir}/man?/*
%changelog
%changelog
* Tue Nov 14 2012 Lasse Karstensen <lasse@varnish-software.com> - 0.1-0.20121114
* Tue Nov 14 2012 Lasse Karstensen <lasse@varnish-software.com> - 0.1-0.20121114
- Initial version.
- Initial version.
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