1 Summary: An HTTP daemon that serves Git clients
6 Group: Development/Building
7 # md5 deliberately omitted until this package is useful
8 Source0: https://gitlab.com/gitlab-org/gitlab-workhorse/repository/archive.tar.gz?ref=v%{version}&/%{name}-%{version}.tar.gz
9 Source1: %{name}.service
11 URL: https://gitlab.com/gitlab-org/gitlab-workhorse
12 BuildRequires: git-core
14 %{?with_systemd:BuildRequires: systemd-units}
15 Obsoletes: gitlab-git-http-server <= 0.3.0
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 gitlab-git-http-server was designed to unload Git HTTP traffic from
20 the GitLab Rails app (Unicorn) to a separate daemon. All
21 authentication and authorization logic is still handled by the GitLab
26 mv %{name}-v%{version}-*/* .
30 # make version similar when built from git:
31 # Starting gitlab-workhorse v0.7.1-20160404.102052
32 version=v%{version}-$(date -u +%%Y%%m%%d.%%H%%M%%S)
38 ./gitlab-workhorse --version > v
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT{%{_sbindir},%{systemdunitdir}}
45 install -p %{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}
46 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
49 rm -rf $RPM_BUILD_ROOT
52 %systemd_preun %{name}.service
55 %systemd_post %{name}.service
61 %defattr(644,root,root,755)
62 %doc CHANGELOG README.md LICENSE
63 %attr(755,root,root) %{_sbindir}/%{name}
64 %{systemdunitdir}/%{name}.service