]> git.pld-linux.org Git - packages/gitlab-workhorse.git/blob - gitlab-workhorse.spec
803c01aca88411fa9ab5212db18a6ad7b4eb7b85
[packages/gitlab-workhorse.git] / gitlab-workhorse.spec
1 Summary:        An HTTP daemon that serves Git clients
2 Name:           gitlab-workhorse
3 Version:        0.7.1
4 Release:        0.7
5 License:        MIT
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
10 Patch0:         go.patch
11 URL:            https://gitlab.com/gitlab-org/gitlab-workhorse
12 BuildRequires:  git-core
13 BuildRequires:  golang
14 %{?with_systemd:BuildRequires:  systemd-units}
15 Obsoletes:      gitlab-git-http-server <= 0.3.0
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %description
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
22 Rails app.
23
24 %prep
25 %setup -qc
26 mv %{name}-v%{version}-*/* .
27 %patch0 -p1
28
29 %build
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)
33
34 %{__make} \
35         VERSION=$version
36
37 # verify
38 ./gitlab-workhorse --version > v
39 grep "$version" v
40
41 %install
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT{%{_sbindir},%{systemdunitdir}}
44
45 install -p %{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}
46 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
47
48 %clean
49 rm -rf $RPM_BUILD_ROOT
50
51 %preun
52 %systemd_preun %{name}.service
53
54 %post
55 %systemd_post %{name}.service
56
57 %postun
58 %systemd_reload
59
60 %files
61 %defattr(644,root,root,755)
62 %doc CHANGELOG README.md LICENSE
63 %attr(755,root,root) %{_sbindir}/%{name}
64 %{systemdunitdir}/%{name}.service
This page took 0.04161 seconds and 2 git commands to generate.