-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
caddy: add version 2.7.6 to extra.omnios
Add v2.7.6 of the Caddy web server. Add patch to fix Solaris-derivative build. Comes from caddy master:76611fa15079b755ddf3c859ae2ea0ad2123223f and this PR 6021: caddyserver/caddy#6021
- Loading branch information
Showing
6 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/usr/bin/bash | ||
# | ||
# {{{ CDDL HEADER | ||
# | ||
# This file and its contents are supplied under the terms of the | ||
# Common Development and Distribution License ("CDDL"), version 1.0. | ||
# You may only use this file in accordance with the terms of version | ||
# 1.0 of the CDDL. | ||
# | ||
# A full copy of the text of the CDDL should have accompanied this | ||
# source. A copy of the CDDL is also available via the Internet at | ||
# http://www.illumos.org/license/CDDL. | ||
# }}} | ||
|
||
# Copyright 2024 Guo-Rong Koh | ||
|
||
. ../../lib/build.sh | ||
|
||
PROG=caddy | ||
VER=2.7.6 | ||
PKG=ooce/server/caddy | ||
SUMMARY="Caddy web server" | ||
DESC="Fast and extensible multi-platform HTTP/1-2-3 web server with automatic \ | ||
HTTPS" | ||
|
||
set_arch amd64 | ||
set_gover | ||
|
||
build() { | ||
pushd $TMPDIR/$BUILDDIR > /dev/null | ||
|
||
logmsg "Building $PROG" | ||
export CGO_ENABLED=0 | ||
export GOOS=illumos | ||
|
||
logcmd go build -o caddy cmd/caddy/main.go || logerr "Unable to build $PROG" | ||
|
||
popd >/dev/null | ||
} | ||
|
||
# create package functions | ||
init | ||
clone_go_source $PROG caddyserver v$VER | ||
patch_source | ||
prep_build | ||
build | ||
install_go $PROG | ||
make_package | ||
clean_up | ||
|
||
# Vim hints | ||
# vim:ts=4:sw=4:et:fdm=marker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# | ||
# This file and its contents are supplied under the terms of the | ||
# Common Development and Distribution License ("CDDL"), version 1.0. | ||
# You may only use this file in accordance with the terms of version | ||
# 1.0 of the CDDL. | ||
# | ||
# A full copy of the text of the CDDL should have accompanied this | ||
# source. A copy of the CDDL is also available via the Internet at | ||
# http://www.illumos.org/license/CDDL. | ||
|
||
# Copyright 2024 Guo-Rong Koh | ||
|
||
license LICENSE license=Apache2 |
36 changes: 36 additions & 0 deletions
36
build/caddy/patches/0001-Switch-Solaris-derivatives-away-from-listen_unix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
diff --git a/listen.go b/listen.go | ||
index 0cd3fabb..34812b54 100644 | ||
--- a/listen.go | ||
+++ b/listen.go | ||
@@ -12,7 +12,7 @@ | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
-//go:build !unix | ||
+//go:build !unix || solaris | ||
|
||
package caddy | ||
|
||
diff --git a/listen_unix.go b/listen_unix.go | ||
index 34cd76c5..9ec65c39 100644 | ||
--- a/listen_unix.go | ||
+++ b/listen_unix.go | ||
@@ -15,7 +15,7 @@ | ||
// Even though the filename ends in _unix.go, we still have to specify the | ||
// build constraint here, because the filename convention only works for | ||
// literal GOOS values, and "unix" is a shortcut unique to build tags. | ||
-//go:build unix | ||
+//go:build unix && !solaris | ||
|
||
package caddy | ||
|
||
diff --git a/listen_unix_setopt.go b/listen_unix_setopt.go | ||
index c9675f92..13ee7b83 100644 | ||
--- a/listen_unix_setopt.go | ||
+++ b/listen_unix_setopt.go | ||
@@ -1,4 +1,4 @@ | ||
-//go:build unix && !freebsd | ||
+//go:build unix && !freebsd && !solaris | ||
|
||
package caddy | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0001-Switch-Solaris-derivatives-away-from-listen_unix.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters