]> git.pld-linux.org Git - packages/gitlab-workhorse.git/blame - gitlab-workhorse.spec
configurable listen options
[packages/gitlab-workhorse.git] / gitlab-workhorse.spec
CommitLineData
c2673245
ER
1Summary: An HTTP daemon that serves Git clients
2Name: gitlab-workhorse
bc26cb6d 3Version: 0.8.5
ece2e785 4Release: 1
c2673245
ER
5License: MIT
6Group: Development/Building
8f975f47 7Source0: https://gitlab.com/gitlab-org/gitlab-workhorse/repository/archive.tar.gz?ref=v%{version}&/%{name}-%{version}.tar.gz
bc26cb6d 8# Source0-md5: 983d07b5c6f277dac7bc652d002f938b
c2673245 9Source1: %{name}.service
c915e500 10Source2: %{name}.init
6d2a4500 11Source3: %{name}.sysconfig
8f975f47 12URL: https://gitlab.com/gitlab-org/gitlab-workhorse
c2673245 13BuildRequires: git-core
d0ff6830 14BuildRequires: golang >= 1.5
c915e500
ER
15BuildRequires: rpmbuild(macros) >= 1.647
16Requires(post,preun): /sbin/chkconfig
027df84c 17Requires: rc-scripts >= 0.4.16
c915e500 18Requires: systemd-units >= 0.38
79527d56 19Obsoletes: gitlab-git-http-server <= 0.3.0
c2673245
ER
20BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22%description
23gitlab-git-http-server was designed to unload Git HTTP traffic from
24the GitLab Rails app (Unicorn) to a separate daemon. All
25authentication and authorization logic is still handled by the GitLab
26Rails app.
27
28%prep
8f975f47
ER
29%setup -qc
30mv %{name}-v%{version}-*/* .
c2673245
ER
31
32%build
49804a58
ER
33# make version similar when built from git:
34# Starting gitlab-workhorse v0.7.1-20160404.102052
35version=v%{version}-$(date -u +%%Y%%m%%d.%%H%%M%%S)
36
37%{__make} \
38 VERSION=$version
39
40# verify
41./gitlab-workhorse --version > v
42grep "$version" v
c2673245
ER
43
44%install
45rm -rf $RPM_BUILD_ROOT
6d2a4500 46install -d $RPM_BUILD_ROOT{%{_sbindir},%{systemdunitdir},/etc/{rc.d/init.d,sysconfig}}
7d3229e0
ER
47
48install -p %{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}
49cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
6d2a4500
ER
50install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
51cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
c2673245
ER
52
53%clean
54rm -rf $RPM_BUILD_ROOT
55
c2673245 56%post
913d015a
ER
57/sbin/chkconfig --add %{name}
58%service %{name} restart
c2673245
ER
59%systemd_post %{name}.service
60
913d015a
ER
61%preun
62if [ "$1" = "0" ]; then
63 %service -q %{name} stop
64 /sbin/chkconfig --del %{name}
65fi
66%systemd_preun %{name}.service
67
c2673245 68%postun
7d3229e0 69%systemd_reload
c2673245
ER
70
71%files
72%defattr(644,root,root,755)
73%doc CHANGELOG README.md LICENSE
6d2a4500 74%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
c915e500 75%attr(754,root,root) /etc/rc.d/init.d/%{name}
c2673245 76%attr(755,root,root) %{_sbindir}/%{name}
c2673245 77%{systemdunitdir}/%{name}.service
This page took 0.084521 seconds and 4 git commands to generate.