Merge branch '81-add-ebuild-for-gitlab-pages-and-enable-them-in-the-gitlab-ce-ebuild' into 'master'
www-servers/gitlab-pages: Closes #81 See merge request !145
This commit is contained in:
		
						commit
						b299ceceb6
					
				
					 7 changed files with 141 additions and 0 deletions
				
			
		
							
								
								
									
										6
									
								
								www-servers/gitlab-pages/ChangeLog
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								www-servers/gitlab-pages/ChangeLog
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | |||
| *gitlab-pages-0.3.2 (07 Mar 2017) | ||||
| 
 | ||||
|   07 Mar 2017; Manuel Friedli <manuel@fritteli.ch> | ||||
|   +files/0001-fix-Makefile-0.3.2.patch, +files/gitlab-pages-0.3.2.conf, | ||||
|   +files/gitlab-pages-0.3.2.init, +gitlab-pages-0.3.2.ebuild, +metadata.xml: | ||||
|   www-servers/gitlab-pages:   added first ebuild for gitlab-pages | ||||
							
								
								
									
										7
									
								
								www-servers/gitlab-pages/Manifest
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								www-servers/gitlab-pages/Manifest
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| AUX 0001-fix-Makefile-0.3.2.patch 744 SHA256 7efe9ee3cdf0e7e324155d05651f535b39f151adfd8f8bc2ea36eea64e40f1e1 SHA512 2c50e6bb214be622546d9c07f4f39b83d116976dbc9c040a0dd74c70dc8deadf5f6870468fda957b3a4d3df8eda982c3d86612cb8dd7865650cd3fe9202f7b11 WHIRLPOOL a1babc1249f3b48f376163a9ab63a8ca3563da544cf15d04a79fcbb38dcb61679da8304e3eb2afd8a0f1d662be8f3cc144b9cd0928504b197d11b250670d40d3 | ||||
| AUX gitlab-pages-0.3.2.conf 155 SHA256 9a503733141c5dc7d9308ddb6b246c884e5b3e0096f78ada33efe105b2f4de1e SHA512 707fcd2c1b9dd3a42c81ce7d4c9e1368bd582e0f737d599b78dedf8ae689dfccd288788d33cd39e87eb18afb578f86c97f1b4ab54882a85b7e00ccc98e8d470a WHIRLPOOL ea5a3609f0b8150884c9d5a28720eac49eae3c07cc791f4b5ca506a7ebbc4802d94ee80fe735d9f95b17ee488bad0c7edf009d8ce220715922e57a32ea93297d | ||||
| AUX gitlab-pages-0.3.2.init 589 SHA256 e211be50e4d7c192b13c68dd242575a0bb420282a2a14d2a10e3160b1e48062f SHA512 4b16d385425f655301df5af9108cfe05d2043a43b56b67de659dfd2d32b90de8516d12af4945ed7852f5677cbbc56d2372675fc28ea34c934861f15b7a80569e WHIRLPOOL 80c10e6263964fc8aedf8203e9dd6d5079cba59432d4fecfb034ba79ee30eabd357527573db6a26d863fd03f4dc76a25d160bbb85d60f63609ba883f09679af3 | ||||
| DIST gitlab-pages-0.3.2.tar.bz2 205531 SHA256 392b0620871ab36a362f8b8b9008c266eda465e6f32611ccbdbe640cd77ae7b5 SHA512 e452af8a9d2032ccba827a7a165abf324008c585369f74d14a47524eaaa3255a92c38f102e8cf63a86012650da6265aa1a28f0ade5131ebb1df51e6202be0edc WHIRLPOOL d47459d214d1ed9818de534885ea806f092fe2fb02b2aa08b00b95fb9c3f2693b7c9b8d3e5723be55535888e1276ba4dbc24ead2f659677a43d326dcff9f3925 | ||||
| EBUILD gitlab-pages-0.3.2.ebuild 1966 SHA256 c504cda2f3937c38ce799cfd97a2c6ec5ed0a158bcde5ea647a50cbad37e61ef SHA512 523afc19d82b5f781ed1dbec6badb6ac61af91bd61ce0499d9408259ad2efcfbfcefb8b18c9c5590f54f3f32618557c708a0da734105e2ad9e01d7ff87c48c4d WHIRLPOOL 5998002ad7e7540b41eb829ef2867ad19694b698c5da7f556af3089c133e0dbf56c243ea58b84092ee602795d549b16ade93547e12b79361ac40cab84f15be36 | ||||
| MISC ChangeLog 301 SHA256 af23b80f1e7e1138ff8f00c5385798afd472a046270c7a2a8cf1f26e1b985656 SHA512 c79d324b891b1863658bbd6abc4e5037be18a3f7270d466d4c5edd0ead1107a47be5c29956c7870c877fcb39b87f387720d008b33bd6ca147aec2ed4f04cad8f WHIRLPOOL 99f02ed9a48681ca48c2df2abd499c5321545dc72efabd53ffcfdfa6e68c3f8a6d9f44b33d59b3e10f0f3583b404df062f09cae75a6c6dd4af652cd065ea6ad6 | ||||
| MISC metadata.xml 248 SHA256 7b43be15755627edf5c12cf1b50c607d781558640bf8375d685d51d7ade99a32 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2 WHIRLPOOL 993013c9878ead35469db13d3072f694a341ee654182e0c31d0678f5dd6de4bdc8d59a0b7bb6d685dc41ea6b55dac518cd8034131baea8002170c680e50304d1 | ||||
							
								
								
									
										18
									
								
								www-servers/gitlab-pages/files/0001-fix-Makefile-0.3.2.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								www-servers/gitlab-pages/files/0001-fix-Makefile-0.3.2.patch
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| diff --git a/src/gitlab.com/gitlab-org/gitlab-pages/Makefile b/src/gitlab.com/gitlab-org/gitlab-pages/Makefile
 | ||||
