]> git.pld-linux.org Git - packages/gitlab-workhorse.git/blame - gitlab-workhorse.spec
up to 1.0.1
[packages/gitlab-workhorse.git] / gitlab-workhorse.spec
CommitLineData
6d37e2cf 1Summary: Handles slow HTTP requests for GitLab
c2673245 2Name: gitlab-workhorse
6d37e2cf 3Version: 1.0.1
ece2e785 4Release: 1
c2673245 5License: MIT
6d37e2cf 6Group: Networking/Daemons/HTTP
0d57ad7d 7Source0: https://gitlab.com/gitlab-org/gitlab-workhorse/repository/archive.tar.bz2?ref=v%{version}&/%{name}-%{version}.tar.bz2
6d37e2cf 8# Source0-md5: 23f922264b28f0eaf20404c41451e494
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
6d37e2cf
ER
23Gitlab-workhorse is a smart reverse proxy for GitLab. It handles
24"large" HTTP requests such as file downloads, file uploads, Git
25push/pull and Git archive downloads.
c2673245
ER
26
27%prep
8f975f47
ER
28%setup -qc
29mv %{name}-v%{version}-*/* .
c2673245
ER
30
31%build
49804a58
ER
32# make version similar when built from git:
33# Starting gitlab-workhorse v0.7.1-20160404.102052
34version=v%{version}-$(date -u +%%Y%%m%%d.%%H%%M%%S)
35
36%{__make} \
37 VERSION=$version
38
39# verify
40./gitlab-workhorse --version > v
41grep "$version" v
c2673245
ER
42
43%install
44rm -rf $RPM_BUILD_ROOT
6d2a4500 45install -d $RPM_BUILD_ROOT{%{_sbindir},%{systemdunitdir},/etc/{rc.d/init.d,sysconfig}}
7d3229e0
ER
46
47install -p %{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}
48cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
6d2a4500
ER
49install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
50cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
c2673245
ER
51
52%clean
53rm -rf $RPM_BUILD_ROOT
54
c2673245 55%post
913d015a
ER
56/sbin/chkconfig --add %{name}
57%service %{name} restart
c2673245
ER
58%systemd_post %{name}.service
59
913d015a
ER
60%preun
61if [ "$1" = "0" ]; then
62 %service -q %{name} stop
63 /sbin/chkconfig --del %{name}
64fi
65%systemd_preun %{name}.service
66
c2673245 67%postun
7d3229e0 68%systemd_reload
c2673245
ER
69
70%files
71%defattr(644,root,root,755)
72%doc CHANGELOG README.md LICENSE
6d2a4500 73%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
c915e500 74%attr(754,root,root) /etc/rc.d/init.d/%{name}
c2673245 75%attr(755,root,root) %{_sbindir}/%{name}
c2673245 76%{systemdunitdir}/%{name}.service
This page took 0.041951 seconds and 4 git commands to generate.