You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
117 lines
3.0 KiB
117 lines
3.0 KiB
Name: concourse |
|
Version: 7.1.0 |
|
Release: 1%{?dist} |
|
Source0: https://github.com/concourse/concourse/archive/v%{version}.tar.gz |
|
Summary: Concourse is a container-based continuous thing-doer written in Go and Elm. |
|
Group: System/Pipeline |
|
License: Apache |
|
URL: https://concourse-ci.org/ |
|
BuildRequires: golang |
|
#Requires: |
|
|
|
|
|
%description |
|
Concourse is an open-source continuous thing-doer. |
|
Built on the simple mechanics of resources, tasks, and jobs, |
|
Concourse presents a general approach to automation that makes it great for CI/CD. |
|
|
|
|
|
%package web |
|
Source100: concourse-web.service |
|
Source101: concourse-web.config |
|
Summary: Concourse Web |
|
Requires: concourse |
|
%description web |
|
|
|
|
|
%package worker |
|
Source200: concourse-worker.service |
|
Source201: concourse-worker.config |
|
Summary: Concourse Worker |
|
Requires: concourse |
|
%description worker |
|
|
|
|
|
%package fly |
|
Summary: A command line interface that runs a build in a container with ATC |
|
%description fly |
|
|
|
|
|
%prep |
|
%setup -q -c %{name}-%{version} |
|
mkdir -p src/github.com/concourse/ |
|
tar xvf %{SOURCE0} |
|
mv concourse-%{version} src/github.com/concourse/concourse/ |
|
|
|
|
|
%build |
|
export GOPATH=`pwd` |
|
export GO111MODULE=on |
|
cd src/github.com/concourse/concourse |
|
%ifarch ppc64 |
|
export CGO_ENABLED=1 |
|
%endif |
|
go mod download |
|
go build -v -gcflags=all="-N -l" -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o concourse ./cmd/concourse |
|
pushd fly |
|
go build -v -gcflags=all="-N -l" -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o fly |
|
popd |
|
|
|
|
|
%install |
|
mkdir -p %{buildroot}%{_bindir} |
|
cp -rv src/github.com/concourse/concourse/concourse %{buildroot}%{_bindir} |
|
cp -rv src/github.com/concourse/concourse/fly/fly %{buildroot}%{_bindir} |
|
mkdir -p %{buildroot}%{_unitdir} |
|
cp -rv %{SOURCE100} %{buildroot}%{_unitdir} |
|
cp -rv %{SOURCE200} %{buildroot}%{_unitdir} |
|
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/web/ |
|
cp %{SOURCE101} %{buildroot}%{_sysconfdir}/%{name}/web/config |
|
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/worker/ |
|
cp %{SOURCE201} %{buildroot}%{_sysconfdir}/%{name}/worker/config |
|
|
|
|
|
%pre |
|
getent group concourse > /dev/null || groupadd -r concourse |
|
getent passwd concourse > /dev/null || useradd -r -d /var/lib/concourse -g concourse -s /sbin/nologin -c "Concourse User" concourse |
|
exit 0 |
|
|
|
|
|
%post web |
|
%{_bindir}/concourse generate-key -t rsa -f /etc/concourse/web/session_signing_key |
|
%{_bindir}/concourse generate-key -t ssh -f /etc/concourse/web/tsa_host_key |
|
%systemd_post concourse-web.service |
|
%preun web |
|
%systemd_preun concourse-web.service |
|
%postun web |
|
%systemd_postun concourse-web.service |
|
|
|
|
|
%post worker |
|
%{_bindir}/concourse generate-key -t ssh -f /etc/concourse/worker/tsa_host_key |
|
%systemd_post concourse-worker.service |
|
%postun worker |
|
%systemd_postun concourse-worker.service |
|
%preun worker |
|
%systemd_preun concourse-worker.service |
|
|
|
|
|
%files |
|
%{_bindir}/concourse |
|
|
|
|
|
%files web |
|
%{_sysconfdir}/%{name}/web/config |
|
%{_unitdir}/concourse-web.service |
|
|
|
|
|
%files worker |
|
%{_sysconfdir}/%{name}/worker/config |
|
%{_unitdir}/concourse-worker.service |
|
|
|
|
|
%files fly |
|
%{_bindir}/fly |
|
|
|
|
|
%changelog
|
|
|