Completed spec file, not tested yet
This commit is contained in:
parent
2e25bd70db
commit
1ec300efc3
|
@ -6,7 +6,7 @@ BuildRoot: %{_topdir}/BUILD/%{name}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Provides: shelfzilla
|
Provides: shelfzilla
|
||||||
Requires: python27
|
Requires: python27
|
||||||
License:
|
License: Comercial
|
||||||
Group: FDB
|
Group: FDB
|
||||||
Distribution: FDB Global Services
|
Distribution: FDB Global Services
|
||||||
Vendor: FDB
|
Vendor: FDB
|
||||||
|
@ -27,14 +27,24 @@ Shelfzilla is a website which save all your Manga
|
||||||
%prep
|
%prep
|
||||||
rm -rf $RPM_BUILD_ROOT*
|
rm -rf $RPM_BUILD_ROOT*
|
||||||
[ -d $RPM_BUILD_ROOT%{_app_dir} ] || mkdir -p $RPM_BUILD_ROOT%{_app_dir}
|
[ -d $RPM_BUILD_ROOT%{_app_dir} ] || mkdir -p $RPM_BUILD_ROOT%{_app_dir}
|
||||||
|
[ -d $RPM_BUILD_ROOT%{_app_dir}/config ] || mkdir -p $RPM_BUILD_ROOT%{_app_dir}/config
|
||||||
|
|
||||||
|
# clean up development-only files
|
||||||
|
find %{_gitdir} -depth -name .git -exec rm -rf {} \;
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------------------- #
|
# -------------------------------------------------------------------------------------------- #
|
||||||
# install section:
|
# install section:
|
||||||
# -------------------------------------------------------------------------------------------- #
|
# -------------------------------------------------------------------------------------------- #
|
||||||
%install
|
%install
|
||||||
# Copy Source Code
|
# Copy Source Code
|
||||||
cp -r %{_gitdir}/* $RPM_BUILD_ROOT%{_app_dir}
|
cp -r %{_gitdir}/shelfzilla $RPM_BUILD_ROOT%{_app_dir}
|
||||||
|
cp -r %{_gitdir}/config/production $RPM_BUILD_ROOT%{_app_dir}/config
|
||||||
|
cp -r %{_gitdir}/config/requirements.txt $RPM_BUILD_ROOT%{_app_dir}/config
|
||||||
|
cp -r %{_gitdir}/*.json $RPM_BUILD_ROOT%{_app_dir}/
|
||||||
|
cp -r %{_gitdir}/*.py $RPM_BUILD_ROOT%{_app_dir}/
|
||||||
|
cp -r %{_gitdir}/gruntfile.coffee $RPM_BUILD_ROOT%{_app_dir}/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------------------- #
|
# -------------------------------------------------------------------------------------------- #
|
||||||
|
@ -42,17 +52,22 @@ cp -r %{_gitdir}/* $RPM_BUILD_ROOT%{_app_dir}
|
||||||
# -------------------------------------------------------------------------------------------- #
|
# -------------------------------------------------------------------------------------------- #
|
||||||
%post
|
%post
|
||||||
## Npm install
|
## Npm install
|
||||||
|
cd %{_app_dir} && npm install
|
||||||
|
|
||||||
## pip install
|
## pip install
|
||||||
|
pip install -r %{_app_dir}/config/production/requirements.ttx
|
||||||
|
|
||||||
## Syncdb dir manage
|
## Syncdb dir manage
|
||||||
## migrate
|
python2.7 %{_app_dir}/manage.py syncdb
|
||||||
## grunt compile
|
|
||||||
## python2.7 manage.py collectstatic
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Migrate
|
||||||
|
python2.7 %{_app_dir}/manage.py migrate
|
||||||
|
|
||||||
|
## Grunt compile
|
||||||
|
cd %{_app_dir} && grunt compile
|
||||||
|
|
||||||
|
## Collect static
|
||||||
|
python2.7 manage.py collectstatic
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------------------- #
|
# -------------------------------------------------------------------------------------------- #
|
||||||
# pre-uninstall section:
|
# pre-uninstall section:
|
||||||
|
|
Reference in New Issue