Commit 31c01d3cc93eea40d2965da8d6514b0a2ab3d901

Authored by Alexandre Barbosa
2 parents 8d829226 7504130a
Exists in colab-master

Merge branch 'colab-spb-theme' into 'colab-master'

Colab spb theme

See merge request !5
colab-spb-theme-plugin/colab-spb-theme-plugin.spec 0 → 100644
... ... @@ -0,0 +1,37 @@
  1 +Name: colab-spb-theme
  2 +Version: 0.2.0
  3 +Release: 1
  4 +Summary: SPB-specific Colab theme
  5 +Group: Applications/Publishing
  6 +License: GPLv3
  7 +URL: https://portal.softwarepublico.gov.br/gitlab/softwarepublico/colab-spb-theme-plugin
  8 +Source0: %{name}-%{version}.tar.gz
  9 +BuildArch: noarch
  10 +BuildRequires: colab >= 1.11
  11 +Requires: colab >= 1.11
  12 +%description
  13 +This package contains Colab theme for Software Público Brasileiro platform.
  14 +
  15 +%prep
  16 +%setup -q
  17 +
  18 +%build
  19 +make
  20 +
  21 +%install
  22 +
  23 +install -d %{buildroot}/etc/colab/settings.d/
  24 +
  25 +cat > %{buildroot}/etc/colab/settings.d/spb_theme.py << EOF
  26 +COLAB_STATICS=['/usr/lib/colab/colab-spb-theme/colab_spb_theme/static']
  27 +COLAB_TEMPLATES=('/usr/lib/colab/colab-spb-theme/colab_spb_theme/templates',)
  28 +EOF
  29 +
  30 +make install DESTDIR=%{buildroot}
  31 +
  32 +%post
  33 +yes yes | colab-admin collectstatic
  34 +
  35 +%files
  36 +/usr/lib/colab
  37 +/etc/colab
... ...
colab/colab.spec
... ... @@ -30,7 +30,7 @@ Integrated software development platform.
30 30 # install colab into virtualenv to make sure dependencies are OK
31 31 rm -rf %{buildvenv}
32 32 cp -r /usr/lib/colab %{buildvenv}
33   -PATH=%{buildvenv}/bin:$PATH pip install --no-index .
  33 +PATH=%{buildvenv}/bin:$PATH pip install --use-wheel --no-index .
34 34 virtualenv --relocatable %{buildvenv}
35 35  
36 36 # cleanup virtualenv
... ... @@ -214,6 +214,10 @@ EOF
214 214 chmod 0640 /etc/colab/settings.py
215 215 fi
216 216  
  217 +install -d -m 0750 -o root -g colab /etc/colab/settings.d
  218 +
  219 +install -d -m 0755 -o colab -g colab /var/lib/colab-assets
  220 +
217 221 # If nginx is available serve assets using it
218 222 if [ -d /usr/share/nginx ]; then
219 223 ln -s /var/lib/colab/assets /usr/share/nginx/colab
... ...