Commit 9a7842e1503e09b2a9ec7f78e23549a8448c3d9e
1 parent
e07e1d76
Exists in
master
and in
79 other branches
Minimal working spec
Showing
1 changed file
with
18 additions
and
97 deletions
Show diff stats
gitlab.spec
1 | -%define pid_dir %{_localstatedir}/run/redis | ||
2 | -%define pid_file %{pid_dir}/redis.pid | ||
3 | - | ||
4 | -Summary: gitlab | ||
5 | -Name: gitlab | ||
6 | -Version: 7.4 | ||
7 | -Release: 1 | ||
8 | -License: BSD | ||
9 | -#Group: Applications/Multimedia | ||
10 | -#URL: http://redis.io/ | ||
11 | -Source0: gitlab-%{version}.tar.gz | ||
12 | -Source1: gitlab-ce-%{version}.tar.gz | ||
13 | -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | ||
14 | -Requires: nginx, postgresql-server, gitlab-deps | ||
15 | - | ||
16 | -BuildRequires: curl, zlib-devel, libyaml-devel, openssl-devel, libffi-devel, openssh-server, logrotate, libxml2-devel, libxslt-devel, readline-devel, ncurses-devel, libcurl-devel, python-docutils, gdbm-devel, gitlab-deps | ||
17 | - | ||
18 | -#Requires(post): /sbin/chkconfig /usr/sbin/useradd | ||
19 | -#Requires(preun): /sbin/chkconfig, /sbin/service | ||
20 | -#Requires(postun): /sbin/service | ||
21 | -Provides: gitlab | ||
22 | -%if 0%{?suse_version} >= 1210 | ||
23 | -BuildRequires: systemd | ||
24 | -%endif | ||
25 | - | 1 | +Name: gitlab |
2 | +Version: 7.5.2 | ||
3 | +Release: 1%{?dist} | ||
4 | +Summary: Software Development Platform | ||
5 | +Group: Development/Tools | ||
6 | +License: Expat | ||
7 | +URL: https://beta.softwarepublico.gov.br/gitlab/softwarepublico/gitlab | ||
8 | +Source0: %{name}-%{version}.tar.gz | ||
9 | + | ||
10 | +BuildRequires: gitlab-deps | ||
11 | +Requires: gitlab-deps | ||
26 | 12 | ||
27 | %description | 13 | %description |
28 | - | 14 | +GitLab |
29 | 15 | ||
30 | %prep | 16 | %prep |
31 | -echo "Fase de preparacao" | ||
32 | -%setup | ||
33 | - | ||
34 | -%pre | ||
35 | -adduser git | ||
36 | -echo "Fase de pre" | ||
37 | -service postgresql initdb | ||
38 | -service postgresql start | ||
39 | -sudo -u postgres psql -d template1 << EOF | ||
40 | -CREATE USER git CREATEDB; | ||
41 | -CREATE DATABASE gitlabhq_production OWNER git; | ||
42 | -\q | ||
43 | -EOF | ||
44 | - | ||
45 | -export PATH=$PATH:/usr/lib/gitlab/vendor/bundle/ruby/bin | 17 | +%autosetup |
46 | 18 | ||
47 | %build | 19 | %build |
48 | - | ||
49 | -cp config/gitlab.yml.example config/gitlab.yml | ||
50 | -cp config/unicorn.rb.example config/unicorn.rb | ||
51 | -cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb | ||
52 | -cp config/database.yml.postgresql config/database.yml | ||
53 | - | ||
54 | -#bundle install --deployment --without development test mysql aws | ||
55 | - | ||
56 | -# Run the installation task for gitlab-shell (replace `REDIS_URL` if needed): | ||
57 | -#bundle exec rake gitlab:shell:install REDIS_URL="redis://localhost:6379" RAILS_ENV=production | ||
58 | - | ||
59 | -# By default, the gitlab-shell config is generated from your main GitLab config. | ||
60 | -# You can review (and modify) the gitlab-shell config as follows: | ||
61 | -### vim /home/git/gitlab-shell/config.yml | ||
62 | - | ||
63 | -bundle exec rake gitlab:setup RAILS_ENV=production | ||
64 | -bundle exec rake assets:precompile RAILS_ENV=production | ||
65 | - | ||
66 | -echo "\t\t\tFim da fase de build" | ||
67 | -pwd | 20 | +# make %{?_smp_mflags} |
68 | 21 | ||
69 | %install | 22 | %install |
70 | -echo "#########Criando diretorio %{buildroot}%{_libdir}/gitlab" | ||
71 | -mkdir -p %{buildroot}/usr/lib/gitlab/ | ||
72 | -cp -r . %{buildroot}/usr/lib/gitlab/ | ||
73 | - | ||
74 | - | ||
75 | -%post | ||
76 | - | ||
77 | -%preun | ||
78 | - | ||
79 | -%postun | ||
80 | - | ||
81 | -userdel git | ||
82 | - | ||
83 | -sudo -u postgres psql -d template1 << EOF | ||
84 | -DROP DATABASE [ IF EXISTS ] gitlabhq_production; | ||
85 | -DROP USER [ IF EXISTS ] git; | ||
86 | -\q | ||
87 | -EOF | ||
88 | - | ||
89 | -%clean | ||
90 | -%{__rm} -rf %{buildroot} | 23 | +mkdir -p %{buildroot}/usr/lib/gitlab |
24 | +cp -r app bin config config.ru db doc GITLAB_SHELL_VERSION lib Procfile public Rakefile vendor VERSION %{buildroot}/usr/lib/gitlab/ | ||
91 | 25 | ||
92 | %files | 26 | %files |
93 | -/usr/lib/gitlab/ | ||
94 | - | ||
95 | -#%defattr(-, root, root, 0755) | ||
96 | -#%doc deps/lua/doc/*.html | ||
97 | -#%{_sbindir}/redis-server | ||
98 | -#%{_bindir}/redis-benchmark | ||
99 | -#%{_bindir}/redis-cli | ||
100 | -#%{_unitdir}/redis.service | ||
101 | -#%config(noreplace) %{_sysconfdir}/redis.conf | ||
102 | -#%{_sysconfdir}/logrotate.d/redis | ||
103 | -#%dir %attr(0770,redis,redis) %{_localstatedir}/lib/redis | ||
104 | -#%dir %attr(0755,redis,redis) %{_localstatedir}/log/redis | ||
105 | -#%dir %attr(0755,redis,redis) %{_localstatedir}/run/redis | ||
106 | - | ||
107 | -%changelog | 27 | +/usr/lib/gitlab |
28 | +%doc |