fmartingr
/
shelfzilla
Archived
1
0
Fork 0
This repository has been archived on 2021-06-29. You can view files and clone it, but cannot push or open issues or pull requests.
shelfzilla/rpm/spec/shelfzilla.spec

87 lines
2.6 KiB
RPMSpec
Raw Normal View History

2014-04-04 16:12:34 +00:00
Summary: Shelfzilla
Name: Shelfzilla
2014-04-03 20:29:07 +00:00
Version: %{_gs_version}
Release: %{_gs_revision}
BuildRoot: %{_topdir}/BUILD/%{name}
BuildArch: noarch
2014-04-04 16:12:34 +00:00
Provides: shelfzilla
Requires: python27
2014-04-04 16:39:53 +00:00
License: Comercial
2014-04-04 16:12:34 +00:00
Group: FDB
Distribution: FDB Global Services
Vendor: FDB
2014-04-03 20:29:07 +00:00
%description
2014-04-04 16:12:34 +00:00
Shelfzilla is a website which save all your Manga
2014-04-03 20:29:07 +00:00
2014-04-04 16:12:34 +00:00
%defina _app_dir /opt/shelfzilla
2014-04-03 20:29:07 +00:00
%define _binaries_in_noarch_packages_terminate_build 0
# Do not check unpackaged files
%undefine __check_files
# -------------------------------------------------------------------------------------------- #
# prep section:
# -------------------------------------------------------------------------------------------- #
# Remove previous build files
%prep
rm -rf $RPM_BUILD_ROOT*
[ -d $RPM_BUILD_ROOT%{_app_dir} ] || mkdir -p $RPM_BUILD_ROOT%{_app_dir}
2014-04-04 16:39:53 +00:00
[ -d $RPM_BUILD_ROOT%{_app_dir}/config ] || mkdir -p $RPM_BUILD_ROOT%{_app_dir}/config
2014-04-03 20:29:07 +00:00
2014-04-04 16:39:53 +00:00
# clean up development-only files
find %{_gitdir} -depth -name .git -exec rm -rf {} \;
2014-04-03 20:29:07 +00:00
# -------------------------------------------------------------------------------------------- #
# install section:
# -------------------------------------------------------------------------------------------- #
%install
# Copy Source Code
2014-04-04 16:39:53 +00:00
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}/
2014-04-03 20:29:07 +00:00
# -------------------------------------------------------------------------------------------- #
# post-install section:
# -------------------------------------------------------------------------------------------- #
%post
2014-04-04 16:12:34 +00:00
## Npm install
2014-04-04 16:39:53 +00:00
cd %{_app_dir} && npm install
2014-04-04 16:12:34 +00:00
2014-04-04 16:39:53 +00:00
## pip install
pip install -r %{_app_dir}/config/production/requirements.ttx
2014-04-04 16:12:34 +00:00
2014-04-04 16:39:53 +00:00
## Syncdb dir manage
python2.7 %{_app_dir}/manage.py syncdb
2014-04-04 16:12:34 +00:00
2014-04-04 16:39:53 +00:00
## Migrate
python2.7 %{_app_dir}/manage.py migrate
2014-04-04 16:12:34 +00:00
2014-04-04 16:39:53 +00:00
## Grunt compile
cd %{_app_dir} && grunt compile
2014-04-04 16:12:34 +00:00
2014-04-04 16:39:53 +00:00
## Collect static
python2.7 manage.py collectstatic
2014-04-03 20:29:07 +00:00
# -------------------------------------------------------------------------------------------- #
# pre-uninstall section:
# -------------------------------------------------------------------------------------------- #
%preun
# -------------------------------------------------------------------------------------------- #
# post-uninstall section:
# -------------------------------------------------------------------------------------------- #
%postun
%clean
rm -rf $RPM_BUILD_ROOT
%files
%{_app_dir}/*