From 51c463551e219a68fd46f321478ce8e52718867c Mon Sep 17 00:00:00 2001 From: Alessandro Caetano Date: Wed, 28 Oct 2015 15:47:25 -0200 Subject: [PATCH] Adding macros to gitlab-shell and upgrading version --- src/pkg-rpm/gitlab-shell/gitlab-shell.spec | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/pkg-rpm/gitlab-shell/gitlab-shell.spec b/src/pkg-rpm/gitlab-shell/gitlab-shell.spec index 8142ae9..5dd5446 100644 --- a/src/pkg-rpm/gitlab-shell/gitlab-shell.spec +++ b/src/pkg-rpm/gitlab-shell/gitlab-shell.spec @@ -1,8 +1,7 @@ Name: gitlab-shell -Version: 2.4.0 -Release: 5.1 +Version: 2.6.6 +Release: 0 Summary: Software Development Platform -Release: 0 Group: Development/Tools License: Expat URL: https://gitlab.com/gitlab-org/gitlab-shell @@ -12,6 +11,11 @@ BuildArch: noarch # BuildRequires: Requires: ruby >= 1.9, redis +%global _log /var/log/gitlab-shell +%global _usrlib /usr/lib/gitlab-shell +%global _varlib /var/lib/gitlab-shell +%global _etc /etc/gitlab-shell + %description Gitlab-shell @@ -48,32 +52,32 @@ audit_usernames: false EOF %install -mkdir -p %{buildroot}/usr/lib/gitlab-shell -mkdir -p %{buildroot}/etc/gitlab-shell +mkdir -p %{buildroot}%{_usrlib} +mkdir -p %{buildroot}%{_etc} -mv config.yml %{buildroot}/etc/gitlab-shell -ln -s /etc/gitlab-shell/config.yml %{buildroot}/usr/lib/gitlab-shell/ +mv config.yml %{buildroot}%{_etc} +ln -s %{_etc}/config.yml %{buildroot}%{_usrlib} -cp -r . %{buildroot}/usr/lib/gitlab-shell +cp -r . %{buildroot}%{_usrlib} %post groupadd git || true if ! id git; then - adduser --system --home-dir /var/lib/gitlab-shell --gid git git + adduser --system --home-dir %{_varlib} --gid git git fi -mkdir -p /var/log/gitlab-shell -mkdir -p /var/lib/gitlab-shell/.ssh -mkdir -p /var/lib/gitlab-shell/repositories +mkdir -p %{_log} +mkdir -p %{_varlib}/.ssh +mkdir -p %{_varlib}/repositories -chown -R git:git /var/log/gitlab-shell -chown -R git:git /var/lib/gitlab-shell +chown -R git:git %{_log} +chown -R git:git %{_varlib} sudo -u git -H /usr/lib/gitlab-shell/bin/install %files -/usr/lib/gitlab-shell -/etc/gitlab-shell +%{_usrlib} +%{_etc} %changelog -- libgit2 0.21.2