it compiles!!!

This commit is contained in:
Manuel Friedli 2018-02-09 02:47:24 +01:00
parent 7d3995dae8
commit 7a457ed31e
4 changed files with 150 additions and 1 deletions

View file

@ -14,6 +14,7 @@ EBUILD gitlab-pages-0.4.1.ebuild 1944 SHA256 f489ea11f220c84e099cff1ce0e960c0249
EBUILD gitlab-pages-0.4.2-r1.ebuild 1434 SHA256 477a4be7f099ed542dc7f69b2008c08d00593225e63a7c652139b4ff1e1feb46 SHA512 88923ff7da8bbb21eca3044bfaf8a59dd9a6fedc96bbeb1739a591ba2054ff1e0d789aeee7b634a70eb1627cfe3ad50361577555ccc5fedb1523e6af3518a4af WHIRLPOOL d94e14712020c5542a5b41c8450a80824fc42d585859a9527812ecb53a452101977f973badce04e2fdb239d87ad465d4ca81a848dbfde67044031b6df0f4a039
EBUILD gitlab-pages-0.4.4.ebuild 1436 SHA256 8f496c129cd8bff8dca1d882713ed9f460458bb887c34a2926c03e4057e893d6 SHA512 a4c90b718ef63888e454c4a48949a9713dfa44f354556a840f6e78b86e46d90f5c922c83ea3b2b35fdb5ab5168f6cdff1004666e3dba0b6acee95aecde040afb WHIRLPOOL d18824f792e1b541f833e3fcedd049956f8177bd4c5cdf75dc6e6e28aa983be69a7475d82b6a1427a87619d288321533019aad0802cce1bfbc118a1c76644b47
EBUILD gitlab-pages-0.5.1.ebuild 1436 SHA256 4832678c91a3ac6f68894a9512ee60e2037600a26d7883d72bf77857781c823f SHA512 9395ed1bed70268b5db9540491a2b16bad0f85aaf2b0f32c3307cc0f1acbbb7aa59b44d059d45621dac9ee7d1bf97b4fe0b3f8083001099b09a14b358c52ae37 WHIRLPOOL b3fc7ad05039d1a0e652ed0224c3e6ff76d4ae9bf1ef8114503e7cb73cb35a0e4de7550a06b108ee284e294e31c691872d6587ca58ebf6a9bed6b169de391903
EBUILD gitlab-pages-0.6.0.ebuild 1449 SHA256 222470c87b9b2746fc32f6524f5b97f898b7d872eb68ad6f46234a34631a2d6a SHA512 097bb10d29c4304b86d1e492a24c68c34ebda1df606306a3802896884d65a27eda0f1264198e71da57e8ce9aa94be70c5dfb8639c87e814af46c094c83c1a059 WHIRLPOOL 8476550cddec6c25a2dacebfbb8043d2237c0a0c235509039dc9296de7175859ca4b7919ac10a20052190e8bc10287e08938efb92c4dae9fda461278ae5d14be
EBUILD gitlab-pages-0.6.0.ebuild 1797 SHA256 5c463ae69f757e284d1b399dfc883af0c0b2ab44068a144d43c8648b94b3e5b6 SHA512 2bcd33d643adbcafcbdea8a01c53a98fe60bb65ca894214b939ef0e8b2ae85db2bd39b658794a89c38d30b0d2a6a3a28e5be674d6eec384bcae4ccc0be4ca962 WHIRLPOOL 95ea32b9b49bcf05fd21ac2b77182c735401f8e42a0c3cafc06f7ca3c002b69fcf22658b6f856ce83a697bc5389890c034cc2df06f9d354b01eadab3ffdfb140
MISC ChangeLog 2227 SHA256 c1084119d1a8d5b58d8916b3c8270cfb8aced8d761c777b4be7c9ec942914ff0 SHA512 d66a020879462cacba6ed0e7118db12426b5d5ec3256dbc4dca78e80db87bf513b900557f672c4445734970435184b50790b3b9fe90ba930ef4e6cf526e82cd6 WHIRLPOOL 5b95f489d4cf4f3f278c3277efda3482da83b527fc23c2036c635145fb8ac77d21ed9299646295438aacc88a410e796d6e5c9f73561941731a6fa9019c73b8f9
MISC gitlab-pages-0.6.0.ebuild.bak 1449 SHA256 222470c87b9b2746fc32f6524f5b97f898b7d872eb68ad6f46234a34631a2d6a SHA512 097bb10d29c4304b86d1e492a24c68c34ebda1df606306a3802896884d65a27eda0f1264198e71da57e8ce9aa94be70c5dfb8639c87e814af46c094c83c1a059 WHIRLPOOL 8476550cddec6c25a2dacebfbb8043d2237c0a0c235509039dc9296de7175859ca4b7919ac10a20052190e8bc10287e08938efb92c4dae9fda461278ae5d14be
MISC metadata.xml 248 SHA256 7b43be15755627edf5c12cf1b50c607d781558640bf8375d685d51d7ade99a32 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2 WHIRLPOOL 993013c9878ead35469db13d3072f694a341ee654182e0c31d0678f5dd6de4bdc8d59a0b7bb6d685dc41ea6b55dac518cd8034131baea8002170c680e50304d1

