update dev-lang/go, www-apps/gitea ebuilds
This commit is contained in:
parent
17039da5e0
commit
037ed620de
|
@ -9,10 +9,6 @@ DIST go-linux-ppc64-bootstrap-1.8.tbz 52315782 BLAKE2B 6be0a48e8bc4e5fed4d34f8aa
|
|||
DIST go-linux-ppc64le-bootstrap-1.8.tbz 52211575 BLAKE2B 7a28ec5a381369c4e9415c8360e904c2545380513afd328077c584e8af0bf6bd818aa03e5a58c350cbb98facc1c9dccb02b06adcb27233875497cf5d33265912 SHA512 6931d999dd0ee1ff44c4cec48acb27af061f57f87aa74802dcebab78553b46bc8ac732f07fe91e5074dbdd32c55b707994875934bfb12bb4276d71eb1d06c4ba
|
||||
DIST go-linux-s390x-bootstrap-1.8.tbz 57124869 BLAKE2B 920a176b8f4fc3a816e724324bbb30a383d599e31a0d2093d24797dbcd0e799a662a3589dbb87d2f5dd16df07c4cf8f1e444e87b540ec732746bb025dc9271f8 SHA512 d429cae870d66217ab2e07c74209d3031d97baa4f899b4d70ae6283a1a5b1434b037904c4cfca0b2bc798d5ba0b358c3739e000eccbc74809baf564c5686df5a
|
||||
DIST go-solaris-amd64-bootstrap-1.8.tbz 54926326 BLAKE2B 0a45312f090d81ebf46fe5950cb65c059e2801394231e715e94145d1f918eb59b10472b2385e57ebd5cfb9eca0ad7290fb118436486b665520bb540970f971ab SHA512 52b849e5b9a940e10de7ba3df0ebdf6e1c5d631de9581d936c9edf8f38e6bb3314acbc2b2d5202b0528fde2a359d52bc0c6f39acf9b1b614725e4b4a947ed10d
|
||||
DIST go1.10.1.src.tar.gz 18305765 BLAKE2B 61b8db22c50b9a4653244dc18267f405607755932d84ea2c475338a9f4a5421da2bb8cc808dbd166aa35c3c8778180bf47d6e51ebe303bc62e582516919058f9 SHA512 13f6b0643a4f92eeca04444b9fa10de38fc3427daea9aa3227cf9a5738ffee1a3f2e355ba5faf711b8506f7de118bdcd3b9064b65407a22613523e29ffd73415
|
||||
DIST go1.10.3.src.tar.gz 18323736 BLAKE2B f07ea774378eb25e28fc29ce6d8d7ed84227d4b93bfa93d38a071fe294da30c3cdc3a559d643e7379873df56b0e2731dbd772e385ffcb4b2e93819db3b4e33f2 SHA512 fd2bd5fcb5c6d0a5336c4b1d2cacb368edbb01359297a83bdedc53f6018642598232f00633fc60fde879050f5f26a810c828d46b5d6626cbcc0702d93ad33fbb
|
||||
DIST go1.11.5.src.tar.gz 21108339 BLAKE2B 3a33a89e267e57fee688e4d67257810ca1f37cfb904b6806c3a566b021aa80153f59f64d3a61ed68f526f093e0d5b6b3c95565cd06622cf9a65eef81bc7e9733 SHA512 63500238e8d73e4b29279ee3eb9242960de93ccd3b52bacc4009f45cf123cb8edfe5f519d38c5b07bdf2a810925758511ff3255310a056113d0169f78be1d2f6
|
||||
EBUILD go-1.10.1.ebuild 5653 BLAKE2B 1e742993a575d6f28fc55d16d466152f93a7ad89aabb429d83ea31d5a51f5c0188f6b22c2e1d5b721af68315dc9bd7bc59fcb6a1470393de0fda73ad6be57db4 SHA512 c42ca83b0d4f5a2d8cb1c272551cea55d5d47fafa30cc4a624fbb965a9ef3d35ac14b4fe4a27ccb557e89661a2757e82f2ecda35d8395556f22f6b681489f921
|
||||
EBUILD go-1.10.3.ebuild 5653 BLAKE2B 1e742993a575d6f28fc55d16d466152f93a7ad89aabb429d83ea31d5a51f5c0188f6b22c2e1d5b721af68315dc9bd7bc59fcb6a1470393de0fda73ad6be57db4 SHA512 c42ca83b0d4f5a2d8cb1c272551cea55d5d47fafa30cc4a624fbb965a9ef3d35ac14b4fe4a27ccb557e89661a2757e82f2ecda35d8395556f22f6b681489f921
|
||||
EBUILD go-1.11.5.ebuild 6008 BLAKE2B 025a51bc415f60e9b94d6cd985c5334f5d7f603c3e14537ad6d8422c369a0d9b89ef534093dab52617f17108840d5a9105815d984883ce076ef47f322c4d7752 SHA512 31decfc1df9eae82316ac10aebe4d01190e2fdaa2b365eb8ee65750bf1a23e1d676f03a0551d7b9bd4c339358f7555a53d2a8806ed209b28e8e81ad3a8e680f7
|
||||
DIST go1.12.5.src.tar.gz 21971348 BLAKE2B 7de8db4a6c4cd9e1883fbf28357fe99ad9f43f3e015b2063347b1961df128760b720c0dd5549997c7080e6cf0036406430419d4bf033323f26017d3629ad6067 SHA512 ce64105ff71615f9d235cc7c8656b6409fc40cc90d15a28d355fadd9072d2eab842af379dd8bba0f1181715753143e4a07491e0f9e5f8df806327d7c95a34fae
|
||||
EBUILD go-1.12.5.ebuild 6008 BLAKE2B 025a51bc415f60e9b94d6cd985c5334f5d7f603c3e14537ad6d8422c369a0d9b89ef534093dab52617f17108840d5a9105815d984883ce076ef47f322c4d7752 SHA512 31decfc1df9eae82316ac10aebe4d01190e2fdaa2b365eb8ee65750bf1a23e1d676f03a0551d7b9bd4c339358f7555a53d2a8806ed209b28e8e81ad3a8e680f7
|
||||
MISC metadata.xml 538 BLAKE2B 78502c369a490804b2c69eef864276c2be5d0ee84ec189b6cc8584f8f42668a35f3c74bd25ceb53c469716337cbab908c576ca880c492f5961fedafc74cc346f SHA512 514a441a522218fdca543a22370e965a2bfc1f1f2c37e77431143329bb3d3f4f53e99ad5d7f7d7c61877f77387a777f7b4f339b9a3e45322d01d39d3d0ea1309
|
||||
|
|
|
@ -1,228 +0,0 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
export CBUILD=${CBUILD:-${CHOST}}
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
|
||||
BOOTSTRAP_VERSION="bootstrap-1.8"
|
||||
BOOTSTRAP_URI="
|
||||
amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-bootstrap-musl-1.4.3.tbz )
|
||||
arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz )
|
||||
arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz )
|
||||
ppc64? (
|
||||
${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz
|
||||
${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz
|
||||
)
|
||||
s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz )
|
||||
x86? ( ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz )
|
||||
amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz )
|
||||
x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz )
|
||||
x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz )
|
||||
x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz )
|
||||
"
|
||||
|
||||
case ${PV} in
|
||||
*9999*)
|
||||
EGIT_REPO_URI="https://github.com/golang/go.git"
|
||||
inherit git-r3
|
||||
;;
|
||||
*)
|
||||
SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
|
||||
S="${WORKDIR}"/go
|
||||
case ${PV} in
|
||||
*_beta*|*_rc*) ;;
|
||||
*)
|
||||
KEYWORDS="-* amd64 arm ~arm64 ~ppc64 ~s390 x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris"
|
||||
# The upstream tests fail under portage but pass if the build is
|
||||
# run according to their documentation [1].
|
||||
# I am restricting the tests on released versions until this is
|
||||
# solved.
|
||||
# [1] https://golang.org/issues/18442
|
||||
RESTRICT="test"
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )"
|
||||
|
||||
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
|
||||
HOMEPAGE="https://golang.org"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
IUSE="gccgo"
|
||||
|
||||
DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
|
||||
RDEPEND="!<dev-go/go-tools-0_pre20150902"
|
||||
|
||||
# These test data objects have writable/executable stacks.
|
||||
QA_EXECSTACK="
|
||||
usr/lib/go/src/debug/elf/testdata/*.obj
|
||||
usr/lib/go/src/go/internal/gccgoimporter/testdata/escapeinfo.gox
|
||||
usr/lib/go/src/go/internal/gccgoimporter/testdata/unicode.gox
|
||||
usr/lib/go/src/go/internal/gccgoimporter/testdata/time.gox
|
||||
"
|
||||
|
||||
# Do not complain about CFLAGS, etc, since Go doesn't use them.
|
||||
QA_FLAGS_IGNORED='.*'
|
||||
|
||||
REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
|
||||
|
||||
# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
|
||||
QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
|
||||
|
||||
# Do not strip this package. Stripping is unsupported upstream and may
|
||||
# fail.
|
||||
RESTRICT+=" strip"
|
||||
|
||||
DOCS=(
|
||||
AUTHORS
|
||||
CONTRIBUTING.md
|
||||
CONTRIBUTORS
|
||||
PATENTS
|
||||
README.md
|
||||
)
|
||||
|
||||
go_arch()
|
||||
{
|
||||
# By chance most portage arch names match Go
|
||||
local portage_arch=$(tc-arch $@)
|
||||
case "${portage_arch}" in
|
||||
x86) echo 386;;
|
||||
x64-*) echo amd64;;
|
||||
ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
|
||||
s390) echo s390x ;;
|
||||
*) echo "${portage_arch}";;
|
||||
esac
|
||||
}
|
||||
|
||||
go_arm()
|
||||
{
|
||||
case "${1:-${CHOST}}" in
|
||||
armv5*) echo 5;;
|
||||
armv6*) echo 6;;
|
||||
armv7*) echo 7;;
|
||||
*)
|
||||
die "unknown GOARM for ${1:-${CHOST}}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
go_os()
|
||||
{
|
||||
case "${1:-${CHOST}}" in
|
||||
*-linux*) echo linux;;
|
||||
*-darwin*) echo darwin;;
|
||||
*-freebsd*) echo freebsd;;
|
||||
*-netbsd*) echo netbsd;;
|
||||
*-openbsd*) echo openbsd;;
|
||||
*-solaris*) echo solaris;;
|
||||
*-cygwin*|*-interix*|*-winnt*)
|
||||
echo windows
|
||||
;;
|
||||
*)
|
||||
die "unknown GOOS for ${1:-${CHOST}}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
go_tuple()
|
||||
{
|
||||
echo "$(go_os $@)_$(go_arch $@)"
|
||||
}
|
||||
|
||||
go_cross_compile()
|
||||
{
|
||||
[[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
|
||||
}
|
||||
|
||||
pkg_pretend()
|
||||
{
|
||||
# make.bash does not understand cross-compiling a cross-compiler
|
||||
if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then
|
||||
die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}"
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack()
|
||||
{
|
||||
if [[ ${PV} = 9999 ]]; then
|
||||
git-r3_src_unpack
|
||||
fi
|
||||
default
|
||||
}
|
||||
|
||||
src_compile()
|
||||
{
|
||||
export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap
|
||||
if use gccgo; then
|
||||
mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die
|
||||
local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version)
|
||||
[[ -x ${go_binary} ]] || go_binary=$(
|
||||
find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) |
|
||||
sort -V | tail -n1)
|
||||
[[ -x ${go_binary} ]] ||
|
||||
die "go-$(gcc-major-version): command not found"
|
||||
ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
|
||||
fi
|
||||
export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
|
||||
export GOROOT="$(pwd)"
|
||||
export GOBIN="${GOROOT}/bin"
|
||||
|
||||
# Go's build script does not use BUILD/HOST/TARGET consistently. :(
|
||||
export GOHOSTARCH=$(go_arch ${CBUILD})
|
||||
export GOHOSTOS=$(go_os ${CBUILD})
|
||||
export CC=$(tc-getBUILD_CC)
|
||||
|
||||
export GOARCH=$(go_arch)
|
||||
export GOOS=$(go_os)
|
||||
export CC_FOR_TARGET=$(tc-getCC)
|
||||
export CXX_FOR_TARGET=$(tc-getCXX)
|
||||
if [[ ${ARCH} == arm ]]; then
|
||||
export GOARM=$(go_arm)
|
||||
fi
|
||||
einfo "GOROOT_BOOTSTRAP is ${GOROOT_BOOTSTRAP}"
|
||||
|
||||
cd src
|
||||
./make.bash || die "build failed"
|
||||
}
|
||||
|
||||
src_test()
|
||||
{
|
||||
go_cross_compile && return 0
|
||||
|
||||
cd src
|
||||
PATH="${GOBIN}:${PATH}" \
|
||||
./run.bash -no-rebuild || die "tests failed"
|
||||
}
|
||||
|
||||
src_install()
|
||||
{
|
||||
local bin_path f x
|
||||
|
||||
dodir /usr/lib/go
|
||||
|
||||
# There is a known issue which requires the source tree to be installed [1].
|
||||
# Once this is fixed, we can consider using the doc use flag to control
|
||||
# installing the doc and src directories.
|
||||
# [1] https://golang.org/issue/2775
|
||||
#
|
||||
# deliberately use cp to retain permissions
|
||||
cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
|
||||
if go_cross_compile; then
|
||||
bin_path="bin/$(go_tuple)"
|
||||
else
|
||||
bin_path=bin
|
||||
fi
|
||||
for x in ${bin_path}/*; do
|
||||
f=${x##*/}
|
||||
dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
|
||||
done
|
||||
einstalldocs
|
||||
}
|
|
@ -1,228 +0,0 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
export CBUILD=${CBUILD:-${CHOST}}
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
|
||||
BOOTSTRAP_VERSION="bootstrap-1.8"
|
||||
BOOTSTRAP_URI="
|
||||
amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-bootstrap-musl-1.4.3.tbz )
|
||||
arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz )
|
||||
arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz )
|
||||
ppc64? (
|
||||
${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz
|
||||
${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz
|
||||
)
|
||||
s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz )
|
||||
x86? ( ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz )
|
||||
amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz )
|
||||
x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz )
|
||||
x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz )
|
||||
x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz )
|
||||
"
|
||||
|
||||
case ${PV} in
|
||||
*9999*)
|
||||
EGIT_REPO_URI="https://github.com/golang/go.git"
|
||||
inherit git-r3
|
||||
;;
|
||||
*)
|
||||
SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
|
||||
S="${WORKDIR}"/go
|
||||
case ${PV} in
|
||||
*_beta*|*_rc*) ;;
|
||||
*)
|
||||
KEYWORDS="-* amd64 arm ~arm64 ~ppc64 ~s390 x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris"
|
||||
# The upstream tests fail under portage but pass if the build is
|
||||
# run according to their documentation [1].
|
||||
# I am restricting the tests on released versions until this is
|
||||
# solved.
|
||||
# [1] https://golang.org/issues/18442
|
||||
RESTRICT="test"
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )"
|
||||
|
||||
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
|
||||
HOMEPAGE="https://golang.org"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
IUSE="gccgo"
|
||||
|
||||
DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
|
||||
RDEPEND="!<dev-go/go-tools-0_pre20150902"
|
||||
|
||||
# These test data objects have writable/executable stacks.
|
||||
QA_EXECSTACK="
|
||||
usr/lib/go/src/debug/elf/testdata/*.obj
|
||||
usr/lib/go/src/go/internal/gccgoimporter/testdata/escapeinfo.gox
|
||||
usr/lib/go/src/go/internal/gccgoimporter/testdata/unicode.gox
|
||||
usr/lib/go/src/go/internal/gccgoimporter/testdata/time.gox
|
||||
"
|
||||
|
||||
# Do not complain about CFLAGS, etc, since Go doesn't use them.
|
||||
QA_FLAGS_IGNORED='.*'
|
||||
|
||||
REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
|
||||
|
||||
# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
|
||||
QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
|
||||
|
||||
# Do not strip this package. Stripping is unsupported upstream and may
|
||||
# fail.
|
||||
RESTRICT+=" strip"
|
||||
|
||||
DOCS=(
|
||||
AUTHORS
|
||||
CONTRIBUTING.md
|
||||
CONTRIBUTORS
|
||||
PATENTS
|
||||
README.md
|
||||
)
|
||||
|
||||
go_arch()
|
||||
{
|
||||
# By chance most portage arch names match Go
|
||||
local portage_arch=$(tc-arch $@)
|
||||
case "${portage_arch}" in
|
||||
x86) echo 386;;
|
||||
x64-*) echo amd64;;
|
||||
ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
|
||||
s390) echo s390x ;;
|
||||
*) echo "${portage_arch}";;
|
||||
esac
|
||||
}
|
||||
|
||||
go_arm()
|
||||
{
|
||||
case "${1:-${CHOST}}" in
|
||||
armv5*) echo 5;;
|
||||
armv6*) echo 6;;
|
||||
armv7*) echo 7;;
|
||||
*)
|
||||
die "unknown GOARM for ${1:-${CHOST}}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
go_os()
|
||||
{
|
||||
case "${1:-${CHOST}}" in
|
||||
*-linux*) echo linux;;
|
||||
*-darwin*) echo darwin;;
|
||||
*-freebsd*) echo freebsd;;
|
||||
*-netbsd*) echo netbsd;;
|
||||
*-openbsd*) echo openbsd;;
|
||||
*-solaris*) echo solaris;;
|
||||
*-cygwin*|*-interix*|*-winnt*)
|
||||
echo windows
|
||||
;;
|
||||
*)
|
||||
die "unknown GOOS for ${1:-${CHOST}}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
go_tuple()
|
||||
{
|
||||
echo "$(go_os $@)_$(go_arch $@)"
|
||||
}
|
||||
|
||||
go_cross_compile()
|
||||
{
|
||||
[[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
|
||||
}
|
||||
|
||||
pkg_pretend()
|
||||
{
|
||||
# make.bash does not understand cross-compiling a cross-compiler
|
||||
if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then
|
||||
die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}"
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack()
|
||||
{
|
||||
if [[ ${PV} = 9999 ]]; then
|
||||
git-r3_src_unpack
|
||||
fi
|
||||
default
|
||||
}
|
||||
|
||||
src_compile()
|
||||
{
|
||||
export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap
|
||||
if use gccgo; then
|
||||
mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die
|
||||
local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version)
|
||||
[[ -x ${go_binary} ]] || go_binary=$(
|
||||
find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) |
|
||||
sort -V | tail -n1)
|
||||
[[ -x ${go_binary} ]] ||
|
||||
die "go-$(gcc-major-version): command not found"
|
||||
ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
|
||||
fi
|
||||
export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
|
||||
export GOROOT="$(pwd)"
|
||||
export GOBIN="${GOROOT}/bin"
|
||||
|
||||
# Go's build script does not use BUILD/HOST/TARGET consistently. :(
|
||||
export GOHOSTARCH=$(go_arch ${CBUILD})
|
||||
export GOHOSTOS=$(go_os ${CBUILD})
|
||||
export CC=$(tc-getBUILD_CC)
|
||||
|
||||
export GOARCH=$(go_arch)
|
||||
export GOOS=$(go_os)
|
||||
export CC_FOR_TARGET=$(tc-getCC)
|
||||
export CXX_FOR_TARGET=$(tc-getCXX)
|
||||
if [[ ${ARCH} == arm ]]; then
|
||||
export GOARM=$(go_arm)
|
||||
fi
|
||||
einfo "GOROOT_BOOTSTRAP is ${GOROOT_BOOTSTRAP}"
|
||||
|
||||
cd src
|
||||
./make.bash || die "build failed"
|
||||
}
|
||||
|
||||
src_test()
|
||||
{
|
||||
go_cross_compile && return 0
|
||||
|
||||
cd src
|
||||
PATH="${GOBIN}:${PATH}" \
|
||||
./run.bash -no-rebuild || die "tests failed"
|
||||
}
|
||||
|
||||
src_install()
|
||||
{
|
||||
local bin_path f x
|
||||
|
||||
dodir /usr/lib/go
|
||||
|
||||
# There is a known issue which requires the source tree to be installed [1].
|
||||
# Once this is fixed, we can consider using the doc use flag to control
|
||||
# installing the doc and src directories.
|
||||
# [1] https://golang.org/issue/2775
|
||||
#
|
||||
# deliberately use cp to retain permissions
|
||||
cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
|
||||
if go_cross_compile; then
|
||||
bin_path="bin/$(go_tuple)"
|
||||
else
|
||||
bin_path=bin
|
||||
fi
|
||||
for x in ${bin_path}/*; do
|
||||
f=${x##*/}
|
||||
dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
|
||||
done
|
||||
einstalldocs
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
AUX app.ini 67 BLAKE2B 4ec7b8217486047b419202b3a8a7172ac21ae0e5ad9224cd4f010be730ac5cda9d05bf06dcba2d06f8809900094b3b007ef98dd4ea20a125fb7d3db279f53e4a SHA512 93f6f7cf49dd1ece56f7da711adbb58cc38a503527aeea140837d74456ee6f550a089e897d9cb94382e1eb3f5a5cbe4a61362534463eada08a91f314da0f2108
|
||||
AUX gitea.confd-r1 243 BLAKE2B 87caa8371f53f52b0a85f720342f9f358dedec9240ab78998655a03df6bf3f301fe077afabdca1b1895dbcab2fa05748735d6f38f9b3ad53534fe8ae6e72db49 SHA512 485dc9d0b86d0a7b3ba958aac9de1129aa0ffbb47219419d38811f2accca2539e49dd93cc4a24b21f1c3802b024aa8449f54e320e8a16197f201532edeca6836
|
||||
AUX gitea.initd-r2 736 BLAKE2B abb2733808783b3654b51493451950c07237c005897c630f8ce095f0bacb7f1e59c61f0f1663c5daddcab08121c54eaba4de953d6e03ce1c7b405d0e7de597b6 SHA512 42321bbfaa844ef246b825d36bc1b8227b34d4cb7a5c4ced706203c40dd345e4c163e18bfdaa4899154d6c405f8e42b9b7ea0657e048c496ede1976d958d2228
|
||||
AUX gitea.service-r1 557 BLAKE2B 0d255654da33fb9155a6bc29896ab164597667c252b680e2b945109163c09feaa88c28776277a9c7f00d6b5b66cb24bda50e99dde354a5d18ed61597fb1ce917 SHA512 cabe0a1b5a5f435f4fa5b3c20fb76ad1b248463fa681e55a4ae66b027f00574c1fcb65f1841c0bc52b7188a02c0fc05bfa9b11931d26c5efce6b988d4b7a8f57
|
||||
DIST gitea-1.8.1.tar.gz 24304805 BLAKE2B 4300125da2116218c0609bb8974b2abea22593161dd60e12390eea7e60865df40a089126748b3f5c9e856b2c59fdb6a4b9997c6d0bb9743ceb0c413c41caa903 SHA512 b583ba21ae9c896d527d299d5a14f7b99e40b474da7ca40521487f0459c877da9c21825b40dc0f981af7813bcabca11f62d8076cc1e401adda57d0e0505b96ce
|
||||
EBUILD gitea-1.8.1.ebuild 2441 BLAKE2B 017544ba40e11c49b62ac5657c59c836cacbe8c57164c0549bc34609072d3bd3aae5834c0166f600d38cfebc7805a0ad63bac57b66daa7df1dfde5c74d047f9c SHA512 32792428fe7f93f597c22134a9d946b31eed9424c065c8fc0f74896a6c6c3283df0c7d29da93e23c70f841498f6d9dc5cf1740aeae247c6c5583aedcd128150e
|
||||
MISC metadata.xml 563 BLAKE2B 00090c9965433ee21c5ebb4cd7ff83f3c16a870acd9da92842a53349a4bf38dc1239be17ec7545e5b0a44c07e2c93d3dbff599b37fcd4366a2ff41952cb513cb SHA512 fbf0fca0af8b73494e20a965f99f101e7ed08927b8b303189f69586e59b57bdc07781353b9bbd9ba904a53efa85fa91e4a76341ca2083cf9f6769448de700222
|
|
@ -0,0 +1,4 @@
|
|||
[log]
|
||||
MODE = file
|
||||
LEVEL = Info
|
||||
ROOT_PATH = /var/log/gitea
|
|
@ -0,0 +1,14 @@
|
|||
# Gitea configuration
|
||||
GITEA_CONF="/etc/gitea/app.ini"
|
||||
|
||||
# Gitea user
|
||||
GITEA_USER="git"
|
||||
|
||||
# Gitea group
|
||||
GITEA_GROUP="git"
|
||||
|
||||
# Gitea working directory
|
||||
GITEA_WORK_DIR="/var/lib/gitea"
|
||||
|
||||
# Gitea custom directory
|
||||
GITEA_CUSTOM="${GITEA_WORK_DIR}/custom"
|
|
@ -0,0 +1,22 @@
|
|||
#!/sbin/openrc-run
|
||||
# Copyright 2016-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
description="Gitea, a self-hosted Git service"
|
||||
|
||||
: ${GITEA_CONF:=/etc/gitea/app.ini}
|
||||
: ${GITEA_USER:=git}
|
||||
: ${GITEA_GROUP:=git}
|
||||
: ${GITEA_WORK_DIR:=/var/lib/gitea}
|
||||
: ${GITEA_CUSTOM:=${GITEA_WORK_DIR}/custom}
|
||||
|
||||
command="/usr/bin/gitea web"
|
||||
command_args="--config ${GITEA_CONF}"
|
||||
command_background="true"
|
||||
command_user="${GITEA_USER}:${GITEA_GROUP}"
|
||||
error_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.err"
|
||||
output_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
required_files="${GITEA_CONF}"
|
||||
start_stop_daemon_args="-e GITEA_WORK_DIR=${GITEA_WORK_DIR} \
|
||||
-e GITEA_CUSTOM=${GITEA_CUSTOM}"
|
|
@ -0,0 +1,28 @@
|
|||
[Unit]
|
||||
Description=Gitea service
|
||||
Documentation=https://docs.gitea.io/
|
||||
|
||||
AssertPathIsDirectory=/var/lib/gitea
|
||||
AssertPathIsReadWrite=/var/lib/gitea
|
||||
|
||||
After=network.target
|
||||
Requires=network.target
|
||||
After=mysqld.service
|
||||
After=postgresql.service
|
||||
After=memcached.service
|
||||
After=redis.service
|
||||
|
||||
[Service]
|
||||
User=git
|
||||
Group=git
|
||||
|
||||
Environment="GITEA_WORK_DIR=/var/lib/gitea GITEA_CUSTOM=/var/lib/gitea/custom"
|
||||
WorkingDirectory=/var/lib/gitea
|
||||
ExecStart=/usr/bin/gitea web --config /etc/gitea/app.ini
|
||||
|
||||
Restart=always
|
||||
PrivateTmp=true
|
||||
Nice=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,85 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
inherit golang-vcs-snapshot systemd user
|
||||
|
||||
EGO_PN="code.gitea.io/gitea"
|
||||
KEYWORDS="~amd64 ~arm ~arm64"
|
||||
|
||||
DESCRIPTION="A painless self-hosted Git service"
|
||||
HOMEPAGE="https://gitea.io"
|
||||
SRC_URI="https://github.com/go-gitea/gitea/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
IUSE="pam sqlite"
|
||||
|
||||
COMMON_DEPEND="pam? ( sys-libs/pam )"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
dev-go/go-bindata"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
dev-vcs/git"
|
||||
|
||||
DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md )
|
||||
S="${WORKDIR}/${P}/src/${EGO_PN}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup git
|
||||
enewuser git -1 /bin/bash /var/lib/gitea git
|
||||
}
|
||||
|
||||
gitea_make() {
|
||||
local my_tags=(
|
||||
bindata
|
||||
$(usev pam)
|
||||
$(usex sqlite 'sqlite sqlite_unlock_notify' '')
|
||||
)
|
||||
local my_makeopt=(
|
||||
DRONE_TAG=${PV}
|
||||
TAGS="${my_tags[@]}"
|
||||
)
|
||||
GOPATH=${WORKDIR}/${P}:$(get_golibdir_gopath) emake "${my_makeopt[@]}" "$1"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
gitea_make generate
|
||||
gitea_make build
|
||||
}
|
||||
|
||||
src_test() {
|
||||
gitea_make test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
einstalldocs
|
||||
dobin gitea
|
||||
newconfd "${FILESDIR}"/gitea.confd-r1 gitea
|
||||
newinitd "${FILESDIR}"/gitea.initd-r2 gitea
|
||||
systemd_newunit "${FILESDIR}"/gitea.service-r1 gitea.service
|
||||
diropts -m0750 -o git -g git
|
||||
keepdir /etc/gitea
|
||||
keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
|
||||
keepdir /var/log/gitea
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "The configuration path has been changed to ${EROOT}/etc/gitea/app.ini."
|
||||
ewarn "Please adapt the gitea-repositories hooks and ssh authorized_keys."
|
||||
ewarn "Depending on your configuration you should run something like:"
|
||||
ewarn "sed -i -e 's#/var/lib/gitea/conf/app.ini#/etc/gitea/app.ini#' \\"
|
||||
ewarn " /var/lib/gitea/gitea-repositories/*/*/hooks/*/* \\"
|
||||
ewarn " /var/lib/gitea/.ssh/authorized_keys"
|
||||
|
||||
if [[ ! -e "${EROOT}/etc/gitea/app.ini" ]]; then
|
||||
elog "No app.ini found, copying initial config over"
|
||||
cp "${FILESDIR}"/app.ini "${EROOT}"/etc/gitea/ || die
|
||||
chown git:git "${EROOT}"/etc/gitea/app.ini || die
|
||||
elog "Please make sure that your 'git' user has the correct homedir (/var/lib/gitea)."
|
||||
else
|
||||
elog "app.ini found, please check the sample file for possible changes"
|
||||
ewarn "Please note that environment variables have been changed:"
|
||||
ewarn "GITEA_WORK_DIR is set to /var/lib/gitea (previous value: unset)"
|
||||
ewarn "GITEA_CUSTOM is set to '\$GITEA_WORK_DIR/custom' (previous: /var/lib/gitea)"
|
||||
fi
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>xdch47@posteo.de</email>
|
||||
<name>Felix Neumärker</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>nemunaire@nemunai.re</email>
|
||||
<name>Pierre-Olivier Mercier</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">go-gitea/gitea</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
Loading…
Reference in New Issue