Skip to content

Commit

Permalink
Add RPM spec
Browse files Browse the repository at this point in the history
  • Loading branch information
ggatward committed Dec 19, 2016
1 parent 0391d4b commit fb2adcf
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var/
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
#*.spec

# Installer logs
pip-log.txt
Expand Down
80 changes: 80 additions & 0 deletions sat6_scripts.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
Name: sat6_scripts
Version: 1.0.0
Release: 1%{?dist}
Summary: Scripts to automate Satellite 6 tasks

License: GPL
URL: https://github.com/ggatward/sat6_scripts
Source0: sat6_scripts.tar.gz

Requires: python >= 2.7, satellite >= 6.2, PyYAML

%description



%prep
%autosetup


%build


%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/local/{bin,etc}
mkdir -p %{buildroot}/usr/share/{doc,sat6_scripts/config}
install -m 0644 README.md %{buildroot}/usr/share/doc/sat6_scripts/README.md
install -m 0644 LICENSE %{buildroot}/usr/share/doc/sat6_scripts/LICENSE
install -m 0644 config/config.yml.example %{buildroot}/usr/share/sat6_scripts/config/config.yml
install -m 0644 config/exports.yml.example %{buildroot}/usr/share/sat6_scripts/config/exports.yml
install -m 0755 bin/check_sync %{buildroot}/usr/local/bin/check_sync
install -m 0755 bin/sat_export %{buildroot}/usr/local/bin/sat_export
install -m 0755 bin/sat_import %{buildroot}/usr/local/bin/sat_import
install -m 0755 bin/clean_content_views %{buildroot}/usr/local/bin/clean_content_views
install -m 0755 bin/publish_content_views %{buildroot}/usr/local/bin/publish_content_views
install -m 0755 bin/promote_content_views %{buildroot}/usr/local/bin/promote_content_views
install -m 0644 helpers.py %{buildroot}/usr/share/sat6_scripts/helpers.py
install -m 0644 check_sync.py %{buildroot}/usr/share/sat6_scripts/check_sync.py
install -m 0644 sat_export.py %{buildroot}/usr/share/sat6_scripts/sat_export.py
install -m 0644 sat_import.py %{buildroot}/usr/share/sat6_scripts/sat_import.py
install -m 0644 publish_content_views.py %{buildroot}/usr/share/sat6_scripts/publish_content_views.py
install -m 0644 promote_content_views.py %{buildroot}/usr/share/sat6_scripts/promote_content_views.py
install -m 0644 clean_content_views.py %{buildroot}/usr/share/sat6_scripts/clean_content_views.py



%files
%doc /usr/share/doc/sat6_scripts/README.md
%license /usr/share/doc/sat6_scripts/LICENSE
%config(noreplace) /usr/share/sat6_scripts/config/config.yml
%config(noreplace) /usr/share/sat6_scripts/config/exports.yml

/usr/share/sat6_scripts/helpers.py
/usr/share/sat6_scripts/check_sync.py
/usr/share/sat6_scripts/sat_export.py
/usr/share/sat6_scripts/sat_import.py
/usr/share/sat6_scripts/publish_content_views.py
/usr/share/sat6_scripts/promote_content_views.py
/usr/share/sat6_scripts/clean_content_views.py

/usr/local/bin/check_sync
/usr/local/bin/sat_export
/usr/local/bin/sat_import
/usr/local/bin/clean_content_views
/usr/local/bin/publish_content_views
/usr/local/bin/promote_content_views


%post
ln -s /usr/share/sat6_scripts/config/config.yml /usr/local/etc/sat6_scripts/config.yml
ln -s /usr/share/sat6_scripts/config/exports.yml /usr/local/etc/sat6_scripts/exports.yml


%postun
unlink /usr/local/etc/sat6_scripts/config.yml
unlink /usr/local/etc/sat6_scripts/exports.yml


%changelog

0 comments on commit fb2adcf

Please sign in to comment.