View file

@ -0,0 +1,18 @@
diff --git a/src/gitlab.com/gitlab-org/gitlab-pages/Makefile.internal.mk b/src/gitlab.com/gitlab-org/gitlab-pages/Makefile.internal.mk
index 309083f..b9f3bc1 100644
--- a/src/gitlab.com/gitlab-org/gitlab-pages/Makefile.internal.mk
+++ b/src/gitlab.com/gitlab-org/gitlab-pages/Makefile.internal.mk
@@ -1,12 +1,6 @@
-REVISION := $(shell git rev-parse --short HEAD || echo unknown)
-LAST_TAG := $(shell git describe --tags --abbrev=0)
-COMMITS := $(shell echo `git log --oneline $(LAST_TAG)..HEAD | wc -l`)
+REVISION := @@REVISION@@
VERSION := $(shell cat VERSION)
-ifneq (v$(VERSION),$(LAST_TAG))
- VERSION := $(shell echo $(VERSION)~beta.$(COMMITS).g$(REVISION))
-endif
-
VERSION_FLAGS := -ldflags='-X "main.Version=$(VERSION)" -X "main.REVISION=$(REVISION)"'
# cd into the GOPATH to workaround ./... not following symlinks

View file

@ -0,0 +1,68 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
EGO_PN="gitlab.com/gitlab-org/gitlab-pages/..."
EGIT_COMMIT="15c938ca"
MY_PV="v${PV/_/-}"
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=${MY_PV} -> ${P}.tar.bz2"
EGO_BUILD_FLAGS="-ldflags '-X main.Version ${PV} -X main.REVISION ${EGIT_COMMIT}'"
inherit eutils golang-build golang-vcs-snapshot user
DESCRIPTION="Simple HTTP server written in Go made to serve GitLab Pages with CNAMEs and SNI"
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-pages"
KEYWORDS="~amd64 ~x86 ~arm ~arm64"
LICENSE="MIT"
SLOT="0/${PVR}"
DEPEND=">=dev-lang/go-1.8.3"
RESTRICT="test mirror"
MY_USER="gitlab_pages"
pkg_setup() {
enewgroup ${MY_USER}
enewuser ${MY_USER} -1 -1 -1 ${MY_USER}
}
#src_prepare() {
# epatch "${FILESDIR}/0001-fix-Makefile-0.6.0.patch"
#
# sed -i -E \
# -e "s/@@REVISION@@/${EGIT_COMMIT}/" \
# src/gitlab.com/gitlab-org/${PN}/Makefile.internal.mk
#
# eapply_user
#}
src_compile() {
# emake GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" RELEASE=true -C src/${EGO_PN%/*} all
# silly golang-build_src_compile doesn't work. some crap about
# escaping ...
ego_pn_check
env GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" go build -v -work -x -ldflags "-X main.Version=${PV} -X main.REVISION=${EGIT_COMMIT}" "${EGO_PN}" || die
}
src_install() {
golang-build_src_install
dobin bin/*
dodoc src/${EGO_PN%/*}/README.md src/${EGO_PN%/*}/CHANGELOG
# rc script
local rcscript="${PN}-0.3.2.init"
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@USER@|${MY_USER}|g" \
"${T}/${rcscript}" \
|| die "failed to filter ${rcscript}"
newinitd "${T}/${rcscript}" "${PN}"
newconfd "${FILESDIR}/${PN}-0.3.2.conf" "${PN}"
}

View file

@ -0,0 +1,62 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
inherit eutils golang-build golang-vcs-snapshot user
EGO_PN="gitlab.com/gitlab-org/gitlab-pages/..."
MY_PV="v${PV/_/-}"
MY_GIT_HASH="15c938ca"
DESCRIPTION="Simple HTTP server written in Go made to serve GitLab Pages with CNAMEs and SNI"
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-pages"
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=v${PV} -> ${P}.tar.bz2"
KEYWORDS="~amd64 ~x86 ~arm ~arm64"
LICENSE="MIT"
SLOT="0/${PVR}"
DEPEND=">=dev-lang/go-1.8.3"
RESTRICT="test mirror"
MY_USER="gitlab_pages"
pkg_setup() {
enewgroup ${MY_USER}
enewuser ${MY_USER} -1 -1 -1 ${MY_USER}
}
src_prepare() {
epatch "${FILESDIR}/0001-fix-Makefile-0.6.0.patch"
sed -i -E \
-e "s/@@REVISION@@/${MY_GIT_HASH}/" \
src/gitlab.com/gitlab-org/${PN}/Makefile.internal.mk
eapply_user
}
src_compile() {
emake GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" RELEASE=true -C src/${EGO_PN%/*} all
}
src_install() {
golang-build_src_install
dobin bin/*
dodoc src/${EGO_PN%/*}/README.md src/${EGO_PN%/*}/CHANGELOG
# rc script
local rcscript="${PN}-0.3.2.init"
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@USER@|${MY_USER}|g" \
"${T}/${rcscript}" \
|| die "failed to filter ${rcscript}"
newinitd "${T}/${rcscript}" "${PN}"
newconfd "${FILESDIR}/${PN}-0.3.2.conf" "${PN}"
}