| index 2c1b8e1..4c6feb0 100644
 | ||||
| --- a/src/gitlab.com/gitlab-org/gitlab-pages/Makefile
 | ||||
| +++ b/src/gitlab.com/gitlab-org/gitlab-pages/Makefile
 | ||||
| @@ -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
 | ||||
| -
 | ||||
|  GO_LDFLAGS ?= -X main.VERSION=$(VERSION) -X main.REVISION=$(REVISION) | ||||
|  GO_FILES ?= $(shell find . -name '*.go') | ||||
|   | ||||
							
								
								
									
										7
									
								
								www-servers/gitlab-pages/files/gitlab-pages-0.3.2.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								www-servers/gitlab-pages/files/gitlab-pages-0.3.2.conf
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| LISTEN_HTTP=:9090 | ||||
| LISTEN_HTTPS= | ||||
| LISTEN_PROXY= | ||||
| PAGES_DOMAIN=example-pages.com | ||||
| PAGES_ROOT=/opt/gitlab/shared/pages | ||||
| 
 | ||||
| LOGFILE=/var/log/gitlab/gitlab-pages.log | ||||
							
								
								
									
										16
									
								
								www-servers/gitlab-pages/files/gitlab-pages-0.3.2.init
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								www-servers/gitlab-pages/files/gitlab-pages-0.3.2.init
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| #!/sbin/openrc-run | ||||
| 
 | ||||
| start() { | ||||
| 	ebegin "Starting gitlab-pages" | ||||
| 	start-stop-daemon --start --exec /usr/bin/gitlab-pages --pidfile /run/gitlab-pages.pid \ | ||||
| 	--make-pidfile --background --user @USER@:@USER@ --stdout "${LOGFILE}" --stderr "${LOGFILE}" \ | ||||
| 	-- -listen-http "${LISTEN_HTTP}" -listen-https "${LISTEN_HTTPS}" -listen-proxy "${LISTEN_PROXY}" \ | ||||
| 	-pages-domain "${PAGES_DOMAIN}" -pages-root "${PAGES_ROOT}" | ||||
| 	eend $? | ||||
| } | ||||
| 
 | ||||
| stop() { | ||||
| 	ebegin "Stopping gitlab-workhorse" | ||||
| 	start-stop-daemon --stop --exec /usr/bin/gitlab-pages --pidfile /run/gitlab-workhorse.pid --user @USER@:@USER@ | ||||
| 	eend $? | ||||
| } | ||||
							
								
								
									
										79
									
								
								www-servers/gitlab-pages/gitlab-pages-0.3.2.ebuild
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										79
									
								
								www-servers/gitlab-pages/gitlab-pages-0.3.2.ebuild
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,79 @@ | |||
| # 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_BRANCH="1-10-stable" | ||||
| MY_GIT_HASH="7285dc6" | ||||
| 
 | ||||
| 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" | ||||
| LICENSE="MIT" | ||||
| SLOT="0/${PVR}" | ||||
| 
 | ||||
| DEPEND=">=dev-lang/go-1.5" | ||||
| 
 | ||||
| RESTRICT="test mirror" | ||||
| 
 | ||||
| MY_USER="gitlab_pages" | ||||
| 
 | ||||
| pkg_setup() { | ||||
| 	enewgroup ${MY_USER} | ||||
| 	enewuser ${MY_USER} -1 /bin/false /dev/null ${MY_USER} | ||||
| } | ||||
| 
 | ||||
| src_prepare() { | ||||
| 	epatch "${FILESDIR}/0001-fix-Makefile-${PV}.patch" | ||||
| 
 | ||||
| 	sed -i -E \ | ||||
| 		-e "s/@@REVISION@@/${MY_GIT_HASH}/" \ | ||||
| 		src/gitlab.com/gitlab-org/${PN}/Makefile | ||||
| 
 | ||||
| 	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}" | ||||
| } | ||||
| 
 | ||||
| pkg_postinst() { | ||||
| 	elog | ||||
| 	elog "If this is a fresh install of GitLab CI Multi Runner, please configure it" | ||||
| 	elog "with the following command:" | ||||
| 	elog "        emerge --config \"=${CATEGORY}/${PF}\"" | ||||
| } | ||||
| 
 | ||||
| pkg_config() { | ||||
| 	einfo "You need to register the runner with your GitLab CI instance. Please" | ||||
| 	einfo "Follow the instructions at" | ||||
| 	einfo | ||||
| 	einfo "https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md" | ||||
| 	einfo | ||||
| 	einfo "Perhaps I'll improve the ebuild later ... kthxbye." | ||||
| } | ||||
							
								
								
									
										8
									
								
								www-servers/gitlab-pages/metadata.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								www-servers/gitlab-pages/metadata.xml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||||
| <pkgmetadata> | ||||
| 	<maintainer type="person"> | ||||
| 		<email>manuel@fritteli.ch</email> | ||||
| 		<name>Manuel Friedli</name> | ||||
| 	</maintainer> | ||||
| </pkgmetadata> | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue