Commit 51c463551e219a68fd46f321478ce8e52718867c

Authored by Alessandro Beltrão
1 parent 7b08bcb1
Exists in spec_refactor

Adding macros to gitlab-shell and upgrading version

Signed-off-by: Alessandro Caetano <alessandro.caetanob@gmail.com>
Showing 1 changed file with 20 additions and 16 deletions   Show diff stats
src/pkg-rpm/gitlab-shell/gitlab-shell.spec
1 Name: gitlab-shell 1 Name: gitlab-shell
2 -Version: 2.4.0  
3 -Release: 5.1 2 +Version: 2.6.6
  3 +Release: 0
4 Summary: Software Development Platform 4 Summary: Software Development Platform
5 -Release: 0  
6 Group: Development/Tools 5 Group: Development/Tools
7 License: Expat 6 License: Expat
8 URL: https://gitlab.com/gitlab-org/gitlab-shell 7 URL: https://gitlab.com/gitlab-org/gitlab-shell
@@ -12,6 +11,11 @@ BuildArch: noarch @@ -12,6 +11,11 @@ BuildArch: noarch
12 # BuildRequires: 11 # BuildRequires:
13 Requires: ruby >= 1.9, redis 12 Requires: ruby >= 1.9, redis
14 13
  14 +%global _log /var/log/gitlab-shell
  15 +%global _usrlib /usr/lib/gitlab-shell
  16 +%global _varlib /var/lib/gitlab-shell
  17 +%global _etc /etc/gitlab-shell
  18 +
15 %description 19 %description
16 Gitlab-shell 20 Gitlab-shell
17 21
@@ -48,32 +52,32 @@ audit_usernames: false @@ -48,32 +52,32 @@ audit_usernames: false
48 EOF 52 EOF
49 53
50 %install 54 %install
51 -mkdir -p %{buildroot}/usr/lib/gitlab-shell  
52 -mkdir -p %{buildroot}/etc/gitlab-shell 55 +mkdir -p %{buildroot}%{_usrlib}
  56 +mkdir -p %{buildroot}%{_etc}
53 57
54 -mv config.yml %{buildroot}/etc/gitlab-shell  
55 -ln -s /etc/gitlab-shell/config.yml %{buildroot}/usr/lib/gitlab-shell/ 58 +mv config.yml %{buildroot}%{_etc}
  59 +ln -s %{_etc}/config.yml %{buildroot}%{_usrlib}
56 60
57 -cp -r . %{buildroot}/usr/lib/gitlab-shell 61 +cp -r . %{buildroot}%{_usrlib}
58 62
59 %post 63 %post
60 groupadd git || true 64 groupadd git || true
61 if ! id git; then 65 if ! id git; then
62 - adduser --system --home-dir /var/lib/gitlab-shell --gid git git 66 + adduser --system --home-dir %{_varlib} --gid git git
63 fi 67 fi
64 68
65 -mkdir -p /var/log/gitlab-shell  
66 -mkdir -p /var/lib/gitlab-shell/.ssh  
67 -mkdir -p /var/lib/gitlab-shell/repositories 69 +mkdir -p %{_log}
  70 +mkdir -p %{_varlib}/.ssh
  71 +mkdir -p %{_varlib}/repositories
68 72
69 -chown -R git:git /var/log/gitlab-shell  
70 -chown -R git:git /var/lib/gitlab-shell 73 +chown -R git:git %{_log}
  74 +chown -R git:git %{_varlib}
71 75
72 sudo -u git -H /usr/lib/gitlab-shell/bin/install 76 sudo -u git -H /usr/lib/gitlab-shell/bin/install
73 77
74 %files 78 %files
75 -/usr/lib/gitlab-shell  
76 -/etc/gitlab-shell 79 +%{_usrlib}
  80 +%{_etc}
77 81
78 82
79 %changelog 83 %changelog