Commit 790fe186 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

obs/slapos: fix use shorter name

fixup for 203927d9

The directory must be correct in slapos.spec.
parent 203927d9
...@@ -13,9 +13,9 @@ CURRENT_DIRECTORY="$(pwd)" ...@@ -13,9 +13,9 @@ CURRENT_DIRECTORY="$(pwd)"
# Development Section # Development Section
OBS_DIRECTORY=$CURRENT_DIRECTORY/home:VIFIBnexedi:branches:home:VIFIBnexedi/SlapOS-Node OBS_DIRECTORY=$CURRENT_DIRECTORY/home:VIFIBnexedi:branches:home:VIFIBnexedi/SlapOS-Node
VERSION_REGEX="s/\%RECIPE_VERSION\%/$RECIPE_VERSION/g;s/\%VERSION\%/$VERSION/g;s/\%RELEASE\%/$RELEASE/g"
TEMPLATES_DIRECTORY=$CURRENT_DIRECTORY/templates TEMPLATES_DIRECTORY=$CURRENT_DIRECTORY/templates
SLAPOS_ORGINAL_DIRECTORY=slapos-node SLAPOS_ORGINAL_DIRECTORY=slapos-node
SLAPOS_DIRECTORY=sn_$VERSION+$RECIPE_VERSION+$RELEASE SLAPOS_DIRECTORY=sn_$VERSION+$RECIPE_VERSION+$RELEASE
VERSION_REGEX="s/\%RECIPE_VERSION\%/$RECIPE_VERSION/g;s/\%VERSION\%/$VERSION/g;s/\%RELEASE\%/$RELEASE/g;s/\%SLAPOS_DIRECTORY\%/$SLAPOS_DIRECTORY/g"
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
...@@ -29,9 +29,7 @@ ...@@ -29,9 +29,7 @@
%define slapversion %RECIPE_VERSION% %define slapversion %RECIPE_VERSION%
%define version %VERSION% %define slapos_directory %SLAPOS_DIRECTORY%
%define unmangled_version %VERSION%
%define unmangled_version %VERSION%
%define release_number %RELEASE% %define release_number %RELEASE%
...@@ -41,7 +39,7 @@ Version:%{slapversion} ...@@ -41,7 +39,7 @@ Version:%{slapversion}
Release:%{release_number} Release:%{release_number}
License:GPL License:GPL
Group: Application/Network Group: Application/Network
Source0: slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}.tar.gz Source0: %{slapos_directory}.tar.gz
URL: http://community.slapos.org/ URL: http://community.slapos.org/
Vendor: Vifib Vendor: Vifib
Packager: Thomas Gambier <thomas.gambier@nexedi.com> Packager: Thomas Gambier <thomas.gambier@nexedi.com>
...@@ -82,21 +80,21 @@ Conflicts: firewalld ...@@ -82,21 +80,21 @@ Conflicts: firewalld
%prep %prep
rm -rf $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number} rm -rf $RPM_BUILD_DIR/%{slapos_directory}
zcat $RPM_SOURCE_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}.tar.gz | tar -xvf - zcat $RPM_SOURCE_DIR/%{slapos_directory}.tar.gz | tar -xvf -
%build %build
cd $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number} cd $RPM_BUILD_DIR/%{slapos_directory}
make make
%install %install
cd $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}/ cd $RPM_BUILD_DIR/%{slapos_directory}
make DESTDIR=$RPM_BUILD_ROOT install make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/etc/cron.d/ mkdir -p $RPM_BUILD_ROOT/etc/cron.d/
cp $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}/slapos-node.cron.d $RPM_BUILD_ROOT/etc/cron.d/slapos-node cp $RPM_BUILD_DIR/%{slapos_directory}/slapos-node.cron.d $RPM_BUILD_ROOT/etc/cron.d/slapos-node
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d/ mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d/
cp $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}/slapos-node.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/slapos.logrotate.conf cp $RPM_BUILD_DIR/%{slapos_directory}/slapos-node.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/slapos.logrotate.conf
mkdir -p $RPM_BUILD_ROOT/etc/systemd/system/ mkdir -p $RPM_BUILD_ROOT/etc/systemd/system/
mkdir -p $RPM_BUILD_ROOT/opt/slapos/log mkdir -p $RPM_BUILD_ROOT/opt/slapos/log
rm -rf $RPM_BUILD_ROOT/opt/slapos/eggs/setuptools-*.egg/setuptools/tests/test_easy_install.py rm -rf $RPM_BUILD_ROOT/opt/slapos/eggs/setuptools-*.egg/setuptools/tests/test_easy_install.py
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment